S2ENGINE HD
1.4.6
Official manual about S2Engine HD editor and programming
|
S2Engine HD input subsystem implements support for 3 devices:
S2Engine HD lets you to configure an input map (see Input Mapping) for associating input values coming from one or more devices to user defined identification names.
However in the standard scripting library there are some basic functions to simply retrieving raw input values:
Upon these functions there is a more high-level system for retrieving input: Input Mapping. This system is based on two main notions:
In order to retrieving these values you must first configure the input map, see Input Mapping. Suppose you have configured input map, there is a set of functions for retrieving the values associated to user defined Id names of the input map.
The following is the set of functions of standard library designed to managing values of input axes:
Suppose you have configured an input map axis as following:
Name | Input | Scale |
MoveForward |
|
|
If you want to know "how much" player is moving forward you can write:
In this case variable moveFwd
will assume [0.0,1.0] values if pressing w key, [-1.0,0.0] if pressing s key or [-1.2,1.2] if moving gamepad Left stick on vertical axis.
The following is the set of functions of standard library designed to managing values of input actions:
Suppose you have configured an input map action as following:
Name | Input |
Shoot |
|
If you want to know if player shoots you can write
In this case variable isShooting
will assume "true"
value if mouse button 0 or e key or Pad R Thumb are pressed, otherwise it assumes "false"
value