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
need some help with levers and a secret door.
NorK Offline
Junior Member

Posts: 12
Threads: 3
Joined: Dec 2008
Reputation: 0
#1
need some help with levers and a secret door.

hey

am trying to make a secret door to open when pulling a lever.
the secret door in the start of the game, after u find ur first note from self.

can any1 tell me how it works.

void SetEntityConnectionStateChangeCallback(string& asName, string& asCallback);
A callback called when ever the connection state changes (button being switched on, lever switched, etc).
Callback syntax: void Func(string &in EntityName, int alState)
alState: -1 = off, 0 = between, 1 = on

have looked on this but cant figure out where to put the alstate....
07-09-2011, 08:23 PM
Find
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#2
RE: need some help with levers and a secret door.

You can try this:

void OnStart()
{
     SetEntityConnectionStateChangeCallback("Lever_1", "Func01");
}
void Func01(string &in asName, int alState)
{
     if (alState == 1)
     {
          //Secret door is opened when said so here
     }
}

07-09-2011, 09:57 PM
Find




Users browsing this thread: 1 Guest(s)