Client
Return true or false when a specific button is currently pressed on a controller.
local retval --[[ boolean ]] = input.button_is_pressed(buttonname --[[ string ]])
local retval --[[ boolean ]] = input.button_is_pressed(buttonid --[[ integer ]])
Using a button name:
if input.button_is_pressed("BUTTON_SOUTH") then print("You're currently pressing 'A' button on your controller") end
Using a button id:
if input.button_is_pressed(0) then print("You're currently pressing 'A' button on your controller") end
Last updated 3 months ago