Hello I need help with using the "if" in my script, I just dont get it. So I have 3 pipes use them on 3 separate scripts and every time one placed right an pipe entity appears so the player sees that it's placed right. Now When all are placed right I want to swap a stuck valve with a valve that can be turned. So here's my script so far
Thanks mate, i'll try when I get home, btw could you explain to me what that "SetLocalVarInt("Var01", 1);" or what the var01 does? I can just copy this but I'm not sure how it actually works
EDIT: Yep, works like a charm, still don't know how it works tho
I have a problem and I posted it here; http://www.frictionalgames.com/forum/thr...l#pid74695
And the public says it's a variable problem >.> I have no idea what those are or how to use em but this could help me in some way im sure
Well, it's basically something like when the local variable is 0 something happens, and when it is 1 something else happens, so when you use the "if", the script checks if the variable is equal to 0 or 1. So if you set the local variable to 1 it will do the script you created for local var 1. If, lets say you haven't collected the item, the variable is 0 and will skip the script which had the variable 1 and do whatever is on 0, until you get the necessary items (or w/e it is you use to change the variable to 1) and then it does the script you created for 1 Since english isn't my main language I might've explained a bit confusing, but I hope this helped a little at least xD
The if does exactly what it's named, IF something is 0 the script is activated, else it does the 1 or what the local variable is
(This post was last modified: 06-08-2011, 01:20 PM by DannieWest.)
SOLVED: CANT USE 180, only -1, 0, and 1, figured it out self, sorry for useless bump.
Bumping old instead of making new:
I got a problem with a valve for my script, I got one working but it's not working correctly. So am I not using the right script for this? I just want to turn the valve to 180 and the stuff to happen