boolean value fluctuating between true and false

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By valmer75

I am new to godot and game development in general but am familiar with coding and this doesn’t make since. I have a simple death scene that works and counts down to zero then creates a new character when the old one dies and quere_free itself, pretty simple.

However I try to change the visibility value it doesn’t work, I can change it in the ready function and it works correctly but whenever I try to change it anywhere else it dose not work. I can set it to be true/false in ready and it works fine but I have a function that flips the value of the visible, true to false and false to true in a if elif statement , the function is called via a signal when the character die and when a new character spawn in so I don’t believe that I am calling the function 2 times in a row

but when I print the visible value in the process function the value fluctuates when the value is suppose to be flipped, like it will print a solid line of true, but when it is suppose to print false it will print a pattern of true and false, then back to true when the value is suppose to be true, this goes for reverse as well, if I change it to false in the ready it will print a solid line of false, but when I try to change it to be true it prints a pattern of false,true again

I must be missing something please help as I am lost

You can publish the parts of the code that you think give problems. Read the guide so that the code is well formatted:
README: How to use this Q&A? - Archive - Godot Forum

estebanmolca | 2021-08-22 03:25

As esteban said above, we need to look at the code to know what’s going on. Or did you solve it already?

MisterMano | 2021-08-25 22:15

:bust_in_silhouette: Reply From: Axenide

I have the exact same problem. Did you find a solution?