Brute Path Nodes - 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: Brute Path Nodes (/thread-21306.html) |
Brute Path Nodes - JohnandSerena - 04-28-2013 I'm not sure of the problem but my brute has path nodes set and in MapView it doesn't show that the nodes are linked. When I approach the scene in the game, the brute goes nuts and it almost looks like its lagging. The brute stays in place and will do multiple animations and sometimes start to float. Here's my script: void OnStart() { AddEntityCollideCallback("Player", "ScriptArea_1", "MonsterFunction", true, 1); } void MonsterFunction(string &in asParent, string &in asChild, int alState) { SetEntityActive("servant_brute_1", true); AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_1", 0, ""); AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_2", 0, ""); AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_3", 3, ""); AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_4", 0, ""); AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_5", 0, ""); AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_6", 0, ""); AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_7", 0, ""); AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_8", 0, ""); AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_9", 0, ""); AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_10", 0, ""); AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_11", 0, ""); AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_12", 0, ""); for (int i = 1; i < 13; i++) { AddEnemyPatrolNode("servant_brute_1","PathNodeArea_"+i, 0, ""); } } void OnLeave() { } RE: Brute Path Nodes - The chaser - 04-28-2013 (04-28-2013, 02:38 PM)JohnandSerena Wrote: I'm not sure of the problem but my brute has path nodes set and in MapView it doesn't show that the nodes are linked. When I approach the scene in the game, the brute goes nuts and it almost looks like its lagging. The brute stays in place and will do multiple animations and sometimes start to float. Here's my script: It's obvious that it drives nuts, you are assigning lots of path nodes at the same time: Just: void OnStart() { AddEntityCollideCallback("Player", "ScriptArea_1", "MonsterFunction", true, 1); } void MonsterFunction(string &in asParent, string &in asChild, int alState) { for (int i = 1; i < 13; i++) { AddEnemyPatrolNode("servant_brute_1","PathNodeArea_"+i, 0, ""); } } RE: Brute Path Nodes - Tomato Cat - 04-28-2013 PHP Code: void MonsterFunction(string &in asParent, string &in asChild, int alState) This might be your problem. Unless your nodes are in strange places? PHP Code: void MonsterFunction blahblah Beat me to it. RE: Brute Path Nodes - JohnandSerena - 04-28-2013 I tried your script and I got the same result. Mapview shows that my nodes aren't linked. RE: Brute Path Nodes - Tomato Cat - 04-28-2013 Can you attach a download to your map file? RE: Brute Path Nodes - JohnandSerena - 04-28-2013 (04-28-2013, 07:35 PM)Mr Credits Wrote: Can you attach a download to your map file? RE: Brute Path Nodes - Tomato Cat - 04-28-2013 Now, I'm not sure if this is the exact reason, but when I moved the grass above the nodes, they connected. Basically what chaser says. =p RE: Brute Path Nodes - The chaser - 04-28-2013 Aaah, now I know why! You used a static_object, right? All static objects have collision enabled by default. As the grass was in the middle of the relation of the Path nodes, they couldn't link (it would be like trying to make a brute walk from a room to another crossing through the wall) You must simply disable collision in grass and it'll work |