Gamepad extension bug

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…

1 Like

Thanks for reporting :slight_smile:
Please share the project and provide clear reproduction steps (order of keypresses) so we can confirm the bug and forward it to the devs.

2 Likes

project download link: My project

Steps:

  1. connect a gamepad
  2. Run the project
  3. Press and release “A” gamepad button.(necessary to reproduce the bug)
  4. Hold pressed spacebar key.

You will notice that gamepad button release event is true constantly holding pressed spacebar.

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.

1 Like

Can you try this version? i’ve made a fix, but i can’t release it to public for now without know if others games are affected.

FILES OUTDATED
Download the fix 0.0.8a gamepad extension

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.

1 Like

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.

Ok, so here another bug fix, it works for me with your original project :slight_smile:

FILES OUTDATED
Second fix 0.0.8a gamepad

FILES OUTDATED
Mirror link 1

1 Like

I can’t download it. Can you reupload please? thank you.

I have fixed the link. Try again @elcano.

FILES OUTDATED
Second fix 0.0.8a gamepad

FILES OUTDATED
Mirror link 1

2 Likes

For me it’s not working, still have the same bug in the shared project. Anyone else can test it?

My god all the links are false and use the current gamepad extension.
My bad, it’s my fault i’ve uploaded the wrong file :confused:

Here a new version of the project with the integrated fix, and the gamepad extension file if you want import the fix in another project.

Once again, sorry for the lost time.

2 Likes

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".

Try to change the event on spacebar/A pressed to A released and add Trigger Once if is not added yet.

As I see in the screenshot you shared.

This is what is happening on Spacebar/A released you set a variable to no but if Spacebar/A is pressed you set to yes that is happening immediately.

1 Like

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.

1 Like

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.

gamepad example project zip

online build