hey guys I’m trying to make a function that will spawn and move sprites
local function spawnBerry( event )
local berry = display.newImageRect("Berry.png", 50, 60)
berry.x, berry.y = math.random(50, 420), math.random(1, 300)
berry.x = berry.x - 1 -- Moves berry
end
timer.performWithDelay(500, spawnBerry, 99999999999999)
There is my code and the line that says (Moves Berry) obviously isn’t doing its job. I’m a newbie to lua and to corona. So any help on how I could get the berry to move would be great
THANKS! [import]uid: 86506 topic_id: 14632 reply_id: 314632[/import]