Correct rapid movement...
Posted:
Sun Sep 10, 2006 12:44 am
by Hyperyon
My player changes animations at keydown events and keyup. When I press the keys fast the sprite moves even with a standing still position triggered from a keyup event.
I couldnt find a similar topic... Is it possible to fix this?
Posted:
Sun Sep 10, 2006 9:20 am
by Novice
Post the events that you used and how you used them, so we can help you.
Posted:
Sun Sep 10, 2006 2:16 pm
by Jokke
you mean moonwalk? i get that too
Posted:
Sun Sep 10, 2006 3:34 pm
by Hyperyon
events:
On player, add keydown event;
key right;
script editor: x=x+5;
change animation: walking sprite
add keyup;
key right;
change animation : standing sprite
same with up,left,down keys.
The sprite sometimes keeps its 'standing' position if I change the keys fast.
Posted:
Sun Sep 10, 2006 5:27 pm
by Novice
This happens because you press two keys at once and you have conflicting change animation codes to solve this you shoud use an if statement to check if other buttons are pressed. More about this is here
http://game-editor.com/forum/viewtopic. ... sc&start=0
it's quite a long topic so have patience.
BTW Makslane why dont the links in the forum work? and the url button is missing in the posting page.
Posted:
Sun Sep 10, 2006 6:04 pm
by makslane
Novice wrote:why dont the links in the forum work? and the url button is missing in the posting page.
Due a bug in the phpBB. Don't use the [url] tag in your posts. Just write the address like this:
http://game-editor.com
Posted:
Mon Sep 11, 2006 2:30 pm
by Novice
Thanks, that realy anoyed me.