Frictional Games Forum (read-only)
Patrol Node Help - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: Patrol Node Help (/thread-5140.html)



Patrol Node Help - ThePaSch - 10-21-2010

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:

Code:
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, "");
}



RE: Patrol Node Help - Zergalag - 10-21-2010

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.


RE: Patrol Node Help - Pandemoneus - 10-21-2010

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


RE: Patrol Node Help - ThePaSch - 10-21-2010

(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


RE: Patrol Node Help - Zergalag - 10-21-2010

Glad to be of service. Smile


RE: Patrol Node Help - Cellrage - 10-26-2010

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.


RE: Patrol Node Help - house - 10-29-2010

(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.


RE: Patrol Node Help - ThePaSch - 10-30-2010

(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