| < Animation timing | Index | Input > |
Usually, events in an adventure game depend only on the actions of the player, but not on time. Nonetheless, time may be used to control parts of the game or animations in scenes. Playback of media like audio or video are also related to real time.
Note: Media files are retrieved from the media path as described in the Game item.
| Item type | Timer |
|---|---|
| Description | a timer for real time control |
| Action | start / stop timer |
| Condition | true, while active |
| Key | Type | Default | Description |
|---|---|---|---|
| action | Actions | action to execute, when time has passed | |
| time | value | time interval in milliseconds to pass | |
| repeat | value | 1 | number of repetitions (0 for infinite) |
Note: Timers are only valid in scenes. All timers are stopped, if the scene is left. They are suspended, if another view is opened or the game is minimised.
| Item type | PlayAudio |
|---|---|
| Description | plays audio files |
| Action | start / stop playback |
| Condition | true, while active |
| Key | Type | Default | Description |
|---|---|---|---|
| audio | file | audio file name | |
| repeat | value | 1 | number of repetitions; 0 means forever |
| sync | bool | 0 | synchronisation flag; if true, the game is suspended during playback |
| end | Actions | <> | action to execute, when playback is over |
For cd-audio playback, use track.cda, where track starts with 1. The track is played on the first cd-drive that has the according cd-audio track.
Several audio files of the same type may be played simultaneously. Only midi and cd-audio are limited to a single track at once.
Since there may be a remarkable delay when loading audio files, there is a faster method, that is restricted to WAV-audio and a single playback (use -1 / SINGLE_SHOT as value on repeat). This is very limited, but useful for animations.
| Item type | PlayVideo |
|---|---|
| Description | plays video files |
| Action | start / stop playback |
| Condition | true, while active |
| Key | Type | Default | Description |
|---|---|---|---|
| video | file | video file name | |
| repeat | value | 1 | number of repetitions; 0 means forever |
| sync | bool | 0 | synchronisation flag; if true, the game is suspended during playback |
| end | Actions | <> | action to execute, when playback is over |
| position | vpoint | (0,0) | position in scene |
| size | vpoint | (100,100) | size of video |
| stretch | bool | 1 | if true, size is the scaling factor in percent |
Note: The video will be in front of all images of the scene.