Cocomunches
Junior Member
Posts: 36
Threads: 6
Joined: Apr 2012
Reputation:
1
|
RE: Enemy Patroling and Disapearing: Help!
(04-26-2012, 07:59 AM)heyitsrobert97 Wrote: (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) I'll try it out right away! Let me see how this works.
|
|
04-26-2012, 08:01 AM |
|