GetPlayerInput

From Eternity Wiki
Revision as of 05:08, 10 May 2026 by Printz (talk | contribs) (Created page with "{{ACSFunction|description=Gets information about a player's input. |usage=''int'' '''GetPlayerInput'''(''int player'', ''int type'') |parameters= *''player'': player index, from 0 to 3. Use -1 for activator. *''type'': one of the following: :*'''INPUT_OLDBUTTONS''' (0): unused, returns 0 :*'''INPUT_BUTTONS''' (1): will return a combination of the following flags: ::*'''BT_ATTACK''' (1): normal weapon attack ::*'''BT_USE''' (2): switch or door activation ::*'''BT_JUMP'''...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Description[edit]

This is an ACS built-in function.

Gets information about a player's input.

Usage[edit]

int GetPlayerInput(int player, int type)

Parameters[edit]

  • player: player index, from 0 to 3. Use -1 for activator.
  • type: one of the following:
  • INPUT_OLDBUTTONS (0): unused, returns 0
  • INPUT_BUTTONS (1): will return a combination of the following flags:
  • BT_ATTACK (1): normal weapon attack
  • BT_USE (2): switch or door activation
  • BT_JUMP (4): jump or attempting to jump
  • BT_ALTATTACK (32): secondary fire button
  • BT_RELOAD (64): weapon reload
  • BT_ZOOM (128): weapon view zoom
  • BT_USER1 (2097152), BT_USER2 (4194304), BT_USER3 (8388608), BT_USER4 (16777216): user-defined buttons
  • INPUT_PITCH (2): view pitch change (looking up or down)
  • INPUT_YAW (3): angle turn
  • INPUT_FORWARDMOVE (5): forward and backward move
  • INPUT_SIDEMOVE (6): strafing
  • INPUT_UPMOVE (7): flight (if available)

Return value[edit]

The value for the given type

Examples[edit]

No examples given.

Notes[edit]

In Eternity, there are also MODINPUT_... options, but they mean the same as the INPUT_... ones. Anything else will just return 0.

This function's identification in zspecial.acs is: ACC internal.

See also[edit]