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
Enemy Patrol
Jumpman Offline
Junior Member

Posts: 31
Threads: 10
Joined: May 2011
Reputation: 0
#1
Solved: 8 Years, 2 Months ago Enemy Patrol

I cant get the enemy to patrol the path I made, he just stands there after he spawns..

In the editor I used pathnode from the monster to the end..

The scripting is..

void OnStart()
{

AddEntityCollideCallback("Player", "EnemyTrigger", "CollideEnemyTrigger", true, 0);

AddEntityCollideCallback("Infected", "EnemyEnd", "GruntEndMusic", true, 1);

}

void OnEnter()
{
}

void CollideEnemyTrigger(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Infected", true);
GiveSanityDamage(0, true);
}

void EnemyFunction(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Infected", true);
AddEnemyPatrolNode("Infected", "PathNodeArea_1", 0.0f, "");
AddEnemyPatrolNode("Infected", "PathNodeArea_123", 0.0f, "");
}

void OnLeave()
{
}


So what Im I doing wrong? Plz help.
Thx
05-13-2011, 01:05 PM
Find
Tanshaydar Offline
From Beyond

Posts: 3,085
Threads: 17
Joined: Mar 2009
Reputation: 67
#2
Solved: 8 Years, 2 Months ago RE: Enemy Patrol

You didn't call 'EnemyFunction' anywhere in your script.
And this is the technical issues forum, you should post your questions in Custom Stories forum.

05-13-2011, 01:10 PM
Website Find
Jumpman Offline
Junior Member

Posts: 31
Threads: 10
Joined: May 2011
Reputation: 0
#3
Solved: 8 Years, 2 Months ago RE: Enemy Patrol

Yes I have it under OnEnter.

aah sorry.. I will put it up there instade
05-13-2011, 01:14 PM
Find




Users browsing this thread: 1 Guest(s)