Maybe i want to sleep, but still i have a probably stupid question)
i’m trying to spawn a 5 “fires” and one of them is transitioning to x = 300
and i’m trying to remove it upon passing x=200, but it doesnt work, so please help me, what i done wrong?
[lua]local fires = {}
for i=1,5 do
local fire = display.newRect(0,0,20,10)
fire.x = 10
fires[i] = fire
fire.y = math.random(10,300)
transition.to(fires[1],{time=3000, x = 300})
end
local function collect()
for i=1, #fires do
if fires[i].x > 200 then
fires[i]:removeSelf()
end
end
end
Runtime:addEventListener(“enterFrame”, collect)[/lua]
its kinda work, but terminal is cursing me with errors)
any help is good) [import]uid: 16142 topic_id: 16705 reply_id: 316705[/import]