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
Script Help Colliding an area to set another area active?
Mackiiboy Offline
Member

Posts: 101
Threads: 7
Joined: Jan 2012
Reputation: 11
#2
RE: Colliding an area to set another area active?

(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);
}
07-29-2012, 02:49 AM
Website Find


Messages In This Thread
RE: Colliding an area to set another area active? - by Mackiiboy - 07-29-2012, 02:49 AM



Users browsing this thread: 1 Guest(s)