Makkeonmies
Member
hi, I'm using motion_set() in my top down-viewed game to make enemies get slightly pushed backwards by a certain collision.
collision event for enemies:
'spd' is always a characters base speed variable.
motion_set() is not supposed to add to the existing speed of the object, unlike motion_add(), right?
Anyway, it still seems to occasionally add to the enemy's speed, since sometimes the enemy just suddenly gains crazy speed, most of the time not tho.
anything wrong with the code or the event executing it?
collision event for enemies:
GML:
pdir = point_direction(other.x, other.y, x, y);
motion_set(pdir, spd);
motion_set() is not supposed to add to the existing speed of the object, unlike motion_add(), right?
Anyway, it still seems to occasionally add to the enemy's speed, since sometimes the enemy just suddenly gains crazy speed, most of the time not tho.
anything wrong with the code or the event executing it?