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
Checkpoint when the player enters an area?
oscar1007 Offline
Member

Posts: 64
Threads: 24
Joined: Oct 2011
Reputation: 0
#1
Checkpoint when the player enters an area?

Hello!

Does anyone know how to make it?
So far i have only made a script area where the "checkpoint" is going to happen.

Someone help me?

Money can't buy you happiness. But I rather cry in my ferrari.

PROJECT:
http://www.moddb.com/mods/oscar1007
(This post was last modified: 01-19-2012, 03:53 PM by oscar1007.)
01-19-2012, 03:32 PM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#2
RE: Checkpoint when the player enters an area?

(01-19-2012, 03:32 PM)oscar1007 Wrote: Hello!

Does anyone know how to make it?
So far i have only made a script area where the "checkpoint" is going to happen.

Someone help me?
void OnStart()
{
AddEntityCollideCallback("Player", "checkpoint", "CheckPointActive", true, 1);
}

void CheckPointActive(string &in asParent, string &in asChild, int alState)
{
CheckPoint (string& asName, string& asStartPos, string& asCallback, string& asDeathHintCat, string& asDeathHintEntry);
}


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


Need more help just ask.



01-19-2012, 03:51 PM
Find
oscar1007 Offline
Member

Posts: 64
Threads: 24
Joined: Oct 2011
Reputation: 0
#3
RE: Checkpoint when the player enters an area?

(01-19-2012, 03:51 PM)flamez3 Wrote:
(01-19-2012, 03:32 PM)oscar1007 Wrote: Hello!

Does anyone know how to make it?
So far i have only made a script area where the "checkpoint" is going to happen.

Someone help me?
void OnStart()
{
AddEntityCollideCallback("Player", "checkpoint", "CheckPointActive", true, 1);
}

void CheckPointActive(string &in asParent, string &in asChild, int alState)
{
CheckPoint (string& asName, string& asStartPos, string& asCallback, string& asDeathHintCat, string& asDeathHintEntry);
}


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


Need more help just ask.
Great man! Smile

Money can't buy you happiness. But I rather cry in my ferrari.

PROJECT:
http://www.moddb.com/mods/oscar1007
01-19-2012, 03:53 PM
Find




Users browsing this thread: 1 Guest(s)