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
Scripting problem
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#4
RE: Scripting problem

PHP Code: (Select All)
void OnEnter() // should probably be OnStart
{
    
AddEntityCollideCallback("Player", "ScriptArea_1", "ActivateMonster", true, 1);
}

void ActivateMonster(string &in asParent, string &in asChild, int alState)
{
    if (
asChild == "ScriptArea_1")
        
ActivateMonster("manhunter_1");
}

void ActivateMonster(string &in monster)
{
    
ResetProp(monster);
    
SetEntityActive(monster, true);
    
AddTimer(monster, RandFloat(5.0f, 20.0), "DeactivateMonster");
}

void DeactivateMonster(string &in monster)
{
    
SetEntityActive(monster, false);
    
AddTimer(monster, RandFloat(60.0f, 120.0), "ActivateMonster");
} 

Tutorials: From Noob to Pro
(This post was last modified: 08-01-2013, 05:20 PM by Your Computer.)
08-01-2013, 05:19 PM
Website Find


Messages In This Thread
Scripting problem - by JonnyAnomaly - 08-01-2013, 01:00 PM
RE: Scripting problem - by PutraenusAlivius - 08-01-2013, 01:06 PM
RE: Scripting problem - by JonnyAnomaly - 08-01-2013, 01:44 PM
RE: Scripting problem - by Your Computer - 08-01-2013, 05:19 PM
RE: Scripting problem - by JonnyAnomaly - 08-01-2013, 05:39 PM
RE: Scripting problem - by DeAngelo - 08-01-2013, 11:37 PM



Users browsing this thread: 1 Guest(s)