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!
heyitsrobert97 Offline
Member

Posts: 68
Threads: 29
Joined: Jan 2012
Reputation: 0
#2
RE: Enemy Patroling and Disapearing: Help!

(04-26-2012, 07:46 AM)Cocomunches Wrote: ////////////////////////////
// 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()
{

}
Remember to change the 90.0f on the timer to how long before the grunt disappears and remember its in seconds so 1.30

And You Don't Need the //////////// on anything but you can have them on the start bits only eg:
////////////////////////////
// Run when leaving map
void OnLeave()

Not Between Scripts

{
SetEntityPlayerInteractCallback("scareactive2", "OnPickup", true);
}
//////////////
void OnPickup(string &in asEntity)

This Darn House! , Four Doors, Youtube
(This post was last modified: 04-26-2012, 08:01 AM by heyitsrobert97.)
04-26-2012, 07:59 AM
Find


Messages In This Thread
RE: Enemy Patroling and Disapearing: Help! - by heyitsrobert97 - 04-26-2012, 07:59 AM



Users browsing this thread: 1 Guest(s)