Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with script [solved]
SilentStriker Offline
Posting Freak

Posts: 950
Threads: 26
Joined: Jul 2011
Reputation: 43
#1
Help with script [solved]

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
(This post was last modified: 07-06-2011, 11:34 AM by SilentStriker.)
07-04-2011, 09:44 PM
Find
Tanshaydar Offline
From Beyond

Posts: 3,085
Threads: 17
Joined: Mar 2009
Reputation: 67
#2
RE: Help with script and enemies

void ShowEnemyPlayerPosition(string& asName);

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

http://wiki.frictionalgames.com/hpl2/amn..._functions

07-05-2011, 02:07 AM
Website Find
SilentStriker Offline
Posting Freak

Posts: 950
Threads: 26
Joined: Jul 2011
Reputation: 43
#3
RE: Help with script and enemies

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...
07-05-2011, 12:11 PM
Find
Roenlond Offline
Senior Member

Posts: 331
Threads: 3
Joined: Apr 2011
Reputation: 0
#4
RE: Help with script and enemies

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.
07-05-2011, 12:39 PM
Find
SilentStriker Offline
Posting Freak

Posts: 950
Threads: 26
Joined: Jul 2011
Reputation: 43
#5
RE: Help with script and enemies

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
(This post was last modified: 07-05-2011, 07:17 PM by SilentStriker.)
07-05-2011, 07:05 PM
Find
Angerpull Offline
Member

Posts: 88
Threads: 24
Joined: Jun 2011
Reputation: 0
#6
RE: Help with script and enemies

(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.)
07-05-2011, 09:48 PM
Find
SilentStriker Offline
Posting Freak

Posts: 950
Threads: 26
Joined: Jul 2011
Reputation: 43
#7
RE: Help with script and enemies

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
07-05-2011, 11:16 PM
Find
SilentStriker Offline
Posting Freak

Posts: 950
Threads: 26
Joined: Jul 2011
Reputation: 43
#8
RE: Help with script

I've now have another question. Can you make a wall dissappear? Smile
07-06-2011, 10:54 AM
Find




Users browsing this thread: 1 Guest(s)