Game logic - Custom controls – Ylands

From Bohemia Interactive Community
Jump to navigation Jump to search
(Created page with " ---- {{Ylands editor navbox}} Category: How-to")
 
No edit summary
Line 1: Line 1:
=Overview=
Custom controls manager allows the user to customize the controls (i.e key bindings) of a custom game.
*Custom controls manager can be found under '''Scripting Tools / Custom controls''' in the Editor header.
*Custom controls allow to disable any of the '''default actions'''.
*Custom controls allow to define '''custom triggers''' and '''custom actions'''.
[[File:Ylands-Editor-CC-scheme.png|upright=2.0|thumb|center]]
===Triggers===
Each time player uses any kind of Human Interface Device (keyboard, mouse or mobile device) a trigger is fired. There are two types of triggers - custom and default triggers.
*'''Default triggers''' - are default user controls (as defined in game options) which trigger '''default game actions'''.
*'''Custom triggers''' - are custom user controls defined only for the purpose of current Custom game, but alone they will do nothing.
===Actions===
When a trigger is fired (default or custom), in order to take effect a corresponding action has to be fired to actually make any impact on the game.
*'''Default actions''' - are the actual default user actions embedded in the game, such as firing a weapon or driving a car.
**Can be disabled using the Custom controls manager.
*'''Custom actions''' - are actions defined by Game creator.
**Custom action can use both '''default''' or '''custom''' '''triggers''' to be instigated.
**In order to have any effect, each custom action has to be scripted via Event Listener.
=Custom Controls manager=
[[File:Ylands-Editor-CC-overview.png|upright=2.0|thumb|center]]
===Context===
Context is a category of controls related to specific control mode, for example when sailing a ship or riding a horse. When selecting a context from drop-down menu, the preview in the middle will change accordingly. Preview allows to check the controls layout and verify whether the control elements are not obstructing each other (mobile only).
===Default actions===
It is possible to disable any default action using the Default actions tab in Controls manager. Simply un-check the checkbox next to the name of default action to disable it in game.
===Custom triggers===
It is possible to disable any default action using the Default actions tab in Controls manager. Simply un-check the checkbox next to the name of default action to disable it in game.
===Custom actions===
It is possible to disable any default action using the Default actions tab in Controls manager. Simply un-check the checkbox next to the name of default action to disable it in game.





Revision as of 14:49, 1 June 2020

Overview

Custom controls manager allows the user to customize the controls (i.e key bindings) of a custom game.

  • Custom controls manager can be found under Scripting Tools / Custom controls in the Editor header.
  • Custom controls allow to disable any of the default actions.
  • Custom controls allow to define custom triggers and custom actions.
Ylands-Editor-CC-scheme.png

Triggers

Each time player uses any kind of Human Interface Device (keyboard, mouse or mobile device) a trigger is fired. There are two types of triggers - custom and default triggers.

  • Default triggers - are default user controls (as defined in game options) which trigger default game actions.
  • Custom triggers - are custom user controls defined only for the purpose of current Custom game, but alone they will do nothing.

Actions

When a trigger is fired (default or custom), in order to take effect a corresponding action has to be fired to actually make any impact on the game.

  • Default actions - are the actual default user actions embedded in the game, such as firing a weapon or driving a car.
    • Can be disabled using the Custom controls manager.
  • Custom actions - are actions defined by Game creator.
    • Custom action can use both default or custom triggers to be instigated.
    • In order to have any effect, each custom action has to be scripted via Event Listener.


Custom Controls manager

Ylands-Editor-CC-overview.png

Context

Context is a category of controls related to specific control mode, for example when sailing a ship or riding a horse. When selecting a context from drop-down menu, the preview in the middle will change accordingly. Preview allows to check the controls layout and verify whether the control elements are not obstructing each other (mobile only).

Default actions

It is possible to disable any default action using the Default actions tab in Controls manager. Simply un-check the checkbox next to the name of default action to disable it in game.

Custom triggers

It is possible to disable any default action using the Default actions tab in Controls manager. Simply un-check the checkbox next to the name of default action to disable it in game.

Custom actions

It is possible to disable any default action using the Default actions tab in Controls manager. Simply un-check the checkbox next to the name of default action to disable it in game.





Template:Ylands editor navbox