S2ENGINE HD
1.4.6
Official manual about S2Engine HD editor and programming
|
S2Engine HD has a tool for mapping input controls. This tool creates an input mapping configuration that engine automatically stores inside a file named input.cfg in the current project folder.
This file is automatically loaded when engine starts a project. Every project can have its input mapping configuration.
With this tool you can make an action inside the game to be associated to a key, a mouse button or a pad button, also you can make an analog value, a float in the [-x,x] interval to be associated, for example, to pad stick or mouse movements.
In the first case we refer to Input Actions in the second one we refer to Input Axis.
To access input configuration tool you can click the tool icon on the main toolbar as showed into the following image:
The following image shows the Input Mapper dialog:
To add a new Input Action click on + button as showed into the following image:
A dialog will appear That lets you to insert the name to be associated to the new Action:
The same operation is needed to add a new input axis, click on + of the InputAxis Group box:
After you have added a new Input action/axis you must add an element to associate a key, a mouse movement/button, or a pad stick/button to the action/axis.
A new item will appear, click on the ComboBox to choose what key/pad/mouse feature you want to associate:
Once you have filled the input map with a set of actions and axis you can use it inside GameMachine or with script Standard Library. There are script Input functions and/or GameMachine Action Classes specialized for retrieving the value of an input axis or action given its name in the map, i.e. the name we have chosen when setting up input map configuration.