Hi,
in my game there are several checkpoints. If the player dies he will return to the last checkpoint. How should i reset all other scripts?(enemies,environments…) …sendmessage doesnt work because all scripts are not attached only to one gameobject.
how do you get your player to return to the last checkpoint? doing a car racing game where i want the same thing. thanks
You could probably use GetComponents(GameObject) to broadcast a message to every object in the game.
Or you could create a static boolean variable in a Master script, and have each script check it’s status:
if (Master.characterDead){ //do something }