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


Thread Rating:
  • 2 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Enemy Patroling and Disapearing: Help!
Cocomunches Offline
Junior Member

Posts: 36
Threads: 6
Joined: Apr 2012
Reputation: 1
#5
RE: Enemy Patroling and Disapearing: Help!

(04-26-2012, 08:03 AM)TeamSD Wrote: This is just a brief help. Basically you could set unscripted pathnodes to the room where you trigger the monster/player hides. When monster arrives to the room it starts to look for the player from the place you were during activating the trigger. After herpderbing a while, monster just stands there unless there is a pathnode nearby.

Place some pathnodes out of the room and to the end of all these pathnodes set up a area where the monster disappears. For example
SetEntityActive("Monster_Grunt", false);

Note that pathnodes can work without scripting. I recall using this method in one of my earliest custom stories.
Try it out. Hope it works.
Ah, I'll be sure to try it out. I thought you had to script it all, hehe.

But I did put some around and I didn't see him moving around.


Alright, so

////////////////////////////

// Run when entering map

void OnStart()

{

SetEntityPlayerInteractCallback("scareactive2", "OnPickup", true);

}



void OnPickup(string &in asEntity)


{

SetEntityActive ("Monster_Grunt", true);

ShowEnemyPlayerPosition ("Monster_Grunt");


AddTimer("monsterstart", 90.0f, "byegrunt");


}



void byegrunt(string &in asTimer)

{

SetEntityActive ("Monster_Grunt", false);

}



////////////////////////////

// Run when leaving map

void OnLeave()

{



}

Works!

Now all I need to know is how to make the monster follow the paths! so if anyone could help with this, I'd appreciate it.
(This post was last modified: 04-26-2012, 08:13 AM by Cocomunches.)
04-26-2012, 08:05 AM
Find


Messages In This Thread
RE: Enemy Patroling and Disapearing: Help! - by Cocomunches - 04-26-2012, 08:05 AM



Users browsing this thread: 1 Guest(s)