New answers tagged


I'm assuming you have issues with the scope of the variable since you simply say 'It doesn't work'. I'm not familiar with Lua, but I'd go with something like this: local function spawnGrupo1() local numero = math.random(1, 3) local color01 if numero == 1 then color01 = display.newImage("assets/img/enemigos/blue.png") end if numero == 2 then ...

Top 50 recent answers are included