PT
Developer Forums
Register
Login
[Archived] AppGameKit Classic Chat
->
Sprite Animation style (ping-pong)
<
1
>
N
nz0
Joined:
13th Jun 2007
Location:
Cheshire,UK
Posted:
13th Mar 2021 1: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.
F
fubarpk
Joined:
11th Jan 2005
Location:
AGK is my friend
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
N
n00bstar
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.
B
blink0k
Joined:
22nd Feb 2013
Location:
the land of oz
Posted:
13th Mar 2021 23:08
You could do that with
AddSpriteAnimationFrame()
F
fubarpk
Joined:
11th Jan 2005
Location:
AGK is my friend
Posted:
14th Mar 2021 2:03
both better solutions than mine
I guess sometimes its not being able to add the animations yourself
N
nz0
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.