The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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
#1
Enemy Patroling and Disapearing: Help!

So I am pretty darn new to making Custom Stories, and I am surprised I have gotten this far and advanced into the scripting and all, but I do need some help here. Tongue

I have made a room with the following script to make a monster spawn and look for you. It works fine, but the only problem is that it just stands around. Confused

Now please don't be harsh, I am new to all of this and I could use some help!

The script for the level so far:

////////////////////////////
// Run when entering map
void OnStart()
{
SetEntityCallbackFunc("scareactive2", "OnPickup");
}
////////////////////////////
//
void OnPickup (string &in asEntity, string &in type)
{
SetEntityActive ("Monster_Grunt", true);
ShowEnemyPlayerPosition ("monster_grunt");
}
////////////////////////////
// Run when leaving map
void OnLeave()
{

}



This works fine, just need a way to make him go away.



Please, if anyone could help me out here on how I can make my monster patrol around and then disappear off to somewhere after some time. I'v tried to set pathnodes around and script it, but it never ends well and I am no expert so I can't tell what I am doing wrong here, please help out if you can! Big Grin
04-26-2012, 07:46 AM
Find


Messages In This Thread
Enemy Patroling and Disapearing: Help! - by Cocomunches - 04-26-2012, 07:46 AM



Users browsing this thread: 2 Guest(s)