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?
KingCrimson Offline
Junior Member

Posts: 45
Threads: 14
Joined: Jul 2012
Reputation: 0
#1
Colliding an area to set another area active?

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

Current Projects:
DADDY - 10%
07-29-2012, 02:34 AM
Find
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
KingCrimson Offline
Junior Member

Posts: 45
Threads: 14
Joined: Jul 2012
Reputation: 0
#3
RE: Colliding an area to set another area active?

It worked!

Thanks ;D

Current Projects:
DADDY - 10%
07-29-2012, 04:40 AM
Find




Users browsing this thread: 1 Guest(s)