(07-29-2012, 02:34 AM)ExenderVes Wrote: So, i'm making my custom story and i need to set an area inactive until the player collides with another area. ¿Is that possible?¿How?
Thanks in advance
.
Yea, it's possible!
The area you want inactive should be inactive in the Level Editor. Lets call the active area "Area_1" and the inactive area "Area_2"
void OnStart()
{
AddEntityCollideCallback("Player", "Area_1", "SetAreaActiveFunc", true, 1);
}
void SetAreaActiveFunc(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Area_2", true);
}