- Home /
How to implement a respawn/lives system in Space Shooter (the tutorial game)?
Hello I've been following along with the excellent tutorial for Space Shooter. I'm mostly finished with the game but I wanted to try to add more things to it to give it a much more finished feeling! This includes a lives system, power-ups, scrolling background, menu, different looking levels, etc. etc.
I'm trying to implement a lives system right now. Basically, having a limited amount of lives and when it reaches player.lives == 0, the GameOver() method is called.
I've tried a couple of different things, including creating an IEnumerator method for respawning in GameController, and that didn't seem to work too well since I try to Instantiate the game object after destroying it and Unity tells me there's no Object associated with the variable anymore... so I am a little bit confused.
Anyone have any tips for implementing this?
Thanks!
Your answer
Follow this Question
Related Questions
Space Shooter Tutorial - Player Respaner: IEnumerator not executing all code , 1 Answer
OnTriggerEnter Not working in sample project 2 Answers
Problems with respawn and camera disable after instantiation ..? Help please 0 Answers
space shooter tutorial creating shots problem 2 Answers
Space Shooter - NullReferenceException on Scene Reload 0 Answers