Input
Usually, a game is controlled simply by the actions caused by mouse movements and clicks
as specified in the Scene and Region items. Additional control may
be realised by processing mouse and keyboard input directly. These items are valid only
for scenes.
| Item type | MouseInput |
| Description | tracks mouse events |
| Action | starts / ends mouse tracking |
| Condition | true, if active |
| Key | Type | Default | Description |
| action | Actions | | action to perform |
| xposition | var | | x coordinate of mouse |
| yposition | var | | y coordinate of mouse |
| move | bool | f | if true, mouse movement is tracked instead of clicks |
The action is performed each time, the mouse is clicked or moved respectively.
The coordinates of the mouse are assigned to the variables
for xposition and yposition.
| Item type | KeyInput |
| Description | tracks keyboard events |
| Action | starts / ends keyboard tracking |
| Condition | true, if active |
| Key | Type | Default | Description |
| action | Actions | | action to perform |
| key | value | | virtual key code |
| down | bool | f | if true, pressing the key instead of releasing is tracked |
Note: If down is true, multiple events are caused as long as the key is pressed.
If key is a variable, the code of the pressed key is assigned to it.
Note: The keys F1 to F12 and ESC are already used as menu shortcuts.
| Key | Code |
| backspace | 8 |
| tab | 9 |
| return | 13 |
| shift | 16 |
| control | 17 |
| caps | 20 |
| escape | 27 |
| space | 32 |
| page up | 33 |
| page down | 34 |
| home | 35 |
| end | 36 |
| left | 37 |
| up | 38 |
| right | 39 |
| down | 40 |
| insert | 45 |
| delete | 46 |
| 0-9 | 48-57 |
| A-Z | 65-90 |
| F1-F12 | 112-123 |
Character Position
| Item type | CharacterPosition |
| Description | tracks the current position of the character |
| Action | starts / ends position tracking |
| Condition | - |
| Key | Type | Default | Description |
| action | Actions | | action to perform |
The action of this item is performed, when tracking starts and each time the position or orientation
of the character changes. The position, orientation, and scaling factor of the character may be accessed
by the according variables (s. definitions)