[Resolved] How to speed up sprite animation?

Hi

I’m using the following code in my program:


conveyorSheet = sprite.newSpriteSheet(“images/conveyorsheet.png”, 150, 50)
conveyorSet = sprite.newSpriteSet (conveyorSheet, 1, 9)
sprite.add (conveyorSet, “conveyor”, 1, 9, 1000, 0)
popStone[i] = sprite.newSprite( conveyorSet )
popStone[i]:prepare( conveyorSet )
popStone[i]:play( conveyorSet )

In the sprite.add line, I currently have 1000 (which assume plays the full set of frames in 1000 ms).

However, if I change that number (I’ve tried 100, 300, 1500, 5000, 10000) the animation plays no differently each time. (No faster / slower)
Does this value not actually do anything / work or am I doing something wrong when trying to modify it?

Thanks!
Danny [import]uid: 131942 topic_id: 25865 reply_id: 325865[/import]

Ah wait - sorry!
Just figured it!

popStone[i]:prepare( “conveyor” )
popStone[i]:play( )
Sorry for the trouble! :slight_smile: [import]uid: 131942 topic_id: 25865 reply_id: 104600[/import]

No trouble for anyone - thank you for posting your answer, it will help others in the future.

Peach :slight_smile: [import]uid: 52491 topic_id: 25865 reply_id: 104623[/import]