I have found a conflict between a key(keyboard) released event and button released event. Gamepad extension itself is working fine but it returns true in a key release event when the gamepad button have not been released. Example:
When space key or gamepad button is pressed, only one object is created and moved to the right. Until the space key or gamepad button is released it is not possible create another object.
To reproduce the bug first you have that press the gamepad button and release. After keep pressed the space key and you can notice how are creating a lot objects when should be created only one.
Try to make event separated one event for keyboard and other for gamepad, even they do the same if the events are separated without the or function. Plus add Trigger Once like
Condition:
Space key is pressed or released
Trigger Once
Action:
Create object NewObject…
Condition:
Button A of gamepad 1 is pressed or released
Trigger Once
Action:
Create NewObject…
Thanks for reporting
Please share the project and provide clear reproduction steps (order of keypresses) so we can confirm the bug and forward it to the devs.
I’ll investigate if there is a bug with gamepad extension, in the meantime check your logic event, you can use the debugger it’s free.
And you can create log by adding a text object and write inside what is supposed to happend.
The problem is i guess when the gamepad button is released, the returned value is false because there is an extra check, problably useless, so i’ve removed the check.
I have tried the fix and nothing has changed. I have tested the fix with the experiment that I have shared and with my project and nothing have changed.
Maybe it’s not explained well the problem. The project should create only one instance pressing spacebar/gamepad button"A". With the fix the project is creating a instance every frame pressing spacebar/gamepad button"A".
Thank you for try help but you don’t have understood the point of the thread. It works fine for spacebar, It doesn’t work for gamepad. Anyway I can’t use in this case trigger once because I need have free control of the keypressed variable for another involved event in my real project.
I am trying it with a real xinput device, xbox 360 controller.
Well, was this a joke? this is not funny to play with people’s time and work. I downloaded the fix and it doesn’t works. If Gdevelop is broken at least don’t joke about it.
Did you try to separate the events one for keyboard and other for Gamepads?
I don’t think anyone here makes jokes, we are trying to help regardless of the knowledge of each user and the possible issues of GDevelop, we always try to help.
I actually encountered this tonight using an xbox series x controller.
Using gamepad button released condition seems to default to true and repeats actions every frame after the button has been released. Yes, this can be made to work only once with a trigger once event, but in contrast, key released condition only works once and does not need a trigger once event.
I’ve uploaded a sample project showing this in action.