Hi,
I have what I think should be a simple problem. I would like to have a sprite of a coin that would randomly animates, this is my attempt
local coin_image = sprite.newSprite(sprite.newSpriteSet(sprite.newSpriteSheet(“shiny_coin.png”, 32, 32), 1, 5))
local function glimmer(event)
if math.random(3) == 1 then
coin_image:play()
end
end
timer.performWithDelay(1000, glimmer, 0)
all I want is when I hit play, it would play once, and when the randomness hits, it would play again. Is this the correct way of doing it? [import]uid: 11334 topic_id: 4136 reply_id: 304136[/import]