Frictional Games Forum (read-only)
Reset puzzle - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Reset puzzle (/thread-25610.html)



Reset puzzle - Rowzter - 07-04-2014

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?


RE: Reset puzzle - Mudbill - 07-04-2014

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.


RE: Reset puzzle - The chaser - 07-05-2014

I think that if you add this in your checkpoint funcion it should work:

ResetProp("Brute");
ResetProp("Item");
AddTimer("", 60, "Timer_Brute");

Obviously, change the names as you may.