Shoot. The code made the tiles pulsate, but it crashes the simulator within 20 seconds. I have a total of 35 tiles in a table (hence the [t+1] stuff). Thinking I’ll have to try a different approach (it’s a game for small kids, so I want to make it very clear what their movement options are). But it surprises me that it crashes the system. How do others put blinking lights and other continuously animated efx into their code?
Here’s what I used:
[code]
local pulsate_on – forward references
local pulsate_off – so functions can see each other
function pulsate_off( ) – still local due to forward reference
transition.to( obj.gameTile[t+1], {time=500, alpha = .5, onComplete=pulsate_on})
transition.to( obj.gameTile[t-1], {time=500, alpha = .5, onComplete=pulsate_on})
transition.to( obj.gameTile[t+5], {time=500, alpha = .5, onComplete=pulsate_on})
transition.to( obj.gameTile[t-5], {time=500, alpha = .5, onComplete=pulsate_on})
end
function pulsate_on( ) – still local due to forward reference
transition.to( obj.gameTile[t+1], {time=500, alpha = 1, onComplete=pulsate_off})
transition.to( obj.gameTile[t-1], {time=500, alpha = 1, onComplete=pulsate_off})
transition.to( obj.gameTile[t+5], {time=500, alpha = 1, onComplete=pulsate_off})
transition.to( obj.gameTile[t-5], {time=500, alpha = 1, onComplete=pulsate_off})
end
pulsate_off( )
[/code] [import]uid: 25480 topic_id: 7229 reply_id: 25846[/import]