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
if & else URGENT! PLZ!
Russ Money Offline
Senior Member

Posts: 360
Threads: 25
Joined: Dec 2010
Reputation: 4
#3
RE: if & else URGENT! PLZ!

If the lever is pulled, have the interaction call back set a global variable to 1.

SetGlobalVarInt(string& asName, int alVal);

Then have the callback area, timer, etc to check the global variable.

GetLocalVarInt(string& asName);

Example for checking the global variable from an area


void Checking(string &in asParent, string &in asChild, int alState)
{
     if(GetGlobalVarInt("Variable")==1
     {
     //Insert commands here if variable = 1
     }

     else
     {
     //Insert commands here if variable does not = 1
     }
}

Someone correct me if I'm wrong.

05-21-2011, 11:10 AM
Find


Messages In This Thread
if & else URGENT! PLZ! - by X4anco - 05-21-2011, 09:58 AM
RE: if & else URGENT! PLZ! - by Karai16 - 05-21-2011, 11:05 AM
RE: if & else URGENT! PLZ! - by Russ Money - 05-21-2011, 11:10 AM
RE: if & else URGENT! PLZ! - by X4anco - 05-21-2011, 11:44 AM



Users browsing this thread: 1 Guest(s)