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
Help with variable ints!
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#2
RE: Help with variable ints!

It's like this:
PHP Code: (Select All)
void ContainerOnBarrelCheck()
{
if(
GetLocalVarInt("BarrelCheck") == 1)
{
//WHAT TO DO IF BARREL IS ALREADY CLEANED
}

else if(
GetLocalVarInt("BarrelCheck") != 1)
{
//WHAT TO DO IF BARREL HAVEN'T CLEANED YET
}


Let's just say that you have a Local Var Int of 0 named BarrelCheck. Now if you already used the container on the water barrel then add one by AddLocalVarInt. But if you haven't then nothing happened right? The VarInt didn't get plus one.

In the function where you can add the LocalVarInt add this line:
PHP Code: (Select All)
ContainerOnBarrelCheck(); 

So that when the VarInt is added by one, the script also checks the above code whether the VarInt is 1 or not. If it's 1 then something happens. But if it's not one (!= 1) then nothing happens.

"Veni, vidi, vici."
"I came, I saw, I conquered."
03-19-2014, 10:15 AM
Find


Messages In This Thread
Help with variable ints! - by Radical Batz - 03-19-2014, 10:05 AM
RE: Help with variable ints! - by PutraenusAlivius - 03-19-2014, 10:15 AM
RE: Help with variable ints! - by Radical Batz - 03-19-2014, 10:24 AM
RE: Help with variable ints! - by Radical Batz - 03-19-2014, 10:38 AM
RE: Help with variable ints! - by Mudbill - 03-19-2014, 12:16 PM
RE: Help with variable ints! - by Mudbill - 03-19-2014, 01:23 PM
RE: Help with variable ints! - by Radical Batz - 03-19-2014, 01:40 PM
RE: Help with variable ints! - by Mudbill - 03-19-2014, 01:57 PM
RE: Help with variable ints! - by Mudbill - 03-19-2014, 02:26 PM



Users browsing this thread: 6 Guest(s)