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


Making enemys smart enough to open doors? - Shev - 01-19-2011

Is there a config or something I can mod for this?


RE: Making enemys smart enough to open doors? - Oscar House - 01-19-2011

Make an area in front of the door and a trigger that is called when the monster enters that area.
Make a function that checks if the door is closed, if yes, add a force that opens the door. If not, end the function.


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

(01-19-2011, 10:21 PM)Oscar House Wrote: Make an area in front of the door and a trigger that is called when the monster enters that area.
Make a function that checks if the door is closed, if yes, add a force that opens the door. If not, end the function.

Thats actually what I was doing, although I was hoping there would be a way to do it so I wouldn't have to do this with every frigen door :| guess not.


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

I got another question regarding AI.

Does the monster put its patrol nodes as a priority over the player? Or if it see's the player it ignores its patrol nodes, and goes straight for him?


RE: Making enemys smart enough to open doors? - GraphicsKid - 01-20-2011

(01-20-2011, 02:34 AM)Shev Wrote: I got another question regarding AI.

Does the monster put its patrol nodes as a priority over the player? Or if it see's the player it ignores its patrol nodes, and goes straight for him?

The way the nodes work is IF there is NO direct path to the player, it snaps to the nearest patrol node and runs along the node web until it finds a node that has a direct path to the player. I mean... when I say "it runs along" I mean the pathfinding algorithm, not the monster.

So yes... if it can run straight at you, it will ignore it's pathnodes.


RE: Making enemys smart enough to open doors? - Equil - 01-20-2011

I have another question. Is it possible to make monsters be able to clip through entities? Sure this might be immersion breaking.. but I have a friend who just loves to hide up on bookshelves to escape monsters, or a makeshift tower made of boxes. The monster will just run up and mindlessly bash whatever he's standing on and then eventually wander off.

One solution I came up with was filling up a fair portion of the level with block boxes, but this is tedious to do and can restrict the player's mobility unintentionally.


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

Is it possible to make a function that detects if the enemy see's the player or not?


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

(01-20-2011, 11:41 PM)Shev Wrote: Is it possible to make a function that detects if the enemy see's the player or not?

There is no function for it, but there is something like that:
void ShowEnemyPlayerPosition(string& asName);


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

(01-21-2011, 01:13 PM)Tanshaydar Wrote:
(01-20-2011, 11:41 PM)Shev Wrote: Is it possible to make a function that detects if the enemy see's the player or not?

There is no function for it, but there is something like that:
void ShowEnemyPlayerPosition(string& asName);

Guess I have to find a work around :|


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

Trying to figure it out, but without having access to AI itself, it seems pointless to try to do complex things.
I had to show player to enemy every single time to do what I want to do.