Frictional Games Forum (read-only)
Enemy waits at each pathnode - 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: Enemy waits at each pathnode (/thread-20370.html)



Enemy waits at each pathnode - tonitoni1998 - 02-17-2013

hello. my monster waits about 1 seconds each pathnode it reaches. cant it be a smooth movement? all pathnodes are about 1 m away from each other. my script:
Code:
void OnStart()
{
    SetSanityDrainDisabled(false);
    SetEntityPlayerInteractCallback("shirt_hanging_white_obj_1", "ActivateEnemy", true);
}

void ActivateEnemy(string &in asEntity)
{
    SetEntityActive("servant_grunt_1", true);
    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 2, "");
    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "");
    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 0, "");
    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_4", 0, "");
    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_5", 0, "");
    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_6", 0, "");
    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_7", 0, "");
    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_8", 0, "");
    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_9", 0, "");
    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_10", 0, "");
    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_11", 0, "");
    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_12", 0, "");
    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_13", 0, "");
    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_14", 0, "");
    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_15", 0, "");
    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_16", 0, "");
    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_17", 5, "");
}



RE: Enemy waits at each pathnode - Your Computer - 02-17-2013

You're not supposed to add each path node to the monster. The monster has no trouble walking in a straight line, so you can safely just add the first and last path node of the line. If you want the monster to walk around corners, add the path node at the intersection.


RE: Enemy waits at each pathnode - tonitoni1998 - 02-17-2013

so it will always wait at a node?


RE: Enemy waits at each pathnode - Your Computer - 02-17-2013

(02-17-2013, 08:01 PM)tonitoni1998 Wrote: so it will always wait at a node?

If you put 0, it'll wait a few seconds on the path node. If you put 0.001, it's such a short time that it'll look like it hasn't.


RE: Enemy waits at each pathnode - tonitoni1998 - 02-17-2013

(02-17-2013, 08:17 PM)Your Computer Wrote: If you put 0, it'll wait a few seconds on the path node. If you put 0.001, it's such a short time that it'll look like it hasn't.

Oh okay thanks. Thats what i was looking for.