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
May someone please help?
triadtimes Offline
Senior Member

Posts: 508
Threads: 16
Joined: Jan 2011
Reputation: 21
#2
RE: May someone please help?

If the area the player is walking into is called "ScriptArea_1" then that should be the second part of AddEntityCollideCallback, not the third. Also your third would then be called PlayerCollide (or whatever) and so would the function to call.

Also make sure to call the functions different names.

void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "PlayerCollide", true, 1);
}

void PlayerCollide(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_brute_1", true);
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_1", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_5", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_6", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_7", 0, "");
AddEntityCollideCallback("Player", "ScriptArea_2", "PlayerCollide2", true, 1);
}

void PlayerCollide2(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_8", 0, "");
}

(This post was last modified: 12-15-2011, 03:31 AM by triadtimes.)
12-15-2011, 03:30 AM
Find


Messages In This Thread
May someone please help? - by spamqad - 12-15-2011, 03:15 AM
RE: May someone please help? - by triadtimes - 12-15-2011, 03:30 AM
RE: May someone please help? - by spamqad - 12-15-2011, 03:41 AM



Users browsing this thread: 1 Guest(s)