Kategorie: Spieler
Ab Engineversion: 1.0 OC
GetPlayerControlAssignment
Beschreibung
Returns the name of the key, mouse of joystick button assigned to a control for a player. If the player number is invalid,
nil
is returned. For unassigned or invalid controls, "" is returned.Syntax
string GetPlayerControlAssignment(int player, int control, bool human_readable, bool short_name);
Parameter
- player:
- Number of the player for whom the control set is queried.
- control:
- Control to query. A CON_* constant should be used here.
- human_readable:
- If true, some internal names such as JOY_* for joystick buttons are replaced by variants suitable for display to the player.
- short_name:
- If true, short names are preferred if available. Currently effects Mac builds only.
Anmerkung
For network games and replays, the returned value is not synchronized. If the function is called for a remote player or during replay, "" is always returned for valid player numbers.
Beispiel
Message("Press <c ffff00>%s</c> to walk left!", GetPlayerControlAssignment(GetPlayerByIndex(0, C4PT_User), CON_Left, true, true));
Tells the first player how to walk left.