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
Player death event
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#2
RE: Player death event

Use Checkpoints, and define what you would like to occur as an event in the CheckPoint callback. You can also make a DeathHint in your lang file which doesn't have any associated text, so that when you die, you'll momentarily see a black screen before the CheckPoint callback occurs.

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.
Callback syntax: void MyFunc(string &in asName, int alCount)
Count is 0 on the first checkpoint load!

asName - the internal name
asStartPos - the name of the StartPos in the editor
asCallback - the function to call when the player dies/respawns
asDeathHintCat - the category of the death hint message to be used in the .lang file
asDeathHintEntry - the entry in the .lang file

Discord: Romulator#0001
[Image: 3f6f01a904.png]
(This post was last modified: 04-02-2018, 03:16 AM by Romulator.)
04-02-2018, 03:13 AM
Find


Messages In This Thread
Player death event - by User01 - 04-01-2018, 09:09 PM
RE: Player death event - by Romulator - 04-02-2018, 03:13 AM
RE: Player death event - by User01 - 04-02-2018, 12:35 PM



Users browsing this thread: 1 Guest(s)