Tween ended ignores a Scene variable

Hi guys,
I have noticed that if I have a condition with tween ended, GDevelop ignores a Scene variable condition. In this case Fishable=1. It runs the action even though the current state is Fishable=0



Hello, Farre!

I did a simple test here and I couldn’t reproduce the problem. Thats my simple code:

If I don’t press the “a” key to change my scene variable to 1 my “NewSprite” object doesn’t start the new tween “Movement” in the second event. So, the condition of scene variable is working and making it false. When I change to 1 it works fine and starts the tween “Movement”.

Your printscreen don’t show to us when you are changing your scene variable “Fishable” in your code. Can you provide it?

Try using the debugger and the search function to see if there is some other forgotten event changing your variable.

Actually the variable is static right now (created at the beginning of scene). I just created the variable to show what I mean. To be clear, the variable doesn’t change value anywhere in the code. It is always 0 (zero). But to run the condition the variable has to be 1. As I wrote, it ignores that it is 0 and runs the action anyway.


I understood. So my only guess is close and open another Gdevelop if you haven’t already to see if it’s a preview issue. Sometimes my preview stops updating as I change events. Other than that I can’t think of anything else.

Hi you maybe want to try this

Event-> Tween Bla… finished
→ Sub event
— > Variable x == 1 → Action → do stuff here
There is no need for Trigget once because the Tween is deleted.
Sub event → Action → Delete tween Bla…