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
Just a quick simple question!
Khyrpa Offline
Senior Member

Posts: 638
Threads: 10
Joined: Apr 2011
Reputation: 24
#4
RE: Just a quick simple question!

So to try and put this simple...

CheckPoint (string& asName, string& asStartPos, string& asCallback, string& asDeathHintCat, string& asDeathHintEntry);

When you put this inside the void OnStart()
The next time the player dies, that function is ran.
So to make things happen after the player dies you can use the asCallback.
example script:

void OnStart() //I just changed things to happen right when the map is ran
{CheckPoint ("", "NameOfSomeStartPos", "RespawnMonster", "", "");
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 1, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 4, "2");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 3, "2");

}
void RespawnMonster(string &in asName, int alCount)
{SetEntityActive("servant_grunt_1", true); //when player dies, the monster is spawned again
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 1, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 4, "2");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 3, "2");

}

You can do all neat stuff with the checkpoints, like making the player wake up on an unknown place or change the path of the grunt.
(hope you like my color coding!)

09-17-2011, 09:25 AM
Find


Messages In This Thread
Just a quick simple question! - by RainbowDash - 09-17-2011, 12:32 AM
RE: Just a quick simple question! - by Khyrpa - 09-17-2011, 12:39 AM
RE: Just a quick simple question! - by Khyrpa - 09-17-2011, 09:25 AM
RE: Just a quick simple question! - by Khyrpa - 09-17-2011, 04:57 PM



Users browsing this thread: 1 Guest(s)