<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.returnofreckoning.com/index.php?action=history&amp;feed=atom&amp;title=API%3APregamePlayCinematic</id>
	<title>API:PregamePlayCinematic - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.returnofreckoning.com/index.php?action=history&amp;feed=atom&amp;title=API%3APregamePlayCinematic"/>
	<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:PregamePlayCinematic&amp;action=history"/>
	<updated>2026-10-17T07:29:24Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://wiki.returnofreckoning.com/index.php?title=API:PregamePlayCinematic&amp;diff=30645&amp;oldid=prev</id>
		<title>Maintenance script: UI Lua API import (WAR 1.4.8)</title>
		<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:PregamePlayCinematic&amp;diff=30645&amp;oldid=prev"/>
		<updated>2026-10-16T19:47:50Z</updated>

		<summary type="html">&lt;p&gt;UI Lua API import (WAR 1.4.8)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{LuaApi|group=Pregame}}&lt;br /&gt;
Starts playing the intro cinematic on the pregame screens.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PregamePlayCinematic()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Arguments ==&lt;br /&gt;
None.&lt;br /&gt;
&lt;br /&gt;
== Returns ==&lt;br /&gt;
Nothing.&lt;br /&gt;
&lt;br /&gt;
== Details ==&lt;br /&gt;
* The call only works in the pregame state while the character select screen is set up. At any other time it does nothing.&lt;br /&gt;
* It also does nothing unless the conditions of [[API:CanPlayCinematic|CanPlayCinematic]] are met: the video file &amp;lt;code&amp;gt;videos/Cinematic1_720p.bik&amp;lt;/code&amp;gt; must exist in the game archives, and the sound system, if it exists, must be ready for video.&lt;br /&gt;
* The video is played into the texture named &amp;lt;code&amp;gt;title_screen_video&amp;lt;/code&amp;gt;. The stock window &amp;lt;code&amp;gt;EA_Window_CinematicDisplay&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;interfacecore/source/cinematicwindow.xml&amp;lt;/code&amp;gt;) shows that texture in a DynamicImage, so a window like it must be shown for the video to be visible.&lt;br /&gt;
* While the video plays, the client stops the pregame theme music and sets the same flag as &amp;lt;code&amp;gt;[[API:PregameBlockMouseOver|PregameBlockMouseOver]](true)&amp;lt;/code&amp;gt;. The previous value of the flag is remembered.&lt;br /&gt;
* If the video cannot be opened, nothing is played.&lt;br /&gt;
* Use [[API:PregameStopCinematic|PregameStopCinematic]] to end playback.&lt;br /&gt;
&lt;br /&gt;
== Errors ==&lt;br /&gt;
None.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
From &amp;lt;code&amp;gt;interfacecore/source/cinematicwindow.lua&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function EA_Window_CinematicDisplay.Show()&lt;br /&gt;
    if ( CanPlayCinematic() )&lt;br /&gt;
    then&lt;br /&gt;
        if ( DoesWindowExist( &amp;quot;EA_Window_CinematicDisplay&amp;quot; ) )&lt;br /&gt;
        then&lt;br /&gt;
            WindowSetShowing(&amp;quot;EA_Window_CinematicDisplay&amp;quot;, true)&lt;br /&gt;
        else&lt;br /&gt;
            CreateWindow(&amp;quot;EA_Window_CinematicDisplay&amp;quot;, true)&lt;br /&gt;
        end&lt;br /&gt;
        PregamePlayCinematic()&lt;br /&gt;
    else&lt;br /&gt;
        -- offer to open the cinematic web page instead&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[API:PregameStopCinematic|PregameStopCinematic]]&lt;br /&gt;
* [[API:CanPlayCinematic|CanPlayCinematic]]&lt;br /&gt;
* [[API:PregameBlockMouseOver|PregameBlockMouseOver]]&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>