|
Post by Xenith on Mar 24, 2004 1:34:46 GMT -5
sorry to be a bother again but i'm having trouble with npc ai still the npc walks fairly good but how would i make it so when he is no longer moving (like when he stops for a while) his animation goes to image single also how would i make it so when he bumps into an object he stops i tried what damien and mega said but it doesnt work perfectly with ism's coding so i'd actually prefer ism's help ty
|
|
|
Post by IsmAvatar on Mar 24, 2004 19:17:42 GMT -5
are you doing direction and speed, or X and Y?
if you're doing X and Y, the character won't have an hspeed or vspeed, so you have to check
if x != xprevious && y != yprevious { image_single = -1 } else { image_single = 0 }
|
|
|
Post by still screwed on Mar 25, 2004 0:09:46 GMT -5
sweet i fixed my 0problem i just added this to my code
if image_speed = 0 then image_single = 0 else image_single = -1
thanks again ism you saved my butt
IA: fixed your little bold text thingy.
|
|