Frictional Games Forum (read-only)
[LVL ED] Monster Path 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 - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: [LVL ED] Monster Path Help (/thread-12269.html)

Pages: 1 2 3 4


RE: Monster Path Help - eagledude4 - 01-11-2012

(01-11-2012, 10:45 PM)Statyk Wrote: Tip. Go into the level editor and to the enemy. go to it's "Entity" tab and make sure "DisableTriggers" is CHECKED. He will not go after the player or react to sounds n matter what.
That's something that I needed to know, thank you. But will he react to me entering an area? so that after I trigger the function, I can watch him?





RE: Monster Path Help - Statyk - 01-11-2012

(01-11-2012, 10:48 PM)eagledude4 Wrote:
(01-11-2012, 10:45 PM)Statyk Wrote: Tip. Go into the level editor and to the enemy. go to it's "Entity" tab and make sure "DisableTriggers" is CHECKED. He will not go after the player or react to sounds n matter what.
That's something that I needed to know, thank you. But will he react to me entering an area? so that after I trigger the function, I can watch him?
No. As long as an enemy has the "DisableTriggers" activated, he will ignore the player forever, even if you throw things at him.


RE: Monster Path Help - eagledude4 - 01-11-2012

(01-11-2012, 10:45 PM)Statyk Wrote: No. As long as an enemy has the "DisableTriggers" activated, he will ignore the player forever, even if you throw things at him.

What I meant was, will he ignore script functions TRIGGERED by the player, not the player itself.

Edit: I just watched him walk the path without entering one of the areas. he seems to walk wherever he wants to. The code is like this:

AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_5", 0, "");

those are the path nodes he's supposed to walk before the player enters an area. But then he continues down one of the hallways. then repeats it in a loop.





RE: Monster Path Help - Statyk - 01-11-2012

(01-11-2012, 10:53 PM)eagledude4 Wrote:
(01-11-2012, 10:45 PM)Statyk Wrote: No. As long as an enemy has the "DisableTriggers" activated, he will ignore the player forever, even if you throw things at him.

What I meant was, will he ignore script functions TRIGGERED by the player, not the player itself.

Edit: I just watched him walk the path without entering one of the areas. he seems to walk wherever he wants to. The code is like this:

AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_5", 0, "");

those are the path nodes he's supposed to walk before the player enters an area. But then he continues down one of the hallways. then repeats it in a loop.
Is he colliding into areas that are telling him to follow other nodes? or are the nodes in the script placed incorrectly?


RE: Monster Path Help - eagledude4 - 01-11-2012

I don't believe so. I used this image to place my nodes:
http://img192.imageshack.us/img192/8740/pic3ms.jpg

1 & 5 are the nodes in the purple area, 1 being the bottom, 5 being the top. He then proceeds down the left hallway when nothing in the script tells him to do so unless the room on the left is entered (which I didn't).




RE: Monster Path Help - Statyk - 01-11-2012

void EnteredEnemyTriggerArea(string &in asParent, string &in asChild, int alState) {
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_5", 0, "");
if (asChild == "SonRoomArea") {
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_9", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_13", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_15", 8, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_13", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_9", 0, "");
} else if (asChild == "DadRoomArea") {
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_24", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_27", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_30", 8, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_27", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_24", 0, "");
}
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_5", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_31", 0, "");

}




Is the bold area screwing it up?


RE: Monster Path Help - eagledude4 - 01-11-2012

That's probably the reason, but those path nodes aren't on the path it seems to be following. I've changed the code to this:
Code:
void EnteredEnemyTriggerArea(string &in asParent, string &in asChild, int alState) {
    SetEntityActive("servant_grunt_1", true);
    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0, "");
    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_5", 0, "");
    if (asChild == "SonRoomArea") {
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_9", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_13", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_15", 8, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_13", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_9", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_5", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_31", 0, "");
    } else if (asChild == "DadRoomArea") {
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_24", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_27", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_30", 8, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_27", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_24", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_5", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_31", 0, "");
    }
}

EDIT: okay, so now he doesn't go down the hallway he did before, but he seems to be going back and forth between 1 and 5. I tried entering one of the areas, but he didn't respond to that.



RE: Monster Path Help - eagledude4 - 01-16-2012

still need help.



RE: Monster Path Help - Statyk - 01-17-2012

I honestly have no idea what else to tell you. Try troubleshooting. I'm not sure if you mess with it when we're not responding but please do. Start basic and work up. Maybe you jumped too far into the level of scripting than you were capable of...


RE: Monster Path Help - eagledude4 - 01-17-2012

Now the grunt's getting stuck on the stairs >.> He doesn't even walk straight, he just starts veering off to the left and walking into the wall between 32 and 56. I placed some pathnodes on the stairs to stop this from happening, but he's ignoring them completely.

[Image: pic.png]
Code:
void EnteredEnemyTriggerArea(string &in asParent, string &in asChild, int alState) {
    SetEntityActive("servant_grunt_1", true);
    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_32", 0, "");
    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_56", 0, "");
    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0, "");
    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_5", 0, "");
}