Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Resetting a Map or an Entity?
Umukzus Offline
Junior Member

Posts: 5
Threads: 3
Joined: Aug 2017
Reputation: 0
#1
Question  Resetting a Map or an Entity?

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?
(This post was last modified: 08-02-2017, 08:49 PM by Umukzus.)
08-02-2017, 08:02 PM
Find
TimProzz Offline
Junior Member

Posts: 23
Threads: 8
Joined: May 2016
Reputation: 0
#2
RE: Resetting a Map or an Entity?

void CheckPoint (string& asName, string& asStartPos, string& asCallback, string& asDeathHintCat, string& asDeathHintEntry);
Sets a checkpoint at which the player will respawn in case he dies.

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:

void ResetProp(string& asName);
Resets a prop's state to the original one when the map was loaded.

And you can just use
SetEntityActive("enemy_name", true);
again on the same enemy to spawn it again

Mod I'm working on: Illusions of the Dead 2
ModDB Illusions of the Dead 2
(This post was last modified: 08-03-2017, 12:38 AM by TimProzz.)
08-02-2017, 11:00 PM
Find
DanielRand47 Away
Member

Posts: 109
Threads: 16
Joined: Mar 2012
Reputation: 3
#3
RE: Resetting a Map or an Entity?

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. Smile
08-03-2017, 02:19 AM
Find
Umukzus Offline
Junior Member

Posts: 5
Threads: 3
Joined: Aug 2017
Reputation: 0
#4
RE: Resetting a Map or an Entity?

Thanks for Responses, I will try things out
08-03-2017, 02:11 PM
Find




Users browsing this thread: 1 Guest(s)