crystal.input.mouse_player

Returns the player index of the player using the mouse. This is player 1 by default, and can be changed by calling assign_mouse.

Usage

crystal.input.mouse_player()

Returns

Name Type Description
player_index number Numeric identifier representing the player who is using the mouse.

Examples

crystal.input.assign_mouse(2);
assert(crystal.input.mouse_player() == 2);

This site uses Just the Docs, a documentation theme for Jekyll.