dumb question

Blitz3D Forums/Blitz3D Beginners Area/dumb question

bloos_magoos(Posted 2014) [#1]
so im using an xbox controller for a projecr, and i want to use the dpad to navigate menus. the problem is, using joyhat just returns a number repeatedly based on the dpad being pressed, which is the equivalent of like a keydown kind of thing

whats a good way to make it return if the dpad button is pressed? where it only returns that it was pressed once, not held down? i dont want my menu to go crazy, just use the dpad like a joyhit type thing (i know that sounds stupid)

tl,dr: im looking for a way to return the dpad buttons as joyhits, in some way


Ginger Tea(Posted 2014) [#2]
There are joy hit and joy down examples in the manual section of this website, I don't have blitz installed ATM nor have my wired 360 pad at hand either, but I am sure it can work how you want it, either out of the box using one or the other, or you can trap the result so when it is pressed and held even though it is spamming the input parameters it only says "if still held just do nothing".

But I am sure one of them solves it out of the box.

Be warned though that not all joypads assign the same values to buttons, I don't recall exactly but a ps3 compatible pad gave different values on some but not all buttons than a 360 and dedicated PC pads the same, so if you hard code for xbox it might not be the dpad activated on another pad if you forget yours and use one you find lying around.