I have a global variable (level) which is increased by one if the global variable (win) equal 1, so that after the player win he can go to the level selection layout and find level 2 opened,
and what I need is to make the global variable (level) keep the value 1 when I go to another layout
it worked fine with me, the global variable (level) kept its value when I used the action go to layout_level_selection inside the win = 1 condition like this:
but when I added the action go to layout_level_selection inside inside a button which will show when the player wins, the global variable (level) value reset to zero, like this: