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 / sprite animation with key presses

Author
Message
SetaSan
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location:
Posted: 27th Aug 2008 21:01
Okay, i'm trying to make a sprite do all the frames of it's animation when i press the control button... but instead of getting that i have to hold down the button for it to execute and so long as you hold it down it loops infinitely. As i said.. i want one key press to activate the whole animation without having to hold buttons down. Any help would be much appreciated.
Tav
16
Years of Service
User Offline
Joined: 20th Feb 2008
Location:
Posted: 27th Aug 2008 22:15 Edited at: 27th Aug 2008 22:23
Creating a boolean and once pressed it turns the boolean to true, if the animation played once reset the boolean to false. And keep checking if the boolean's value. If you want the animation to play once:

else use dbLoopObject() instead of dbPlaySprite().
EDIT: new script.

Login to post a reply

Server time is: 2024-09-30 05:41:31
Your offset time is: 2024-09-30 05:41:31