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


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

Posts: 5
Joined: Aug 2017
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
TimProzz Offline
Junior Member

Posts: 13
Joined: May 2016
Reputation: 0
Post: #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
ModDB Illusions of the Dead
(This post was last modified: 08-03-2017 12:38 AM by TimProzz.)
08-02-2017 11:00 PM
Find all posts by this user Quote this message in a reply
DanielRand47 Away
Member

Posts: 109
Joined: Mar 2012
Reputation: 3
Post: #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 all posts by this user Quote this message in a reply
Umukzus Offline
Junior Member

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

Thanks for Responses, I will try things out
08-03-2017 02:11 PM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)