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!
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#11
RE: Help with variable ints!

You're getting there, but there's still things to do to get it to work. Firstly, you do not need to name anything in the map BarrelCheck because this is just the integer's name and is only referenced in the script. Secondly, you must input your functions inside the if-statements. Where SR put the comments, you must put the script that is supposed to happen in that situation.

For example, instead of calling the function for when the container is cleaned or not, call ContainerOnBarrelCheck (don't forget to update the parameters if you do). Inside that function you put what happens when it is clearned inside the == 1 check, and what happens when it is not cleaned inside the other. What will happen is that only one of these if-statements are going to run when you use the item on the barrel, but which one it is is determined by what has happened before.

When you clean your barrel, run SetLocalVarInt("BarrelCheck", 1); to update the int. If you use the container on the barrel after this script has been run, it will execute the first if-statement instead of the second.

(This post was last modified: 03-19-2014, 01:58 PM by Mudbill.)
03-19-2014, 01:57 PM
Find


Messages In This Thread
Help with variable ints! - by Radical Batz - 03-19-2014, 10:05 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: 1 Guest(s)