GetPlayerControlState

Kategorie: Spieler
Ab Engineversion: 5.1 OC

Beschreibung

Returns the current state of a control for a certain player. The return value is the strength of the control (e.g. for gamepad joysticks). If the control is assigned to a key, a value not equal to 0 means that the key is currently held down by the player.

Syntax

int GetPlayerControlState(int player, int control);

Parameter

player:
Number of the player whose control state you want to query.
control:
Control to query. A CON_* constant should be used here.

Beispiel

if (GetPlayerControlState(GetOwner(), CON_Left) != 0)
    Log("You are currently holding down the left cursor key!");
Prints a message when the player is holding down the key assigned to the control CON_Left.
Siehe auch: GetPlayerControlAssignment
Zapper, 2015-10