- Home /
Activate/De-Activate?
Hello. I am trying to figure out a respawn system for my game. It is fast paced (like Geometry wars) so when the player looses a life (I already have the life system in place) I want the player and enemies to be hidden from view for a second or two, play and respawn and then reactivate the player and enemies.
The problem is where I have the live system script, it is attached to the player object. If I de-activate the object when the player looses a life, wont it deactivate the re-activation script (its like having a computer turn itself back on when its been unplugged).
How can I make this happen (If I didnt make sense, I want the respawn system to work like this: http://www.youtube.com/watch?v=LcN3uvXbCIM&feature=related) Thanks.
Answer by Eric5h5 · Nov 24, 2010 at 06:10 AM
Attach the life system script to an object that isn't deactivated.
$$anonymous$$y life system works by detecting a collision with the player object with an object with an "enemy tag" so the way I have it set up, the life system has to be attached the player object (which is the object I want to deactivate/hide/etc.)
@Tyler: re-write it so it doesn't have to be attached to the player object.