joy_buttons
joy2_buttons
Binary states of all joystick buttons of the first and second
joystick. Every
button corresponds to a bit in this variable. The fractional part contains the
bits from buttons 1..10, and the integer part contains the bits from buttons
11..32. A button state can be checked with the '&' operator.
Range:
1 = button 11 pressed.
2 = button 12 pressed.
4 = button 13 pressed.
8 = button 14 pressed.
16 = button 15 pressed,
etc. ...
Type:
var, read-only
Example
action fire_rocket17()
{
while(1)
{
if (joy_buttons & 64) // button 17 pressed?
{
ent_create("rocket.mdl" , my.x, rocket);
}
wait(1);
}
}
See also:
joy_1, joy_raw, joy2_raw, joy_rot , joy2_rot, joy_force, num_joysticks