Frictional Games Forum (read-only)
Help with script [solved] - 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: Help with script [solved] (/thread-8965.html)



Help with script [solved] - SilentStriker - 07-04-2011

Hello Smile I'm new with scripting and such and i need help to get the monster to chase the player.. I can't get it to work. can some help me? Smile


RE: Help with script and enemies - Tanshaydar - 07-05-2011

void ShowEnemyPlayerPosition(string& asName);

Makes the enemy run to the player, no matter where he is.

http://wiki.frictionalgames.com/hpl2/amnesia/script_functions


RE: Help with script and enemies - SilentStriker - 07-05-2011

I did that but when he was supposed to start running he just stuck at the corner. And by placing and scripting pathnodes just made him walk and not follow etc...


RE: Help with script and enemies - Roenlond - 07-05-2011

Use that command AND path nodes (they do not need to be scripted) and the monster will run after you and if it gets stuck, it will use the path nodes to try and get moving again and ultimately chasing you again.


RE: Help with script and enemies - SilentStriker - 07-05-2011

ok thank you can you make an example so i can look and learn how i should make the nodes? Smile and how do i script so when i have been chased a while and hide in the closet the monster will walk after some nodes and then disdapear? Smile
Now i got it to work! Perfect Smile


RE: Help with script and enemies - Angerpull - 07-05-2011

(07-05-2011, 07:05 PM)SilentStriker Wrote: ok thank you can you make an example so i can look and learn how i should make the nodes? Smile and how do i script so when i have been chased a while and hide in the closet the monster will walk after some nodes and then disdapear? Smile
Now i got it to work! Perfect Smile

When he loses track of you, he will stop chasing you and walk to a node. You can script it so when he stops chasing you he will walk back to his original patrol. And when the enemy is far enough from the player, he will disappear by default (I THINK! Since it happens to me.)



RE: Help with script and enemies - SilentStriker - 07-05-2011

I've done like this that he bashes open a door and runs after the player and when the player hides in the closet he will step on a trigger right before the closet and then he will walk around the room and then dissapear outside the room Smile


RE: Help with script - SilentStriker - 07-06-2011

I've now have another question. Can you make a wall dissappear? Smile