M MY Multiplayer: Wiki
Side
Kind

getCinematicDuration

Client

Returns how long the cinematic lasts.

int, bool|false getCinematicDuration(cinematic cinematic)

Parameters

NameTypeDescription
cinematiccinematicThe cinematic.

Returns

The duration in ms and whether it was fixed by setCinematicDuration, or false if the element is not a cinematic.

Without a fixed duration, the cinematic lasts up to the last thing in it: a shot, a weather, hour or fade key, a sound, a caption, or the end of a take or of a placed prop.

Example

local intro = createCinematic("cinematics/intro.cine")
local length, fixed = getCinematicDuration(intro)
outputDebugString(("Intro: %.1f s%s"):format(length / 1000, fixed and " (fixed)" or ""))

See also