Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Patrol Node Help
ThePaSch Offline
Member

Posts: 108
Threads: 11
Joined: Sep 2010
Reputation: 0
#1
Patrol Node Help

Hi,
I set up a path for a grunt and also placed the correct script into the file.
The monster also walks that path just perfectly. The problem is: Instead of disappearing after the last pathnode, it just walks through the entire patrol again, even when it doesn't see me (because I'm hiding in a closet).
Here's the script:

void OnStart()
{
StopMusic(3.0f, 0);
PlaySoundAtEntity("", "door_level_cellar_close.snt", "level_celler_1", 0, false);
PlayMusic("01_amb_darkness.ogg", true, 80, 1, 0, false);
CompleteQuest("00Investigate","00Investigate");  
AddEntityCollideCallback("Player", "activateScare", "ScareZoneEnable", true, 1);
AddEnemyPatrolNode("cellargrunt", "cellar_pn1", 0, "");
AddEnemyPatrolNode("cellargrunt", "cellar_pn2", 0, "");
AddEnemyPatrolNode("cellargrunt", "cellar_pn3", 0, "");
AddEnemyPatrolNode("cellargrunt", "cellar_pn4", 0, "");
AddEnemyPatrolNode("cellargrunt", "cellar_pn5", 0, "");
AddEnemyPatrolNode("cellargrunt", "cellar_pn6", 0, "");
AddEnemyPatrolNode("cellargrunt", "cellar_pn7", 0, "");
AddEnemyPatrolNode("cellargrunt", "cellar_pn8", 0, "");
}
10-21-2010, 06:17 PM
Find
Zergalag Offline
Junior Member

Posts: 6
Threads: 0
Joined: Oct 2010
Reputation: 0
#2
RE: Patrol Node Help

I had this problem once too, but the solution was to make it go farther then before. I think you can't be able to hear it either, for it to disappear.
10-21-2010, 06:28 PM
Find
Pandemoneus Offline
Senior Member

Posts: 328
Threads: 2
Joined: Sep 2010
Reputation: 0
#3
RE: Patrol Node Help

If everything fails you can create a script area and add a collide callback with the grunt to make it disappear.

10-21-2010, 06:45 PM
Find
ThePaSch Offline
Member

Posts: 108
Threads: 11
Joined: Sep 2010
Reputation: 0
#4
RE: Patrol Node Help

(10-21-2010, 06:28 PM)Zergalag Wrote: I had this problem once too, but the solution was to make it go farther then before. I think you can't be able to hear it either, for it to disappear.

Thanks, that worked. Smile

Also thanks to you, Pandemoneus. Wink
10-21-2010, 07:16 PM
Find
Zergalag Offline
Junior Member

Posts: 6
Threads: 0
Joined: Oct 2010
Reputation: 0
#5
RE: Patrol Node Help

Glad to be of service. Smile
10-21-2010, 07:20 PM
Find
Cellrage Offline
Junior Member

Posts: 4
Threads: 0
Joined: Oct 2010
Reputation: 0
#6
RE: Patrol Node Help

One thing you should know about patrol nodes is that they will auto-link if there is a clear path between them. This means that you aren't required to add every node you want your enemy to path to, only the ones where you want him to pause or finish patrolling.

In an example, you want the enemy to path from Point A to Point C. Instead of adding a script like this:

Quote:AddEnemyPatrolNode("Enemy", "Point_A", 0, "");
AddEnemyPatrolNode("Enemy", "Point_B", 0, "");
AddEnemyPatrolNode("Enemy", "Point_C", 0, "");

You could instead do this:

Quote:AddEnemyPatrolNode("Enemy", "Point_A", 0, "");
AddEnemyPatrolNode("Enemy", "Point_C", 0, "");

Assuming A, B and C ar linear, they will auto-link, and the enemy will path seamlessly from Point A to Point C without stopping at Point B.
10-26-2010, 02:28 AM
Find
house Offline
Member

Posts: 195
Threads: 11
Joined: Oct 2010
Reputation: 1
#7
RE: Patrol Node Help

(10-21-2010, 06:17 PM)ThePaSch Wrote: The problem is: Instead of disappearing after the last pathnode, it just walks through the entire patrol again.

What? Thats odd. I made a fun level and when the grunt came to his last patrol node, he disappeared. I was acculty close to him too.
10-29-2010, 03:13 PM
Find
ThePaSch Offline
Member

Posts: 108
Threads: 11
Joined: Sep 2010
Reputation: 0
#8
RE: Patrol Node Help

(10-26-2010, 02:28 AM)Cellrage Wrote: Assuming A, B and C ar linear, they will auto-link, and the enemy will path seamlessly from Point A to Point C without stopping at Point B.
If they're linear, you could leave out point B entirely as well. Rolleyes
10-30-2010, 03:13 PM
Find




Users browsing this thread: 3 Guest(s)