What you describe is not directly possible but can be done easily with a trick. Please read my answer to the following question been asked in the code section:
http://developer.anscamobile.com/code/spritegrabber-spritesheets-two-lines?page=2#comment-53538
[import]uid: 7356 topic_id: 3197 reply_id: 83973[/import]
@mike070
I guess you are tuning the “2000” parameter. Are you taking the same speed if you change this to 300? If yes (!), could you please post the code with which you are calling the clip to be played.
(Off Topic: Hi jStrahan! Really glad to see you around. Death to GameSalad ;p )
…
To tell the truth, I don’t really see what is the purpose of timeScale. I’ve never used this. How it is different than the parameter above?
Corona SDK loads sprites per sheet, not per sprite. This is actually the meaning of creating “sheets of images”: load all images once, use each image as many times as you want without any additional overhead. So, you can’t remove a single sprite. You have to remove the whole spritesheet when done with using it. [import]uid: 7356 topic_id: 3197 reply_id: 83975[/import]
There is very little if no difference between the speed of 2000, and 300. I am using playClip() as indicated above.
The reason for timeScale is if you want to edit the speed of the animation clip… In my instance I have an enemy walk-cycle and when he is hit by a weapon I would like for him to slow down, well I have slowed down his transition speed but his animation speed is the same as when I instantiated it. So I would need to edit the speed of the animation to match the speed of the transition so it looks like he is walking slower and not sliding.
I have tried adding self.timeScale = 2; before and after self:prepareClip(clip) as the API shows as an example but I do not get any change in the speed. [import]uid: 63800 topic_id: 3197 reply_id: 83986[/import]
You can’t change the speed of the clip dynamically. However, you can make two clips of the same sprite-action, each one with a different milliseconds parameter.
You can upload a demo project somewhere in the cloud so I can take a closer look.
Thanks! [import]uid: 7356 topic_id: 3197 reply_id: 84005[/import]
Impressive, worked at the first try, saved a lot of time. Thanks to you, Magenda and Andrew’s TexturePacker + physicsEditor.
[import]uid: 115838 topic_id: 3197 reply_id: 116251[/import]
Impressive, worked at the first try, saved a lot of time. Thanks to you, Magenda and Andrew’s TexturePacker + physicsEditor.
[import]uid: 115838 topic_id: 3197 reply_id: 117465[/import]