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 / Sprite Animation style (ping-pong)

Author
Message
nz0
AGK Developer
13
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 13th Mar 2021 01:35
Did this ever get added?
Frames to go (1,2,3,4,5,4,3,2) etc.
I seem to recall a distant conversation about it, but before I make my own animation function, I thought I'd check if it exists undocumented.
[href=chilltank.net]My Robotron remake[/href]
[href=chilltank.net]My Defender remake[/href]
AGK WadPacker - Protect your Media!

fubarpk
Retired Moderator
16
Years of Service
User Offline
Joined: 11th Jan 2005
Location: Adelaide
Posted: 13th Mar 2021 10:25
it may be possible with the start and end frame
PlaySprite( iSpriteIndex, fFps, iLoop, iFromFrame, iToFrame )
play from 1 to lastframe
check if playing
play lastframe to 1
repeat

fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
n00bstar
17
Years of Service
User Offline
Joined: 9th Feb 2004
Location: Montreal, Canada.
Posted: 13th Mar 2021 23:01
The cheap, entirely non-optimal, and resource-intensive way would be to build the ping pong right into your frame strip and just play the animation normally.
-----------------------------------------------------------------------------
We all got a chicken duck woman thing waiting for us
blink0k
Moderator
8
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 13th Mar 2021 23:08 Edited at: 13th Mar 2021 23:08
You could do that with AddSpriteAnimationFrame()
fubarpk
Retired Moderator
16
Years of Service
User Offline
Joined: 11th Jan 2005
Location: Adelaide
Posted: 14th Mar 2021 02:03
both better solutions than mine
I guess sometimes its not being able to add the animations yourself

fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
nz0
AGK Developer
13
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 15th Mar 2021 23:56
It's fine to just do the animation handler myself. I just seemed to remember a conversation about ping-pong animation and wondered if it was undocumented.
As it turns out, my animation uses multiple sets of 8 frames and switching between sets, I use a different count/offset.
No biggie, just wondered if it was ever put in.

Login to post a reply

Server time is: 2021-04-11 19:45:50
Your offset time is: 2021-04-11 19:45:50