V
veko
Guest
I have this simple accelleration code on my obj enemy.
He is suppossed to dash towards player and the slow down.
In my create event it sets 1 to alarm[0] and in alarm[0] it sets direction towards player and speed on 50 and resets it self to 500.
And this is what i have on step event for slowing down:
if speed = 50
{
for (i = 0; i < 20; i += 1)
{
speed -= 2.5;
}
}
It seems that this code is not working since it follows the player on speed 50 forever.
If somebody could help me out that would be great. Thank you!
He is suppossed to dash towards player and the slow down.
In my create event it sets 1 to alarm[0] and in alarm[0] it sets direction towards player and speed on 50 and resets it self to 500.
And this is what i have on step event for slowing down:
if speed = 50
{
for (i = 0; i < 20; i += 1)
{
speed -= 2.5;
}
}
It seems that this code is not working since it follows the player on speed 50 forever.
If somebody could help me out that would be great. Thank you!