Hm yes, I do need to destroy the ships after their transitions have ended, though I need to make sure they can be reused where I think I had errors previously when I set them to nil.
I adjusted the code to include
[lua]function destroyEnemy()
enemy:removeSelf()
–
easyStart()
end [/lua]
and it works as I want it to …at least for a while until it crashes
Now I want to use this code
[lua]timer.performWithDelay( 1000, destroyEnemy )[/lua]
but where would you suggest I put it, as it’s causing this error:
EDIT: Never mind, seems I had another variable called ‘timer’ which was causing the errors. Thank you both for helping me