Gamepad Analog Trigger Pressure detection

Get help using Construct 2

Post » Sat Aug 23, 2014 8:09 pm

Looking through the gamepad entry in the manual, there doesn't seem to be any way of detecting gamepad trigger button pressure (e.g. to support accelerate/brake in a racing game). Is there any way to implement analog triggers currently in Construct2?
B
12
S
2
G
1
Posts: 26
Reputation: 892

Post » Sat Aug 23, 2014 8:34 pm

I thought the pressure buttons were accesible by gamepad.button(0,6) and gamepad.button(0,7)

In this topic the whole gamepad was made visible:

making-hud-analog-joystick-that-lines-up-with-gamepad_t111060?&hilit=gamepad
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Tue Aug 26, 2014 11:54 pm

@LittleStain, on an xbox 360 pad the trigger buttons are accessible but they are binary as far as Construct2 is concerned (if I'm not mistaken). Either they are pressed or they are not. What I'm looking for is the degree to which the trigger is being pressed as they are analog buttons. E.g. is the trigger partially down, half way down, all the way down. If for example the triggers detect 10 degrees of pressure I'd like to return a number between 0 and 9 rather than pressed/not pressed.
B
12
S
2
G
1
Posts: 26
Reputation: 892

Post » Wed Aug 27, 2014 8:02 am

They are not binary..
i believe a number between 0 and 100 is given for the analog buttons..
At least that's what I read in the manual and heard from the guy who made the hud analog joystick above..
I wouldn't have put the link there if I thought it wasn't usefull..
If you had read it you'd have seen that it was pretty hard finding the right input but in the end we (he) did..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 6 guests