Difference between revisions of "Joystick:setPlayerIndex"

(Created page)
 
 
Line 10: Line 10:
 
</source>
 
</source>
 
=== Arguments ===
 
=== Arguments ===
{{param|number|index|The 1-based player index to use for this Joystick.}}
+
{{param|number|index|The 1-based player index to use for this Joystick. <code>0</code> clears the set index.}}
 
=== Returns ===
 
=== Returns ===
 
Nothing.
 
Nothing.

Latest revision as of 18:56, 24 August 2024

Available since LÖVE 12.0
This function is not supported in earlier versions.

Sets the player index of this Joystick. This corresponds to an indicator light on many common gamepads.


Note that this is independent from the array index of this Joystick in the table returned by love.joystick.getJoysticks.

Function

Synopsis

Joystick:setPlayerIndex( index )

Arguments

number index
The 1-based player index to use for this Joystick. 0 clears the set index.

Returns

Nothing.

See Also

Other Languages