Tile - YLocalPlayer - Get Primary Horizontal Input – Ylands

From Bohemia Interactive Community
Revision as of 15:26, 24 November 2023 by Lou Montana (talk | contribs) (Text replacement - "{{DEFAULTSORT:{{#sub:{{PAGENAME}}|14}}}}" to "{{DEFAULTSORT:{{#sub:{{PAGENAME}}|7}}}}")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Get Primary Horizontal Input()

YlandsTile-938.png

static getPrimaryHorizontalInput(): number;

Returns

number

Availability

Client, Single Player

Description

Horizontal input of the player in a single player game.

Notes

  • Returns -1 if the player presses A
  • Returns +1 if the player presses D
  • Returns 0 if nothing or both are pressed
  • On a phone, or with a game controller, partial numbers between -1 and 1 are possible.
  • This tile does not automatically prevent player movement. This can be disabled separately by unchecking "Player - Directional Movement" within a **Custom Controls ** Game logic.