Page 1 of 1
Change animation speed
Posted: Fri Oct 02, 2015 12:37 am
by orlanrod
How would i initialize each animation to its own speed? Right now using the "SPRITE jason_sprite "jason.png" 2 3 -1 10" applies to all animations.
Thanks
Re: Change animation speed
Posted: Fri Oct 02, 2015 6:51 am
by nolddor
You need to set general speed in rescomp.res as zero, and use setAnimation / setFrame functions on SpriteEngine to animate the sprite on your own.
Re: Change animation speed
Posted: Fri Oct 02, 2015 9:13 am
by Stef
rescomp is definitely not flexible enough when it comes to the SPRITE resource... you can modify generated structures afterward but that is dangerous as rescomp may overwrite them as soon you modify the .res file.
As suggested nolddor, the best is to let the "timer" parameter set to -1 in the SPRITE resource definition then handle it on your own.
In future i really want to have a real and good Sprite animation builder tool which will let you to tune the different parameters in depth...
Re: Change animation speed
Posted: Fri Oct 02, 2015 12:55 pm
by nolddor
Is there any difference between setting speed to -1 or zero?
Re: Change animation speed
Posted: Fri Oct 02, 2015 2:08 pm
by Stef
Actually i was wrong and you were correct :p
time parameter has to be set to 0 to avoid auto animation, -1 is not a valid value :p
Re: Change animation speed
Posted: Fri Oct 02, 2015 8:32 pm
by orlanrod
nolddor wrote:You need to set general speed in rescomp.res as zero, and use setAnimation / setFrame functions on SpriteEngine to animate the sprite on your own.
Ah okay. Yeah, now i got it working.
Thanks! 8D
Re: Change animation speed
Posted: Fri Oct 02, 2015 8:35 pm
by orlanrod
Stef wrote:rescomp is definitely not flexible enough when it comes to the SPRITE resource... you can modify generated structures afterward but that is dangerous as rescomp may overwrite them as soon you modify the .res file.
As suggested nolddor, the best is to let the "timer" parameter set to -1 in the SPRITE resource definition then handle it on your own.
In future i really want to have a real and good Sprite animation builder tool which will let you to tune the different parameters in depth...
Oh, you made SGDK? Cool. Pressure is on to make a cool game. 8D xD
Re: Change animation speed
Posted: Fri Oct 02, 2015 9:56 pm
by Stef
Haha, definitely you don't need to pressure yourself, it's already a pleasure to see new people using it =)