Ignore all of this, read the edit
I have a settings section of my game where you can enable and disable certain rules to activate and deactivate other settings in the game.
Basically if the rule is on, the value is set to True
and if it is off the value is set to the default value of 0
.
Now the way I check if those rules are activated is by using Skip If
s.
If those variables are set to True
then it used to trigger the Skip If
and skip the requested lines. And if those variables were 0
the Skip If
would be False
. But after testing my game it appears that the Skip If
s are getting triggered if the value is 0
.
From my understanding of the Skip If
, by giving it a global variable it would look for True
or a >0 number (aka C style booleans where 0 is false
and every other number is true
). But it appears that the Skip If
is getting triggered even if the value is 0. The only time it is found as False
is if the value is False
.
As far as I can tell live does not do this. If this were to go to live this will retrospectively break my game and cause unexpected results.
The code I’m testing with is M72YG, my personal game. The easiest example is by testing the game with & without colorblind mode. The Skip If
for that is used in rule Create global HUD elements on line 3.
EDIT:
I just did more testing
It appears that the system setting the variable to 0
is not the same as initializing it to 0
If I don’t touch the variable the default appears as 0
but gets triggered as True
in the Skip If
But if I manually set it by using Set Global Variable(Var, 0)
it appears to set it properly and the Skip If
sees it as False
So this appears to be a actual workshop bug.