changing animation speed demo
Posted: Thu Jun 05, 2008 5:26 am
just a quick and dirty (but easy) way to change animation speed of a sprite during gameplay
this demo only has five speeds/ but can be any number of speeds from 0 upt o your current games framerate
does NOT use if statements/case statements etc
use keys a to slow down ( speed six is set at 1 frame a sec)
use keys z to speed up ( speed 0 is set at 60 frames a sec)
note: it also move to the next speed without losing the current animtion position (use NO_CHANGE)
just make sure all animations are named the same with a "count" at the end - the demo shows why
feral
ps: i only used a 5 frame sprite, so a sprite with more frames should work even better - if you have one handy try it... let me know
this demo only has five speeds/ but can be any number of speeds from 0 upt o your current games framerate
does NOT use if statements/case statements etc
use keys a to slow down ( speed six is set at 1 frame a sec)
use keys z to speed up ( speed 0 is set at 60 frames a sec)
note: it also move to the next speed without losing the current animtion position (use NO_CHANGE)
just make sure all animations are named the same with a "count" at the end - the demo shows why
feral
ps: i only used a 5 frame sprite, so a sprite with more frames should work even better - if you have one handy try it... let me know