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


Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Variable help needed PLEASE :'(
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#4
RE: Variable help needed PLEASE :'(

Do you really need a global variable in this case?

In your "void OnStart()", you could add this: SetLocalVarInt("door1", 0);

Then the place where you set it to 1, put this: SetLocalVarInt("door1", 1); or AddLocalVarInt("door1", 1);

This is what the used1 function should look like.

void used1(string &in asParent, string &in asChild, int alState)
{
     if (GetLocalVarInt("door1") == 1)
     {
          SetSwingDoorLocked("metal_1", false, true);
          PlaySoundAtEntity("", "unlcok_door", "metal_1", 0, false);
          return;
     }
     else
     {
          PlayGuiSound("21/21_lever_fail.ogg", 1);
          SetMessage("Message", "mem8", 3);
          return;
     }
}
}

(This post was last modified: 05-21-2011, 10:07 PM by Kyle.)
05-21-2011, 10:07 PM
Find


Messages In This Thread
Variable help needed PLEASE :'( - by X4anco - 05-21-2011, 08:58 PM
RE: Variable help needed PLEASE :'( - by X4anco - 05-21-2011, 10:03 PM
RE: Variable help needed PLEASE :'( - by Kyle - 05-21-2011, 10:07 PM
RE: Variable help needed PLEASE :'( - by X4anco - 05-21-2011, 10:19 PM
RE: Variable help needed PLEASE :'( - by Kyle - 05-22-2011, 12:31 AM



Users browsing this thread: 2 Guest(s)