I wanted to try making a level for this great game, but ran into some problems. To see what happened in the level from the very start I wanted to make all the asteroids visible. After creating the asteroids I tried running the following code.
id = 0
while GetAsteroid(id) ~= nil do
GetAsteroid(id):Reveal(1)
id = id + 1
end
However, the not equal to nil check doesn't seem to work. The id reaches a value not used and I get a "index was out of range" error. I also tried adding "if GetAsteroid(id) == nil then break end" inside the loop, but that didn't help either. An explicit loop from 0 up to the last index works without problems.