Variables not working after loading a project

im using GDevelop 5.0.127 version and expiriencing not a good time with scene variables. When creating scene variables in new scene, they works perfectly fine. for example adding +1 to variable when keyboard button is pressed.

However if i close GDevelop and open it again, open that scene, scene variables and theirs conditions that i set before still working, but if i add a new condition to scene variable for example add +1 to variable when keyboard button is pressed, this new condition is totally ignored and value of variable dose not change. and if i create a new scene variable it still wont react to conditions.

How to solve this problem?

upd: tried to add global variable it does not work too, just not reacting to conditions

1 Like

Hey friend, I think it is about conflicting events, can you show us your events?

sure here are the events

and others

This event sets your variable back to 0.

As @Muzan pointed out, the actions of pressing the d key are negated by the actions when the player is on a platform.

How are you determining the keypress is ignored? Are you outputting the value of jumpcount to a text object on the screen, or to the debugging console?

From your code, it looks like pressing the d key will increase jumpcount very rapidly while the player is not on a platform.

i cleared every event in event sheet and scene variables in existing scene and created only one new scene variable and event for it to add number when key is pressed. It worked, debugger saying that value goes up. i will try to make a new scene from scratch with no behaviors and with way more cleaner event sheet so i could be possible to troubleshoot…

btw for people that cant use debugger (as myself, idk how or why but today it worked when i restarted GDevelop a bunch of times), when displaying variable value through text object leave condition EMPTY. Do not use “At the beginning of the scene” condition. if i add “At the beginning of the scene” condition, variable value will be changing but text object will not change (it will be set as initial value of variable and wont change it makes sence when i think about it now…)

Thanks for the replies everyone!!

1 Like