Tile - YLocalPlayer - Get Vertical Input – Ylands

From Bohemia Interactive Community
Jump to navigation Jump to search
m (changed to "the player")
(→‎Notes: Added information about disabling player movement.)
Line 19: Line 19:
* Only available in single player
* Only available in single player
* On a phone, or with a game controller, partial numbers between -1 and 1 are possible.
* 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 [[Ylands_Game_logic_-_Custom_controls|Custom Controls]] game logic or using this tile:
[[Image: Ylands_Tile_Default_Key_Action_-_Player_Directional_Movement_False.png]]


----
----

Revision as of 12:51, 17 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.
  • This tile does not automatically prevent player movement. This can be disabled separately by unchecking "Player - Directional Movement" within a Custom Controls game logic or using this tile:

Ylands Tile Default Key Action - Player Directional Movement False.png


Template:Ylands scripting navbox