|
In my game I would like to setup a system where if the player dies it will take them back to the position they were before they died and the walls rotated in the position they were before death since the premise of the game is to rotate walls to get from point a to b. For the save and load system I wanted to make it so the player can save at the end of a stage and load the beginning of a level if they leave/quit the game. I'm working in javascript. If anyone could help with that it would be apperciated.
(comments are locked)
|
|
http://answers.unity3d.com/questions/8480/how-to-scrip-a-saveload-game-option.html or http://docs.unity3d.com/Documentation/ScriptReference/PlayerPrefs.html for saving game. Now for the respawn of the player. Place some trigger boxes around the level where you want to checkpoint add this. On the player add a variable: On the trigger boxes When the player enters the box, the box position is assigned to the variable. Now back on the player: I assume your player start at 0,0,0 but obviously you know what to do. If your player reaches 0 for health, he is sent to checkpointPosition. Thanks alot
Aug 09 '12 at 03:54 PM
avalon45
(comments are locked)
|
|
pleez i want to ask . i have the same problem as u and i wante to use Application.LoadLevel(); when the player die . and respown in the position of last chek points ( use application.loadlevel to make my enemys disappertre) can i use it with the chek points??
(comments are locked)
|
