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 | |
Loaded in Battle | |
Loaded in Frontend |
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(
pathstring
, [
blend innumber
], [
blend outnumber
])
-
Starts a cindy scene.
Parameters:
1
cindy xml path, from the data/ folder.
2
optional, default value=nil
Blend in duration in seconds.
3
optional, default value=nil
Blend out duration in seconds.
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