Player Respawn

In the tutorial, when the player dies the Main Menu screen loads, and when you click play you restart the first level. But for example, if I die on my second level, I get to the Main Menu screen, and restart, but on the first level. I am a complete beginner, so I dont know what I should do, but how do I respawn at my current level?

Hi FN2187,

I’m not sure how far along you are, have you came across the singleton pattern yet? If so I would implement a singleton object that keeps track how far you progressed in the game, then when you press start in the main menu it can load further into the game with the saved state in the Singleton.

If you feel this is beyond your scope I would recommend you put this on the back burner for now and press on through the coarse then when you pick up some new skills come back and implement this behavior.

I hope this was helpful

Thank you for your reply!
I haven’t heard of it yet, but I will do some research, and maybe I will be able to implement that into my game. If not I just have to find another way :slight_smile:

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms