Frictional Games Forum (read-only)

Full Version: Reset puzzle
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So i have this puzzle i created working perfect that has a 60 second timer and if you run out of time a brute will enter the room and kill you. i have a working checkpoint that respawns the player, problem is i dont know how to reset the item's, enemy and timer and so on..

How to do this?
In the callback for respawning, you must set values back to normal. You can kill the timer using RemoveTimer("internalname"); and you can re-enable the brute with SetEntityActive("brute", true);

If your puzzle uses variables, you must remember to set them to a working state.

You can maybe use CreateEntityAtArea to spawn items back, and use SetEntityActive on other entities to disable them as well as RemoveItem from the inventory.
I think that if you add this in your checkpoint funcion it should work:

AddTimer("", 60, "Timer_Brute");

Obviously, change the names as you may.