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 Checking if player is inside of a script area
Slanderous Offline
Posting Freak

Posts: 1,606
Threads: 78
Joined: Dec 2012
Reputation: 63
#3
RE: Checking if player is inside of a script area

That's what I used in my mod for barricades. Basically checks what's the state of the entity. 1 = means the entity is within the area, -1 = the entity is not within the area. Should work for anything.

PHP Code: (Select All)
AddEntityCollideCallback("", "sth_1", "BarricadeCheck", false, 0);

void BarricadeCheck(string &in asParent, string &in asChild, int alState)
{
    if(
alState == -1)
    {
    
SetSwingDoorLocked("prison_12", false, false);
    }
    else if(
alState == 1)
    {
    
SetSwingDoorLocked("prison_12", true, false);
    }
} 
09-05-2016, 10:14 PM
Find


Messages In This Thread
RE: Checking if player is inside of a script area - by Slanderous - 09-05-2016, 10:14 PM



Users browsing this thread: 1 Guest(s)