Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:CanPlayCinematic

From RoR Wiki

UI Lua API · Pregame functions
Version: WAR 1.4.8

Returns whether the intro cinematic can be played.

canPlay = CanPlayCinematic()

Arguments

None.

Returns

canPlay
boolean – true if the cinematic can be played.

Details

  • The result is false if the sound system exists and reports that it is not ready for video.
  • Otherwise the result is true only if the file videos/Cinematic1_720p.bik exists in the game archives.
  • PregamePlayCinematic checks the same conditions before it starts playback.
  • Unlike the other pregame cinematic functions, this one does not depend on the game state.

Errors

None.

Example

From interfacecore/source/cinematicwindow.lua, which offers the cinematic web page when the video cannot be played:

if ( CanPlayCinematic() )
then
    -- show EA_Window_CinematicDisplay ...
    PregamePlayCinematic()
else
    DialogManager.MakeTwoButtonDialog( GetPregameString(StringTables.Pregame.DIALOG_CONFIRM_OPEN_CINEMATIC),
                                       GetString(StringTables.Default.LABEL_YES), OpenCinematicPageInBrowser,
                                       GetString(StringTables.Default.LABEL_NO), nil,
                                       nil, nil, false, nil, nil )
end

See also