Frictional Games Forum (read-only)

Full Version: Help with script [solved]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
void ShowEnemyPlayerPosition(string& asName);

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

http://wiki.frictionalgames.com/hpl2/amn..._functions
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...
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.
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
(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.)
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
I've now have another question. Can you make a wall dissappear? Smile