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
Help with grunt maze pathfinding?
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#2
RE: Help with grunt maze pathfinding?

Here. This was a script made by Kyle S.
void OnStart()
{
AddEntityCollideCallback("Player", "PlayerCollide", "MonsterFunction", true, 1);
AddEntityCollideCallback("servant_grunt_1", "PNScriptArea", "MonsterFunction2", false, 1);
}
void MonsterFunction2()
{
for (int i = 1; i <6; i++)
{
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_"+i, 0, "");
}
}
void MonsterFunction(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_1",true);
for (int i = 1; i <11; i++)
{
int x;
switch( i )
{
case 0:
x = 2;
break;
case 10:
x = 4;
break;
default
x = 0;
}
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_"+i, x, "");
}
}

Please note that the monster will NOT stop unless you deactivate it.

"Veni, vidi, vici."
"I came, I saw, I conquered."
(This post was last modified: 04-07-2013, 06:43 AM by PutraenusAlivius.)
04-07-2013, 06:42 AM
Find


Messages In This Thread
Help with grunt maze pathfinding? - by zergling50 - 04-06-2013, 09:08 PM
RE: Help with grunt maze pathfinding? - by PutraenusAlivius - 04-07-2013, 06:42 AM
RE: Help with grunt maze pathfinding? - by NaxEla - 04-11-2013, 07:55 AM
RE: Help with grunt maze pathfinding? - by GrAVit - 06-12-2013, 07:59 AM
RE: Help with grunt maze pathfinding? - by GrAVit - 06-13-2013, 10:02 PM



Users browsing this thread: 1 Guest(s)