Hello everyone, thank you in advance to those who will take the time to check my issue :)
Explanation of my problem: I want when the player does an action (in this case, click with the mouse on a button), it changes my global variable (which is a string which allows me to manage the location of the game)
The thing is that it only works if I add a small delay of 0.01 seconds to my action, otherwise it doesn't work. I tried changing the mouse to a keyboard input to see, but same problem.
My code itself works with this trick, I would just like to know if you could explain this strange need for a delay... It could help me later to debug more easily :)