Client
Return true or false when a specific button has just been pressed on a controller.
local retval --[[ boolean ]] = input.button_just_pressed(buttonname --[[ string ]])
local retval --[[ boolean ]] = input.button_just_pressed(buttonid --[[ integer ]])
Using a button name:
if input.button_just_pressed("BUTTON_SOUTH") then print("'A' button has just been pressed on your controller") end
Using a button id:
if input.button_just_pressed(0) then print("'A' button has just been pressed on your controller") end
Last updated 5 months ago