BlueTracker

Bluetracker
Volver al Bluetracker

Workshop PTR 0 no longer considered false?

Workshop Discussion

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 Ifs.
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 Ifs 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.

Zach Metcalf
05-02-2020 12:49:25

Thanks for the report here! We’re following up on this.

Fuente

Completar Registro

Política de cookie (EU)

BlueTracker

Back to Top

Log In

Or with username:

Forgot password?

Don't have an account? Register

Forgot password?

Enter your account data and we will send you a link to reset your password.

Your password reset link appears to be invalid or expired.

Log in

Privacy Policy

To use social login you have to agree with the storage and handling of your data by this website.

Add to Collection

No Collections

Here you'll find all collections you've created before.