forum

Storyboard animations delay

posted
Total Posts
4
Topic Starter
Inozuma
Animation:
Code:
Animation,"layer","origin","filepath",x,y,frameCount,frameDelay,looptype
_event,easing,starttime,endtime,[params]
_event, [...]
_event, [...]


For animations, specify a filename like "sliderball.png", and name your files "sliderball0.png" to "sliderball9.png" for a 10 frame animation.

frameCount: number of frames in the animation
frameDelay: delay in milliseconds between each frame.
looptype: LoopForever by default
LoopForever - Loops over and over again
LoopOnce - Loops once and stops on last frame.
I recently started to work on more heavy SB stuff and I added an animation which code is:

Animation,Foreground,Centre,"sb\lightning.png",320,240,5,$lengthOne,LoopForever
L,79098,32
F,0,0,$lengthOne,1,0.2

$lengthOne is the time of one beat.
While Fade works correctly, the animation is way too fast, like 4 times faster than it must be...
Did I misunderstood something?
YoshiKart
I tend not to use animations, since they go faster than intended and usually go out of sync with other animations that are supposed to work together (ex. a time display using animations won't work well). I guess you could ask peppy to make animation frame delays more strict when animating in Play/Test mode. For now, a long fix could be to let the first frame as a sprite have 100% fade for $lengthOne, then fade out during x - 1 amount of lengths, where x is your number of frames. Then repeat the process with loops. Let the second frame fade out for the first length, fade in on the second length, then fade out during x - 2 lengths. Etc. for the other frames.

For your case though, it might be hard to fade a fade... What I mean is, you can't really make the "animation" fade out while the animation frames are being swapped in by fade. You could use movement to swap the animation frames as well (move a frame out of the play area when it's not its turn), but you'd restrict movement for the "animation" like for fade.

This was a bit complicated. Hope it helps. :o


peppy broke my complicated workaround.
peppy
this is already fixed/changed in coming build.
Topic Starter
Inozuma
This map has been deleted on the request of its creator. It is no longer available.
Please sign in to reply.

New reply