Im trying to make a deathscene, what code could i use to load the last scene the player was one before he died
if i reload the scene it will only reload the deathscene. can anynone help
You could just create a static variable that saves either the index or the name of the scene you died on. Then at the end of the deathscene, just access the static variable and load that scene again.
1 Like
so how would i do that would i do that, sorry im new to coding
It really depends on your existing code. You probably have some method which you call which the player dies. In there you save the current scene to this static variable. When you want to return to to that scene, you use the same static variable to get the correct scene. Post all the relevant code and someone can show you if you still don’t understand.