Hmm Sorry about resurrecting this thread but I have a pertinent question that has been bothering me for some time.
I use variables a lot and its causing me a bit of a head ache because I think I MAY be using them wrong.
I NEVER use dimvar= as the description in the complete syntax listing seemed almost identical to globalvar= so i chose to use globalvar= for any scripts where I want all fpi's to access and alter the var, and localvar= when its contained in the originated script only.
But I seem to be encountering an issue where I can only use one var at a time, by setting globalvar=thirst for example, anything that contains,incvar=1, increments that variable instead, unless I define an alternate global variable prior to incremementing the variable
So for example if Im using a variable for kill count, and a variable for hostages killed, unless i keep changing between variables everytime one is incremented I end up incrementing the wrong one.
This isnt an issue when actually incrememnting the variable, its only an issue If I have multiple different scripts actively waiting to do a variable check
so for example I have a script checking to see if 8 terrorists are dead OR 4 hostages so Have something like
Hostage counter
:state=0,varequal=4:fpgcrawtext=hostages killed try again
And in terrorist counter
:state=0,varequal=8:fpgcrawtext=terrorists killed well donne
So currently its something like this
:state=0:globalvar=hostages,state=1
:state=1,varequal=4:fpgcrawtext=hostages killed blah blah
:state=1,varnotequal=4:state=2
:state=2:globalvar=terrorists,state=3
:state=3,varequal=8:terrorists killed yayness..
:state=3,varnotequal=8:state=0
The problem with this is that its constantly cycling those two variables so when shooting a terrorist it sometimes increments the hostage variables if the counter script happens to be looking at that one at the time
Im sure using dimvar= can fix this for me and allow to read and write multiple variables at once but I cant seem to figure it out.
Any chance of a stupid proof example using the hunger/thirst mentioned above?
I followed the link but Im probably misunderstanding something there
smoke em if you got em