![]() |
Resetting a Map or an Entity? - 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) +--- Thread: Resetting a Map or an Entity? (/thread-53838.html) |
Resetting a Map or an Entity? - Umukzus - 08-02-2017 Hello, I currently try to create a chase&Puzzle Sequence and I could need some help: In order to complete the Puzzle, the Enemy must still be present but if the Player dies he will get stuck and cannot continue... Is there a way to respawn the Enemy or Reset the Map so that the Player can try once more upon diing? RE: Resetting a Map or an Entity? - TimProzz - 08-02-2017 Code: void CheckPoint (string& asName, string& asStartPos, string& asCallback, string& asDeathHintCat, string& asDeathHintEntry); With the checkpoint you can also call a function after the player dies. In that checkpoint function you can for example reset some entities with: Code: void ResetProp(string& asName); And you can just use Code: SetEntityActive("enemy_name", true); RE: Resetting a Map or an Entity? - DanielRand47 - 08-03-2017 You can also use a local variable to keep track of the number of deaths. If the death value is greater than or equal to 1, then call any functions to reset props or enemies. Hope this helps. ![]() RE: Resetting a Map or an Entity? - Umukzus - 08-03-2017 Thanks for Responses, I will try things out |