Jump to content


Nerf Smurf

Member Since 23 Jan 2006
Offline Last Active Jan 18 2012 04:04 AM

Posts I've Made

In Topic: ...AI follow a user defined street

21 December 2011 - 06:38 AM

My vehicles follow their paths as desired using mp_grids, etc, but is there a way to smooth-en out the turns as they look pretty jerky.

In Topic: How to Make A "Start Game" Button

09 December 2011 - 04:42 AM

Give it a variable when created like....

ballinhand=1

and when you hit the space bar do something like

if ballinhand==1
{
start your ball moving DnD stuff here
ballinhand=0
}

Now when you hit space bar the first time, it will check if "ballinhand" is 1. If it is, it will start your ball moving and it will also set "ballinhand" to 0. So if you hit spacebar the 2nd time, it will check if "ballinhand" equals 1, and it wont, so it wont move the ball again.

Oh and this is great cause when ever you loose the ball, all you have to do is set "ballinhand" back to 1.

In Topic: ...AI follow a user defined street

07 December 2011 - 08:57 PM

Solved...

My problem was that i didnt want to object to follow a path as soon as it was created, my planes have different stages, for the takeoff/landing stages, i use the simple move_towards_point. After it gets to the runway, i needed it to activate the path. I also needed the path to have its start position on the runway. But now everything is fixed now after HOURS of working on this :D Thanks guys!!!

In Topic: ...AI follow a user defined street

07 December 2011 - 08:30 PM

My head still cant figure this out. I have my grid made just how I like it, but my planes still cut across the red grid squares.

In Topic: health bar problems

05 December 2011 - 09:14 AM

Use the formula provided by twelveways. Math and programming goes oh-so well together :D

If i remember correctly, "draw_healthbar" assumes your working with a maximum of 100 health. I see you are using fuel so your car/ship/rocket may have more than 100 units of gas, causing the long line. I am going to make it even simpler for you and write it out.....

Object's Create event (or where ever you created your "global.fuel=xx" and "global.maxfuel=xx"):
global.fuellevel = 0

Object's Step event:
global.fuellevel = (global.fuel/global.maxfuel)*100

Draw Event of whatever draws the bar:
draw_healthbar(20,50,80,60,global.fuellevel,c_black,c_red,c_green,0,1,1)


Oh btw, you dont have to make the x2 and y2 values = global.maxfuel, you can give it an integer value, Gamemaker does a small portion of math for you.