Frictional Games Forum (read-only)

Full Version: Enemy waits at each pathnode
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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, "");
}
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.
so it will always wait at a node?
(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.
(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.