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.

DarkBASIC Professional Discussion / Enhanced Animation - Pause Animation?

Author
Message
wattywatts
14
Years of Service
User Offline
Joined: 25th May 2009
Location: Michigan
Posted: 2nd Oct 2015 23:05
I'm about to tear my hair out at this. I can't seem to find any way to pause my animation.
I need my character to climb down a ladder when down is pressed, and not climb when it isn't. I can obviously make him stop going down or up, but I also need the animation to pause, which I can't figure out.
Setting the animation speed to 0 mid loop just causes my project to crash... Help!
chafari
Valued Member
17
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 4th Oct 2015 03:30
Hi there.
This is not the best way, but it works....

Try this:
Quote: "If upkey()
ani=ani+speed
EnAn_oacPlayAnim oacID, 1,walkAnim, ani,0,0,1,0
If upkey()=0 or ani>last_frame then ani=0
endif"


Cheers.
I\'m not a grumpy grandpa

Login to post a reply

Server time is: 2024-04-19 11:20:30
Your offset time is: 2024-04-19 11:20:30