Cinematics
The cinematics object provides functions that allow control over playback of cindy scenes in campaign. These are cinematic scenes created in the cindy editor that allow smooth camera tracks to be created with control over lighting and props. Cindy scenes are used for in-game cutscenes.
In battle, the same functionality is provided by the battle
interface - see the documentation for Cindy and Composite Scenes
.
Loaded in Campaign |
This interface is created by calling cm:cinematic
function, which returns a cinematics object. Once created, functions on the object may be called in the following form:
Example - Specification:
<object_name>:<function_name>(<args>)
Example - Creation and Usage:
local cinematic = cm:cinematic()
cinematic:stop_cindy_playback(true) -- calling a function on the object once created
-
cinematics:cindy_preload(
pathstring
)
-
Preload the assets related to a cindy file, so there is no visible stutter when it is actually played.
Parameters:
1
cindy xml path, from the data/ folder.
Returns:
nil
-
cinematics:cindy_playback(
filepathstring
, [
blend in durationnumber
], [
blend out durationnumber
])
-
Starts playback of a cindy scene.
Parameters:
1
File path to cindy scene, from the working data folder.
2
optional, default value=nil
Time in seconds over which the camera will blend into the cindy scene when started.
3
optional, default value=nil
Time in seconds over which the camera will blend out of the cindy scene when it ends.
Returns:
nil
-
cinematics:stop_cindy_playback([
clear scenesboolean
])
-
Stops any running cindy scene started with
cinematics:cindy_playback
.Parameters:
1
optional, default value=false
Clear animated scenes.
Returns:
nil
-
cinematics:cindy_playback_no_camera(
path
string
,
clear scenes on completion
boolean
,
save into replay
[boolean
]
) -
Starts a cindy scene with no camera track.
Parameters:
1
cindy xml path, from the data/ folder.
2
Clear animated scenes on completion.
3
optional, default value=true
Save into replay.
Returns:
nil
-
cinematics:stop_cindy_playback_no_camera([
clear scenesboolean
])
-
Stops any running cindy scene started with
cinematics:cindy_playback_no_camera
.Parameters:
1
optional, default value=false
Clear animated scenes.
Returns:
nil