Frictional Games Forum (read-only)
Making enemys smart enough to open doors? - 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: Making enemys smart enough to open doors? (/thread-6289.html)

Pages: 1 2


RE: Making enemys smart enough to open doors? - Shev - 01-22-2011

I don't suppose theres a way to figure out if a enemy didn't go to its next patrol node because its chasing the player right?


RE: Making enemys smart enough to open doors? - Tanshaydar - 01-23-2011

I didn't play with the patrol nodes yet so I don't know how they work; but I think you can place areas to check collides and if enemy is not there, you can assume it went to chase Danny.


RE: Making enemys smart enough to open doors? - Shev - 01-24-2011

Actually I think it is possible for them to know when you're being hunted. Its like alState == "hunt" or something. I saw it in the debug earlier, I'm gunna test it out.


RE: Making enemys smart enough to open doors? - Tanshaydar - 01-24-2011

lol, fast, do it, right it here Big Grin


RE: Making enemys smart enough to open doors? - Seragath - 01-26-2011

Okey okey..Let me just understand this with a path node..If I place a path node somewhere on my map. Does any monster that walks by follow it (If it somehow detects the player) or am I forced to use the command "AddEnemyPatrolNode" So that the monster knows it's attached to that exact path node ?. If that's the case and "AddEnemyPatrolNode" is not needed at all...I'll get a better understanding why my monsters have horrible, horrible ai pathing. Tongue


RE: Making enemys smart enough to open doors? - Shev - 01-26-2011

You need to use AddEnemyPatrolNode.


RE: Making enemys smart enough to open doors? - Beatlebattle - 02-01-2011

You already got the script to make a monster open a door with a trigger? I would really like to have that one please since I can't figure out how to OPEN an door instead of closing it.


RE: Making enemys smart enough to open doors? - Phoroneus - 02-02-2011

(01-26-2011, 08:28 PM)Seragath Wrote: Okey okey..Let me just understand this with a path node..If I place a path node somewhere on my map. Does any monster that walks by follow it (If it somehow detects the player) or am I forced to use the command "AddEnemyPatrolNode" So that the monster knows it's attached to that exact path node ?. If that's the case and "AddEnemyPatrolNode" is not needed at all...I'll get a better understanding why my monsters have horrible, horrible ai pathing. Tongue

Shev's response is not entirely correct. PathNodes will help monsters to navigate around obstacles even if they are not tied directly to each other, or if the monster is not tied directly to them, as long as the monster is tied to another node farther along the line. All nodes are used by all monsters when chasing Daniel or re-orienting to their former patrol routes after losing sight of Daniel, though they will not stop on nodes unless they are specifically told to do so.

For example, if you had ten nodes winding through hallways from PathNode_A to PathNode_B, and nodes A and B were not in line-of-sight of each other, but could be reached by following a series of the other nodes, the monster will follow the node path (calculated, I assume, by shortest total distance) until it gets to B.

If Daniel is seen along the route, the monster will abandon its path and begin chasing him. If he disappears, the monster will attempt to get back to its next patrol node (assuming Daniel appeared before the monster reached B, it would head towards B).

If the area is well-populated by nodes, the monster will be able to re-calculate a path based on its current position when it loses Daniel and be more successful in reaching B. Otherwise, it will have to path back towards those nodes that do exist or else attempt to walk directly towards B, only diverting in the case of walls or other obstacles.

Using a ShowEnemyPlayerPosition function becomes much more effective when there are nodes throughout the map, allowing monsters to path as quickly as possible to the player's location.

I believe, but have not tested, that monsters also use nodes during their "search" stage of chasing Daniel, i.e. right after he loses them and they are still actively looking for him (rather than "investigating" noises or "patrolling" between designated nodes).