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
Direction decides what script is called
Damascus Offline
Senior Member

Posts: 646
Threads: 118
Joined: Mar 2012
Reputation: 29
#4
RE: Direction decides what script is called

Well, I think I was making that way more complicated than it needed to be. I changed it to a SetEntityActive and it worked like a charm.

PHP Code: (Select All)
void StudyKey(string &in asEntity)
{
    
SetEntityActive("fake_wall"false);
    
AddEntityCollideCallback("Player""LeftDoor_1""OpenPass"false1);
    
AddEntityCollideCallback("Player""LeftDoor_2""ClosePass"false1);
    
AddEntityCollideCallback("Player""RightDoor_1""OpenPass"false1);
    
AddEntityCollideCallback("Player""RightDoor_2""ClosePass"false1);
}

void OpenPass(string &in asParentstring &in asChildint alState)
{
    
SetEntityActive("fake_wall"false);
}

void ClosePass(string &in asParentstring &in asChildint alState)
{
    
SetEntityActive("fake_wall"true);


That way the fake wall is simply active or inactive depending on which side of each doorway you pass last.

(This post was last modified: 04-16-2012, 08:25 PM by Damascus.)
04-16-2012, 08:24 PM
Find


Messages In This Thread
RE: Direction decides what script is called - by Damascus - 04-16-2012, 08:24 PM



Users browsing this thread: 3 Guest(s)