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 campaign
Back to top

Creation and Usage

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
Back to top

Methods

cinematics:cindy_preload(string path)

Preload the assets related to a cindy file, so there is no visible stutter when it is actually played.

Parameters:

1

string

cindy xml path, from the data/ folder.

Returns:

  1. nil

cinematics:cindy_playback(string filepath, [number blend in duration], [number blend out duration])

Starts playback of a cindy scene.

Parameters:

1

string

File path to cindy scene, from the working data folder.

2

number

optional, default value=nil

Time in seconds over which the camera will blend into the cindy scene when started.

3

number

optional, default value=nil

Time in seconds over which the camera will blend out of the cindy scene when it ends.

Returns:

  1. nil

cinematics:stop_cindy_playback([boolean clear scenes])

Stops any running cindy scene started with cinematics:cindy_playback.

Parameters:

1

boolean

optional, default value=false

Clear animated scenes.

Returns:

  1. nil

cinematics:cindy_playback_no_camera(
  
string path,
  boolean
clear scenes on completion,
  [boolean
save into replay]
)

Starts a cindy scene with no camera track.

Parameters:

1

string

cindy xml path, from the data/ folder.

2

boolean

Clear animated scenes on completion.

3

boolean

optional, default value=true

Save into replay.

Returns:

  1. nil

cinematics:stop_cindy_playback_no_camera([boolean clear scenes])

Stops any running cindy scene started with cinematics:cindy_playback_no_camera.

Parameters:

1

boolean

optional, default value=false

Clear animated scenes.

Returns:

  1. nil
Last updated 07/02/21 06:39:14