Page 1 of 1

Character movement bug?

PostPosted: Thu Jun 01, 2006 4:56 am
by SuperLarryo
My question isn't difficult, but it seems there's no easy way to fix it, looking at this guy's problem: http://game-editor.com/forum/viewtopic. ... +animation

I have the same problem, but only for moving left, right, and jumping. When I use the regular key down events built into GE to make my character (Mario) walk and jump, they mess up when they are pressed quickly in certain sequences. For example, when I press right, then press left quickly, Mario will switch to his standing postion, but continue to move left. (the same things happen in the caveman demos, which is where I learned how to do simple movements). I think this has something to do with the Key Up events I made, but I don't see any other way to fix these animation problems. The code in the topic above is very complicated, and I don't understand it well. Is there a simple way to fix these little bugs, or am I just going to have to deal with them?

PostPosted: Thu Jun 01, 2006 2:42 pm
by Novice
There is no simple way to fix it (in this version). Use the code i made in the post you put a link to.

PostPosted: Thu Jun 01, 2006 2:45 pm
by Novice
And these are not bugs, they are programing errors :wink: . It hapens because you put a chage animation event on a key down event, and it does exactly that it chages the animation whenever you press a key, no mater wich key you are pressing before. And as for the walking it's conflicting code, so yous should always try to do your movement in draw actor.

PostPosted: Thu Jun 01, 2006 4:20 pm
by SuperLarryo
Ok, thanks. Your code did work, but I had to destroy everything I made and rename it all. :( :lol:

However, it works better than ever. My only problem now is the jumping animation. Nobody seems to know how to stop the jump animation when you collide with the ground. I've tried collision, variables, and even code similar to what you made, Novice. (Which I tried before I saw your code, and I thought was weird...)

I got the jumping to the point where it was perfect until I hit the ground. And there was something else that was weird. When I jumped and hit the ground, the animation would stick until I repress a key. When I jumped on a block I made for platform practice, the jumping animation didn't stick... I couldn't figure it out. I will try later. For now I cropped the jump animation out.

Thanks for all your help Novice.