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.

AppGameKit Classic Chat / Play sprite animation backwards?

Author
Message
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 16th Jun 2013 00:19
Is there a way?

baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 16th Jun 2013 01:08
Yes

You can set the frame manually. I think there is a way to do it using playSprite or setSpriteAnimation too using a negative value but I haven't used it yet...


this.mess = abs(sin(times#))
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 16th Jun 2013 01:14
If I set the frames manually, then I have institute my own timing which really defeats the purpose of using playSprite altogether. I've been toying around with negative numbers but haven't had any results yet.

Hockeykid
DBPro Tool Maker
16
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 16th Jun 2013 01:32
You can use PlaySprite to play a sprite backwards.

PlaySprite( iSpriteIndex, fFps, iLoop, iFromFrame, iToFrame )

To play a sprite backwards set "iFromFrame" to the higher frame number and "iToFrame" to the lower frame number.

So, something like this should work
PlaySprite( 1,25,0,23,16 )

Sean

Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 16th Jun 2013 02:16
Ok, I swear that was the first thing I tried and it didn't work before. But now it does. Just finished writing my own animation commands for nothing

Login to post a reply

Server time is: 2024-04-28 18:56:00
Your offset time is: 2024-04-28 18:56:00