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
Yet another script question
ammislol Offline
Junior Member

Posts: 24
Threads: 6
Joined: Feb 2012
Reputation: 0
#1
Yet another script question

Hey again! I've got one more question..
I have a monster that will activate when the player picks up a key - I want the monster to follow the pathnodeareas I've put out. And then disappear when he can't see/hear the player anymore. Cause now the monster just stays and hug the door where the player went out. Is that possible?


Thanks in advance.
02-18-2012, 10:29 PM
Find
Obliviator27 Offline
Posting Freak

Posts: 792
Threads: 10
Joined: Jul 2011
Reputation: 66
#2
RE: Yet another script question

In your EntityInteractCallback, have SetEntityActive, then AddEnemyPatrolNode to the pathnode at the end of the path. He'll automatically follow pathnodes to get there. The monster will auto-disable when it gets a certain distance from the player. Worst case scenario, force a deactivate with a AddEntityCollideCallback and SetEntityActive.

02-18-2012, 10:39 PM
Find
ammislol Offline
Junior Member

Posts: 24
Threads: 6
Joined: Feb 2012
Reputation: 0
#3
RE: Yet another script question

(02-18-2012, 10:39 PM)Obliviator27 Wrote: In your EntityInteractCallback, have SetEntityActive, then AddEnemyPatrolNode to the pathnode at the end of the path. He'll automatically follow pathnodes to get there. The monster will auto-disable when it gets a certain distance from the player. Worst case scenario, force a deactivate with a AddEntityCollideCallback and SetEntityActive.
So I dont have to do anything with the deactivate? It will auto-disable if the player runs away ?
02-18-2012, 10:44 PM
Find
Obliviator27 Offline
Posting Freak

Posts: 792
Threads: 10
Joined: Jul 2011
Reputation: 66
#4
RE: Yet another script question

He should automatically deactivate if he is at the end of his path, and is nowhere near or detecting the player. As I said, worst case scenario is you force him to deactivate.

02-18-2012, 10:46 PM
Find
ammislol Offline
Junior Member

Posts: 24
Threads: 6
Joined: Feb 2012
Reputation: 0
#5
RE: Yet another script question

(02-18-2012, 10:46 PM)Obliviator27 Wrote: He should automatically deactivate if he is at the end of his path, and is nowhere near or detecting the player. As I said, worst case scenario is you force him to deactivate.
Okay, thank you. Smile
02-18-2012, 11:12 PM
Find




Users browsing this thread: 1 Guest(s)