Since engine version: 1.0 OC
Called globally for each control command by players. See Player Controls.
bool PlayerControl(int player, int control, id control_extra, int x, int y, int strength, bool repeated, int state);
- Number of the player who pressed the control.
- Number of the pressed control, defined as a CON_ constant via PlayerControls.txt.
- Optional id defined with ExtraData in PlayerControls.txt.
- X coordinate for mouse controls.
- Y coordinate for mouse controls.
- Current strength of the control. For key presses: 0 or 100. For analog stick or trigger movement (state = CONS_Moved): 0 to
- Whether the call is generated because of a held button.
- State of the key press. Possible values:
Constant Description CONS_Down Key has been pressed down. CONS_Up Key has been released. Only generated for held keys. CONS_Moved An analog control on a gamepad has been moved. Only generated for held keys.
See also: GetPlayerControlState
See also: Player Controls