Tile - YLocalPlayer - Get Vertical Input – Ylands

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Added link to Naru's corner (first link to youtube didn't work, but I realized can link it to the forum post))
m (changed to "the player")
Line 1: Line 1:
[[Image:Ylands_Tile_-_Character_input.png]]
[[Image:Ylands_Tile_-_Character_input.png]]
* Horizontal input
* Horizontal input
** Returns -1 if you press A
** Returns -1 if the player presses A
** Returns +1 if you press D
** Returns +1 if the player presses D
** Returns 0 if nothing or both are pressed
** Returns 0 if nothing or both are pressed
* Vertical input
* Vertical input
** Returns -1 if you press S
** Returns -1 if the player presses S
** Returns +1 if you press W
** Returns +1 if the player presses W
** Returns 0 if nothing or both are pressed
** Returns 0 if nothing or both are pressed
=Examples=
=Examples=

Revision as of 13:24, 16 December 2020

Ylands Tile - Character input.png

  • Horizontal input
    • Returns -1 if the player presses A
    • Returns +1 if the player presses D
    • Returns 0 if nothing or both are pressed
  • Vertical input
    • Returns -1 if the player presses S
    • Returns +1 if the player presses W
    • Returns 0 if nothing or both are pressed

Examples

Simple example (no turning): Ylands Tile - Character input-Example1.png


Complex example from Naru's Corner #10: Ylands Tile - Character input-Example2.png

Notes

  • Only available in single player
  • On a phone, or with a game controller, partial numbers between -1 and 1 are possible.



Template:Ylands scripting navbox