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:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Scripting problem
JonnyAnomaly Offline
Member

Posts: 179
Threads: 20
Joined: Nov 2012
Reputation: 14
#1
Question  Scripting problem

I'm trying to make a script to make an enemy randomly appear and disappear, then loop the script. The problem is, after he has been activated once, he never comes back. Here is my script at the moment -

void OnEnter()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "activatemonster1", true, 1);
}

void activatemonster1(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("manhunter_1", true);
AddTimer("", RandFloat(5.0f, 20.0), "deactivatemonster1");
}

void deactivatemonster1(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("manhunter_1", false);
AddTimer("", RandFloat(60.0f, 120.0), "activatemonster1");
}

Would someone be able to tell me why its not repeating itself?
08-01-2013, 01:00 PM
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)