Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / multiple if statements mess up sprite animation

Author
Message
Achilles
5
Years of Service
User Offline
Joined: 8th Mar 2014
Location:
Posted: 10th Mar 2014 06:54
Ok, so this is my first time trying to animate a sprite and it worked at first. As you can see, here is my code, perfectly working to move and animate my character to the right.



However, I want my character to be able to move to the left right up and down. It would seem simple, however It isn't because I can't just copy this code and change the values to go left


The reason behind this is because nothing will work right simply because their is multiple else statements which are supposed to act as key releases. Even when I take out all the else statements the code acts right but pauses on the wrong frame and also, for example, if i move my character to the right for a while but immediately try to move him to the left his animation takes a while to change to the left animation and continues to move when on the wrong animation because of the 130 delay.
pcRaider
12
Years of Service
User Offline
Joined: 30th May 2007
Location:
Posted: 12th Mar 2014 13:38
try this



windowsXp

Attachments

Login to view attachments

Login to post a reply

Server time is: 2019-09-19 19:45:52
Your offset time is: 2019-09-19 19:45:52