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
Whats wrong with my script?
Henriksen Offline
Senior Member

Posts: 308
Threads: 71
Joined: Dec 2010
Reputation: 2
#3
RE: Whats wrong with my script?

(05-28-2011, 11:13 AM)Tanshaydar Wrote: [SetEntityActive("servant_grunt_1", true);]

'[' & ']' needless. Omit all of them.

My script now looks like this but it still doesnt work:

////////////////////////////
// Run first time starting map
void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "Func01", true, 1);
}

void Func01(string &in asParent, string &in asChild, int alState)
{
int x = RandInt(1, 3);
if (x == 1)
{
SetEntityActive("servant_grunt_1", true);
return;
}
if (x == 2)
{
SetEntityActive("servant_grunt_1", true);
SetEntityActive("servant_grunt_2", true);
return;
}
if (x == 3)
{
SetEntityActive("servant_grunt_1", true);
SetEntityActive("servant_grunt_2", true);
SetEntityActive("servant_grunt_3", true);
return;
}
}

////////////////////////////
// Run when entering map
void OnEnter()
{
PlayMusic("ambience_voice.ogg", true, 0.7f, 1, 0, false);
}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}
05-28-2011, 11:14 AM
Find


Messages In This Thread
Whats wrong with my script? - by Henriksen - 05-28-2011, 10:48 AM
RE: Whats wrong with my script? - by Tanshaydar - 05-28-2011, 11:13 AM
RE: Whats wrong with my script? - by Henriksen - 05-28-2011, 11:14 AM
RE: Whats wrong with my script? - by Tanshaydar - 05-28-2011, 11:19 AM



Users browsing this thread: 1 Guest(s)