Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
hpl2:tutorials:scripting:checkpoints_using_scriptarea_s [2012/09/16 10:35] steve |
hpl2:tutorials:scripting:checkpoints_using_scriptarea_s [2012/09/16 10:45] steve |
||
---|---|---|---|
Line 20: | Line 20: | ||
- | void OnStart() | + | |void OnStart() \\ { \\ AddEntityCollideCallback(“Player”, “ScriptArea_1”, “Restart”, true, 1); \\ } \\ \\ void Restart(string &in asParent, string &in asChild, int alState) \\ { \\ CheckPoint (“FirstCheckpoint”, “PlayerStartArea_1”, “Happening”, “DeathCategory”, “Deathtext”); \\ } \\ \\ void Happening(string &in asName, int alCount) \\ { \\ /Stuff you want to happen after you die///// \\ //}// | |
- | + | ||
- | + | ||
- | { | + | |
- | + | ||
- | + | ||
- | AddEntityCollideCallback("Player", "ScriptArea_1", "Restart", true, 1); | + | |
- | + | ||
- | + | ||
- | } | + | |
- | + | ||
- | + | ||
- | void Restart(string &in asParent, string &in asChild, int alState)\\ | + | |
- | {\\ | + | |
- | CheckPoint ("FirstCheckpoint", "PlayerStartArea_1", "Happening", "DeathCategory", "Deathtext");\\ | + | |
- | } | + | |
- | + | ||
- | + | ||
- | void Happening(string &in asName, int alCount)\\ | + | |
- | { | + | |
- | + | ||
- | + | ||
- | /Stuff you want to happen after you die./// // | + | |
- | + | ||
- | + | ||
- | //} // | + | |
Line 51: | Line 26: | ||
- | <//LANGUAGE> // | + | |<//LANGUAGE> // \\ <//CATEGORY Name="DeathCategory">// \\ <//Entry Name="Deathtext">Text you want in the black screen after you die// <///Entry> \\ // //// <///CATEGORY> // \\ <///LANGUAGE> // \\ | |
- | + | ||
- | + | ||
- | <//CATEGORY Name="DeathCategory">// | + | |
- | + | ||
- | + | ||
- | <//Entry Name="Deathtext">Text you want in the black screen after you die// <///Entry>\\ | + | |
- | // <///CATEGORY> // | + | |
- | <///LANGUAGE> // | + | //Now if you die you respawn at the PlayerStartArea you created. // \\ |
- | //Now if you die you respawn at the PlayerStartArea you created. // | + | \\ |