IsUsingJoystick
This function was added in DSL 5
Description
Returns if the controller is an xbox controller (otherwise it a keyboard).
function IsUsingJoystick(controllerId) --[[ ... ]] end
Parameters
controllerId
:0|1|2|3
- The controller to check.
Return Values
isUsingJoystick
:boolean
-true
if the controller is an xbox controller,false
if it is a keyboard.
Example
if IsUsingJoystick(0) then
print('Player 1 is using an xbox controller.')
else
print('Player 1 is using a keyboard.')
end