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
Why is my custom story not working!?!?!?
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#13
RE: Why is my custom story not working!?!?!?

There's...a lot wrong.

I'm tired, so to sum it up:
-After OnStart you used a parentheses and a comma to end it
-The second AddEntityCollideCallback needs one more string argument to set the name of the function it will call
-The third AddEntityCollideCallback seems to be the same as the first, except with some really messed up part on the end.

With that said, here you go:
Spoiler below!


///////////////////////
// Run when starting map
void OnStart()
{
PlayMusic("01_amb_darkness.ogg", true, 1.0f, 0, 0, true);
AddEntityCollideCallback("Player", "PlayerCollide", "MonsterFunction", true, 1);
AddEntityCollideCallback("Player", "MonsterEnd", "FUNCTION_TO_CALL", true, 1);
}

void MonsterFunction(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_Grunt_1", "PathNodeArea_1", 2, "");
AddEnemyPatrolNode("servant_Grunt_1", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("servant_Grunt_1", "PathNodeArea_3", 0, "");
}

//////////////////////
// Run when leaving map
void OnLeave()
{


}


Hope that helped

I rate it 3 memes.
(This post was last modified: 12-03-2012, 06:23 PM by Adny.)
12-03-2012, 06:22 PM
Find


Messages In This Thread
RE: Why is my custom story not working!?!?!? - by Adny - 12-03-2012, 06:22 PM



Users browsing this thread: 7 Guest(s)