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
Setting an area active [SOLVED]
Roenlond Offline
Senior Member

Posts: 331
Threads: 3
Joined: Apr 2011
Reputation: 0
#3
RE: Setting an area active

void OnStart()
{
AddEntityCollideCallback("Player", "ActivateMonster_Area", "ActivateMonster", true, 1); //Callback for first function
}

void ActivateMonster(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Monster_1", true); //Activates first monster
AddEntityCollideCallback("Player", "ActivateMonster_2_Area", "ActivateMonster_2", true, 1); //Adds callback for the second monster
}

void ActivateMonster_2(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Monster_2", true); //Activates second monster
}

That SHOULD work, although I haven't tested it in-game so I might have made mistakes.

Alternatively, you could probably do something like this:
void OnStart()
{
AddEntityCollideCallback("Player", "ActivateMonster_Area", "ActivateMonster", true, 1); //Callback for first function
AddEntityCollideCallback("Player", "ActivateMonster_2_Area", "ActivateMonster_2", true, 1); //Adds callback for the second monster
}

void ActivateMonster(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Monster_1", true); //Activates first monster
SetEntityActive("ActivateMonster_2_Area", true); //Activates the area that activates monster 2, it will need to be inactive from start.
}

void ActivateMonster_2(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Monster_2", true); //Activates second monster
}
05-09-2011, 08:12 PM
Find


Messages In This Thread
Setting an area active [SOLVED] - by Greven - 05-09-2011, 08:02 PM
RE: Setting an area active - by Khyrpa - 05-09-2011, 08:12 PM
RE: Setting an area active - by Roenlond - 05-09-2011, 08:12 PM
RE: Setting an area active - by Khyrpa - 05-09-2011, 08:16 PM
RE: Setting an area active - by Roenlond - 05-09-2011, 08:30 PM
RE: Setting an area active - by Greven - 05-09-2011, 08:44 PM
RE: Setting an area active - by Khyrpa - 05-09-2011, 08:46 PM
RE: Setting an area active - by Greven - 05-09-2011, 08:51 PM
RE: Setting an area active - by Kyle - 05-09-2011, 08:47 PM
RE: Setting an area active [SOLVED] - by Kyle - 05-09-2011, 09:11 PM



Users browsing this thread: 1 Guest(s)