Here you go. Let me give you a preface.
I have multiple lots of ships. These ships are in tables with their coordinates. Some have 4 some more. So I spawn a lot of ships. Each ship should have a delay of being spawned by “tempoHalf” which is my time variable. Once all of them are spawned it goes to the nextlot().
My tables are called: lt1, lt2 etc.
I am having a problems in two spots. I labeled them in the code.
Thanks for your help.
function spawnLot (lotCounter)
lot = "lt"..lotCounter -- I am having problems here. I don't think my syntax is right
local lot = "lt"..lotCounter
onScreen =#lot
for n=1,#lot do
x,y = lot[n][1],lot[n][2]
x=x+25
y=y+16
ship.new(x,y)
--Need to put a time delay
--timer.performWithDelay(tempoHalf, ship.new(x,y) ,onScreen)
end
nextLot ()
end
[import]uid: 8192 topic_id: 2330 reply_id: 7127[/import]