Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Putting two "if"s together
ApeCake Offline
Member

Posts: 116
Threads: 20
Joined: Jun 2012
Reputation: 4
#8
RE: Putting two "if"s together

Okay, I hate to bump this thread, but I want something to activate when I pulled a lever and when the door is closed (it's an elevator, you see.) How would I work this out? Something like this?


void elevatorgo(string &in asEntity, int alState)
{
if ((alState == -1) && GetSwingDoorClosed("leftelevatordoor") == true)
{
AddTimer("EG1", 1.5, "elevatorgoes");
PlaySoundAtEntity("", "quest_completed.snt", "Player", 0, false);
PlayGuiSound("move_gate.snt", 2);
}
}

The door is called "leftelevatordoor". It worked without the GetSwingDoorClosed, so the problem is definitely in that part. Thanks in advance.
07-09-2012, 02:00 PM
Find


Messages In This Thread
Putting two "if"s together - by ApeCake - 07-05-2012, 09:35 PM
RE: Putting two "if"s together - by Obliviator27 - 07-05-2012, 09:38 PM
RE: Putting two "if"s together - by Apjjm - 07-05-2012, 09:38 PM
RE: Putting two - by SilentStriker - 07-05-2012, 09:39 PM
RE: Putting two "if"s together - by himynamebob1 - 07-05-2012, 09:40 PM
RE: Putting two "if"s together - by Your Computer - 07-05-2012, 10:13 PM
RE: Putting two "if"s together - by ApeCake - 07-05-2012, 10:46 PM
RE: Putting two "if"s together - by ApeCake - 07-09-2012, 02:00 PM
RE: Putting two "if"s together - by Cruzore - 07-09-2012, 03:19 PM
RE: Putting two "if"s together - by Apjjm - 07-09-2012, 04:46 PM
RE: Putting two "if"s together - by ApeCake - 07-09-2012, 05:02 PM



Users browsing this thread: 1 Guest(s)