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
Loaded in Battle Loaded in Battle
Loaded in Frontend Loaded in Frontend
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 path, [number blend in], [number blend out])

Starts a cindy scene.

Parameters:

1

string

cindy xml path, from the data/ folder.

2

number

optional, default value=nil

Blend in duration in seconds.

3

number

optional, default value=nil

Blend out duration in seconds.

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 7/9/2024 11:45:04 AM