yeah I stated in the other thread, I went back to using texplosion, since it can handle multiple explosions using the same fields of the type.
When the missile impacts, create an explosion object and set it's x/y to the missile x/y. Then you can delete the missile but still have the explosion.
i actually already have the explosion object instanced in the type, i globaled it. and i have it called in the loop. exobject.explodeship()
to do an explosion of a ship when hit = true.
But you are saying that ON impact, of if impact, (on collision :) then create an explosion object, do its animation and then delete itself. better memory management? But is it that abd when I only have two objects for explosion anyway? Guess for simple stuff like this it isn't, but the practice is good to do it that way right.
also I used hit as a global just to finish it and test the animation and stuff make sure it was working before I changed it. :)
there are a couple of booleans which I have declared as global in my globals.bmx to control the life and death of the player, such as playing... dead... etc, is that oK? because i have some functions which need to know the state of those conditions, so they can do what I want them to do, based on whether the player is alive or dead.
I guess I can put HIT in a field in the explosion type, and put if object.hit = true in my function.