< Animation timing Index Input >

Real Time Control

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.

Timer

Item typeTimer
Descriptiona timer for real time control
Actionstart / stop timer
Conditiontrue, while active

KeyTypeDefaultDescription
actionActionsaction to execute, when time has passed
timevaluetime interval in milliseconds to pass
repeatvalue1number 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.

PlayAudio

Item typePlayAudio
Descriptionplays audio files
Actionstart / stop playback
Conditiontrue, while active

KeyTypeDefaultDescription
audiofileaudio file name
repeatvalue1number of repetitions; 0 means forever
syncbool0synchronisation flag; if true, the game is suspended during playback
endActions<>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.

PlayVideo

Item typePlayVideo
Descriptionplays video files
Actionstart / stop playback
Conditiontrue, while active

KeyTypeDefaultDescription
videofilevideo file name
repeatvalue1number of repetitions; 0 means forever
syncbool0synchronisation flag; if true, the game is suspended during playback
endActions<>action to execute, when playback is over
positionvpoint(0,0)position in scene
sizevpoint(100,100)size of video
stretchbool1if true, size is the scaling factor in percent

Note: The video will be in front of all images of the scene.