When the game is loaded the buttons of unlocked levels are set to 255 opacity but when you try to change manually unlocked levels variable then opacity its not going 255
As you can see, levels (1,2,3) are unlocked and 4 I set it manually and its opacity should be 255 but for sure its not
What makes it worse is the fact that button 5 and 6 have correct opacity of 100 and button 4 its not 100 and its not 255
I have an array called UnlockedLevels which child variables I set it either to 0 = Locked and 1 = Unlocked, to that im changing the opacity of buttons as you can see in the screenshoot.
I was helping Chess on discrod VC solve his problem which was related to saving/loading
BUT THEN this crap happens
Literally if he changed that array variables manually with key presses
Opacity would act as in on 4 button (it should be 255 which is not not even 100 so wtf?)
And IF we just load variable not changing it with key presses opacity works perfectly fine?
We even printed to text opacity of 3 and 4 buttons
And BOTH shows properly 100 when not unlocked and 255 when unlocked
And do it is not related to 3 and 4 buttons same issue happens on all buttons
Maybe lets sum it up
Chess have array variable called UnlockedLevels with 4 child vars
Each child is 0 and then button is set to 100 opacity
If that child is set to 1 then opacity of button is set to 255
IF values of child vars are loaded from storage everything works perfectly fine
BUT if we manually change these variables with key press (set it to 1)
Then even printing to text object it says button opacity = 255
BUT what actually we see is what you see on button 4
And we tested all buttons
When we do it manually it always end up looking as button 4 from screenshot
Only loading values from storage makes it work correctly
His button is single object a Button Panel Sprite object
With ID variable called Number with values 1 2 3 4 5 6
This is an instant build where you can see the problem
Press 1 2 3 4 in order to change opacity to 100, you can see that 1234 when they are pressed they are not the same opacity as 5 6, when should be the same opacity (100)