GamePad Button Released acting weird

I was trying to add controller support for my games menu but it kept glitching out so I made a new project to mess around with gamepads and it gives me the same issue. I setup a state variable that I change to indicate what page my menu is on. Using a keyboard it switches just fine but with a controller it stops working correctly after the first switch. Not sure if it’s a bug or I’m doing something wrong.

Here is a link to it:

Try to add Trigger Once in the Button “ABXY” of gamepad is released, to ensure that event runs just one time.

Do like if gamepad is connected
— condition:
Addvanced AND
---- gampad “ABXY” is released
---- variable state = 0

Triggers don’t seem to fix anything.

Here is the gdevelop file:

I made some modifications tested with an 8bitdo controller and works fine.

Your file is corrupted or something, it’s only 3 KB.

Oh, sorry i didn’t know that was corrupted anyway here is the solution

That fixed it but I’m wondering why gamepad released requires a trigger once condition but keyboard released doesn’t?

I definitely don’t like having to make the gamepad button releases parent to the page variables for organizational reasons but I did it anyway.