Page 1 of 1

Respawn same place on restart

Posted: Sun Nov 14, 2021 1:19 pm
by hrohibil
Hello Toni

In this script':

Code: Select all

  private void ReloadOnDeath(GameObject player)
    {
        if (SaveSystem.HasSavedGameInSlot(checkpointSaveSlot))
        {
            SaveSystem.LoadFromSlot(checkpointSaveSlot);
        }
        else
        {
            // Show load game menu? Go to main menu? etc. (Add your code)
        }
    }
}
How can i controll it to respawn at the first/staring point on death? Right now if he dies at the begining he respawns from a save game else where.

thanks

Re: Respawn same place on restart

Posted: Sun Nov 14, 2021 1:35 pm
by Tony Li
You can use some of Invector's original code for that method.