Enemy Patrol - 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: Enemy Patrol (/thread-7969.html) |
Enemy Patrol - Jumpman - 05-13-2011 Enemy Patrol I cant get the enemy to patrol the path I made, he just stands there after he spawns.. In the editor I used pathnode from the monster to the end.. The scripting is.. void OnStart() { AddEntityCollideCallback("Player", "EnemyTrigger", "CollideEnemyTrigger", true, 0); AddEntityCollideCallback("Infected", "EnemyEnd", "GruntEndMusic", true, 1); } void OnEnter() { } void CollideEnemyTrigger(string &in asParent, string &in asChild, int alState) { SetEntityActive("Infected", true); GiveSanityDamage(0, true); } void EnemyFunction(string &in asParent, string &in asChild, int alState) { SetEntityActive("Infected", true); AddEnemyPatrolNode("Infected", "PathNodeArea_1", 0.0f, ""); AddEnemyPatrolNode("Infected", "PathNodeArea_123", 0.0f, ""); } void OnLeave() { } So what Im I doing wrong? Plz help. Thx RE: Enemy Patrol - Khyrpa - 05-13-2011 you have nothing that triggers this void EnemyFunction(string &in asParent, string &in asChild, int alState) So just put: AddEnemyPatrolNode("Infected", "PathNodeArea_1", 0.0f, ""); AddEnemyPatrolNode("Infected", "PathNodeArea_123", 0.0f, ""); those under give sanity damage RE: Enemy Patrol - Jumpman - 05-13-2011 okey.. it's working, BUT.. he is not walking the path I made... he's taking he's own way to PathNodeArea_123.. how do I fix that? and also.. If I want to make him loop a path, how do I do that? thx RE: Enemy Patrol - Jumpman - 05-13-2011 np. I fixed it RE: Enemy Patrol - ferryadams10 - 05-14-2011 AddEntityCollideCallback("Infected", "EnemyEnd", "EnemyFunction", true, 1); that'll do it |