I can’t get the gamepad to work with the platform behavior:
-Platform behaviour default keys controls are deactivated.
-The platform behaviour works with keyboard, using simulate key pressed events.
-The gamepad index is 1 and works in events not related with platform behaviour.
-I am using conditions if any a these conditions is true “||” for keys a gamepads buttons, just like the examples in Gdevelop.
Any clue what happens? is it a bug? thank you.
You should take a look at this example:
Thank you but I can’t follow this example because is with default keyboard controls. I need custom controls.
Anyway it seems related a incompatibility between keys a gamepad. Here is an example, try this:
1.If you press spacebar the number increase
2.If you release spacebar the number is zero again
3.If you press gamepad button the number increase
4.If you release gamepad button the number zero again.
Ok, so far is ok.
5.If you press spacebar the number is 1 and no increase
6.If you release spacebar the number is zero again.
7.If you press the gamepad button the number increase
8.If you release gamepad button the number is zero again.
Maybe is the behaviour expected because it souldn’t mix both control systems, in fact there are some games that is not possible play with both controls or there are isolated code for each.
Should I create isolate code for each control system keys and gamepads?
Anyway I think the bug would probably remain even if the code of each control is totally isolated
The same thing happens between gamepad buttons, so it is not the expected behavior
You are telling it to go back to 0 if one of those conditions is true.
Using a “AND” check like down below instead of a “OR” would do the trick:
I have done some more testing. It looks like when you have released a gamepad button and you are not pressing it again, it continuously detects it as being released. Unlike a keyboard key, which actually detects it as a release.
Nice workaround you just need to convert it to an once event trigger since a key release event only works for one frame. I think it should not be a problem, thank you!
Anyway the gamepad extension is not working expected, it would great if it will fix