<entity>
	<class>guiscene</class>
	<type>cutsceneBardylisDefeated</type>
	<name>cutsceneBardylisDefeated</name>

	<autoDestruct>true</autoDestruct>
	<autoPlay>true</autoPlay>

	<var id="FadeTime">1000</var>
	<var id="LetterboxFadeTime">3000</var>
	<var id="LetterboxHeight">height 1 2.2 / width * - 2 /</var>
	<var id="LetterboxBottom">height vars.LetterboxHeight -</var>

	<var id="Frame1A">vars.LetterboxFadeTime vars.FadeTime +</var>
	<var id="Frame1B">vars.Frame1A global.sound.duration."Resources/Sounds/Cutscenes/Bardylis Defeated/1a.wav" +</var>
	<var id="Frame2A">vars.Frame1B global.sound.duration."Resources/Sounds/Cutscenes/Bardylis Defeated/1b.wav" +</var>
	<var id="Frame2B">vars.Frame2A global.sound.duration."Resources/Sounds/Cutscenes/Bardylis Defeated/2a.wav" +</var>
	<var id="Frame3A">vars.Frame2B global.sound.duration."Resources/Sounds/Cutscenes/Bardylis Defeated/2b.wav" +</var>
	<var id="Frame3B">vars.Frame3A global.sound.duration."Resources/Sounds/Cutscenes/Bardylis Defeated/3a.wav" +</var>
	<var id="Frame4A">vars.Frame3B global.sound.duration."Resources/Sounds/Cutscenes/Bardylis Defeated/3b.wav" +</var>
	<var id="Frame4B">vars.Frame4A global.sound.duration."Resources/Sounds/Cutscenes/Bardylis Defeated/3b.wav" +</var>
	<var id="Frame4C">vars.Frame4B global.sound.duration."Resources/Sounds/Cutscenes/Bardylis Defeated/3b.wav" +</var>
	<var id="FramesDone">vars.Frame4C 5000 +</var>

	<guielement>
		<ent>
			<class>guisprite</class>
			<name>LetterboxTop</name>
			<shader>Black.shd</shader>
			<meshent>
				<class>spritemesh</class>
			</meshent>
			
			<autoDestruct>true</autoDestruct>

			<keyframeAlpha>
				<time>0</time>
				<val>0</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.LetterboxFadeTime</time>
				<val>1</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.FramesDone parent.vars.FadeTime +</time>
				<val>1</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.FramesDone parent.vars.FadeTime + parent.vars.LetterboxFadeTime +</time>
				<val>0</val>
			</keyframeAlpha>
		</ent>

		<x>0</x>
		<y>0</y>
		<w>parent.width</w>
		<h>parent.vars.LetterboxHeight</h>
		<depth>2</depth>
	</guielement>
	<guielement>
		<ent>
			<class>guisprite</class>
			<name>LetterboxBottom</name>
			<shader>Black.shd</shader>
			<meshent>
				<class>spritemesh</class>
			</meshent>

			<autoDestruct>true</autoDestruct>

			<keyframeAlpha>
				<time>0</time>
				<val>0</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.LetterboxFadeTime</time>
				<val>1</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.FramesDone parent.vars.FadeTime +</time>
				<val>1</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.FramesDone parent.vars.FadeTime + parent.vars.LetterboxFadeTime +</time>
				<val>0</val>
			</keyframeAlpha>
		</ent>

		<x>0</x>
		<y>parent.vars.LetterboxBottom</y>
		<w>parent.width</w>
		<h>parent.vars.LetterboxHeight</h>

		<depth>2</depth>
	</guielement>
	<guielement>
		<ent>
			<class>guisprite</class>
			<name>CutsceneBlack</name>
			<shader>Black.shd</shader>
			<meshent>
				<class>spritemesh</class>
			</meshent>

			<autoDestruct>true</autoDestruct>

			<keyframeAlpha>
				<time>0</time>
				<val>0</val>
			</keyframeAlpha>

			<!-- Transition to negotiation scene -->
			<keyframeAlpha>
				<time>parent.vars.Frame1A parent.vars.FadeTime -</time>
				<val>0</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame1A</time>
				<val>1</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame1A parent.vars.FadeTime +</time>
				<val>0</val>
			</keyframeAlpha>

			<!-- Transition to bardylis death -->
			<keyframeAlpha>
				<time>parent.vars.Frame2A parent.vars.FadeTime -</time>
				<val>0</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame2A</time>
				<val>1</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame2A parent.vars.FadeTime +</time>
				<val>0</val>
			</keyframeAlpha>

			<!-- Transition to Olympias frame -->
			<keyframeAlpha>
				<time>parent.vars.Frame3A parent.vars.FadeTime -</time>
				<val>0</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame3A</time>
				<val>1</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame3A parent.vars.FadeTime +</time>
				<val>0</val>
			</keyframeAlpha>

			<!-- Transition to warring factions -->
			<keyframeAlpha>
				<time>parent.vars.Frame4A parent.vars.FadeTime -</time>
				<val>0</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame4A</time>
				<val>1</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame4A parent.vars.FadeTime +</time>
				<val>0</val>
			</keyframeAlpha>

			<!-- Transition back to game -->
			<keyframeAlpha>
				<time>parent.vars.FramesDone parent.vars.FadeTime -</time>
				<val>0</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.FramesDone</time>
				<val>1</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.FramesDone parent.vars.FadeTime +</time>
				<val>0</val>
			</keyframeAlpha>
		</ent>

		<pos type="stringlist">0, 0, parent.width, parent.height</pos>
		<depth>2</depth>
	</guielement>

	<scheduledScript time="0">
		musicoverrideintensity high
	</scheduledScript>

	<!-- Negotiation -->
	<guielement>
		<ent>
			<class>guisprite</class>

			<textureparam>
				<name>TexClr</name>
				<texfile>Resources/Images/cutscenes/Bardylis Defeated/negotiation_bg.dds</texfile>
			</textureparam>

			<meshent>
				<class>spritemesh</class>
				<texturecoord type="stringlist">0, 0, 1, 1</texturecoord>
			</meshent>

			<autoDestruct>true</autoDestruct>

			<keyframeAlpha>
				<time>0</time>
				<val>0</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame1A 1 -</time>
				<val>0</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame1A</time>
				<val>1</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame2A</time>
				<val>1</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame2A 1 +</time>
				<val>0</val>
			</keyframeAlpha>

			<keyframeSize>
				<time>0</time>
				<val type="stringlist">parent.width, parent.width self.params.TexClr.aspect /</val>
			</keyframeSize>

			<keyframePos>
				<time>parent.vars.Frame1A</time>
				<val type="stringlist">0, self.parent.controls.LetterboxBottom.PosY self.Height -</val>
			</keyframePos>
			<keyframePos>
				<time>parent.vars.Frame2A</time>
				<val type="stringlist">0, self.parent.controls.LetterboxTop.Height</val>
			</keyframePos>
		</ent>
		<depth>4</depth>
	</guielement>
	<guielement>
		<ent>
			<class>guisprite</class>

			<textureparam>
				<name>TexClr</name>
				<texfile>Resources/Images/cutscenes/Bardylis Defeated/negotiation_fg.dds</texfile>
			</textureparam>

			<shader>GUIBasicMultiply.shd</shader>

			<meshent>
				<class>spritemesh</class>
				<texturecoord type="stringlist">0, 0, 1, 1</texturecoord>
			</meshent>

			<autoDestruct>true</autoDestruct>

			<keyframeAlpha>
				<time>0</time>
				<val>0</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame1A 1 -</time>
				<val>0</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame1A</time>
				<val>1</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame2A</time>
				<val>1</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame2A 1 +</time>
				<val>0</val>
			</keyframeAlpha>

			<keyframeSize>
				<time>parent.vars.Frame1A</time>
				                                               <!--  image width  -->
				<val type="stringlist">100 86 / parent.width *, 100 86 / parent.width * self.params.TexClr.aspect /</val>
			</keyframeSize>
			<keyframeSize>
				<time>parent.vars.Frame2A</time>
				<val type="stringlist">parent.width, parent.width self.params.TexClr.aspect /</val>
			</keyframeSize>

			<keyframePos>
				<time>0</time>
				<val type="stringlist">parent.width 2 / self.width 2 / -, parent.height 2 / self.height 2 / -</val>
			</keyframePos>
		</ent>
		<depth>3</depth>
	</guielement>

	<guielement>
		<ent>
			<class>guipage</class>
			
			<Transparent>1</Transparent>

			<shader>GUITextShadow.shd</shader>

			<font><family>Day Roman</family></font>

			<emsize>parent.width, 0.04</emsize>

			<string>cutsceneBardylisDefeated::caption1a</string>

			<autoDestruct>true</autoDestruct>

			<keyframeAlpha>
				<time>0</time>
				<val>0</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame1A</time>
				<val>0</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame1A parent.vars.FadeTime +</time>
				<val>1</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame1B parent.vars.FadeTime -</time>
				<val>1</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame1B</time>
				<val>0</val>
			</keyframeAlpha>

			<firstlinecorrect>true</firstlinecorrect>
			<padding type="stringlist">0.25, 0.25, 0.25, 0.25</padding>
		</ent>

		<x>0</x>
		<y>parent.height textheight - parent.vars.LetterboxBottom min</y>
		<w>parent.width</w>
		<h>textheight</h>

		<depth>1</depth>
	</guielement>
	<scheduledScript time="vars.Frame1A">
		playsound "Resources/Sounds/Cutscenes/Bardylis Defeated/1a.wav" -stream  -tag cutscene -system cutscene
	</scheduledScript>
	<guielement>
		<ent>
			<class>guipage</class>
			
			<Transparent>1</Transparent>

			<shader>GUITextShadow.shd</shader>

			<font><family>Day Roman</family></font>

			<emsize>parent.width, 0.04</emsize>

			<string>cutsceneBardylisDefeated::caption1b</string>

			<autoDestruct>true</autoDestruct>

			<keyframeAlpha>
				<time>0</time>
				<val>0</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame1B</time>
				<val>0</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame1B parent.vars.FadeTime +</time>
				<val>1</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame2A parent.vars.FadeTime -</time>
				<val>1</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame2A</time>
				<val>0</val>
			</keyframeAlpha>

			<firstlinecorrect>true</firstlinecorrect>
			<padding type="stringlist">0.25, 0.25, 0.25, 0.25</padding>
		</ent>

		<x>0</x>
		<y>parent.height textheight - parent.vars.LetterboxBottom min</y>
		<w>parent.width</w>
		<h>textheight</h>

		<depth>1</depth>
	</guielement>
	<scheduledScript time="vars.Frame1B">
		playsound "Resources/Sounds/Cutscenes/Bardylis Defeated/1b.wav" -stream  -tag cutscene -system cutscene
	</scheduledScript>

	<!-- Bardylis Death -->
	<guielement>
		<ent>
			<class>guisprite</class>

			<textureparam>
				<name>TexClr</name>
				<texfile>Resources/Images/cutscenes/Bardylis Defeated/bardylis_death_bg.dds</texfile>
			</textureparam>

			<meshent>
				<class>spritemesh</class>
				<texturecoord type="stringlist">0, 0, 1, 1</texturecoord>
			</meshent>

			<autoDestruct>true</autoDestruct>

			<keyframeAlpha>
				<time>0</time>
				<val>0</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame2A 1 -</time>
				<val>0</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame2A</time>
				<val>1</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame3A</time>
				<val>1</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame3A 1 +</time>
				<val>0</val>
			</keyframeAlpha>

			<keyframeSize>
				<time>0</time>
				                       <!--  height  -->
				<val type="stringlist">parent.width 2.2 / self.params.TexClr.aspect *, parent.width 2.2 /</val>
			</keyframeSize>

			<keyframePos>
				<time>parent.vars.Frame2A</time>
				<val type="stringlist">0, self.parent.controls.LetterboxTop.Height</val>
			</keyframePos>
			<keyframePos>
				<time>parent.vars.Frame3A</time>
				<val type="stringlist">parent.width self.width -, self.parent.controls.LetterboxTop.Height</val>
			</keyframePos>
		</ent>
		<depth>4</depth>
	</guielement>
	<guielement>
		<ent>
			<class>guisprite</class>

			<textureparam>
				<name>TexClr</name>
				<texfile>Resources/Images/cutscenes/Bardylis Defeated/bardylis_death_fg.dds</texfile>
			</textureparam>

			<meshent>
				<class>spritemesh</class>
				<texturecoord type="stringlist">0, 0, 1, 1</texturecoord>
			</meshent>

			<autoDestruct>true</autoDestruct>

			<keyframeAlpha>
				<time>0</time>
				<val>0</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame2A 1 -</time>
				<val>0</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame2A</time>
				<val>1</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame3A</time>
				<val>1</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame3A 1 +</time>
				<val>0</val>
			</keyframeAlpha>

			<keyframeSize>
				<time>0</time>
				                       <!--  height  -->
				<val type="stringlist">parent.width 2.2 / self.params.TexClr.aspect *, parent.width 2.2 /</val>
			</keyframeSize>

			<keyframePos>
				<time>parent.vars.Frame2A</time>
				<val type="stringlist">parent.width, self.parent.controls.LetterboxTop.Height</val>
			</keyframePos>
			<keyframePos>
				<time>parent.vars.Frame3A</time>
				<val type="stringlist">parent.width 0.06 *, self.parent.controls.LetterboxTop.Height</val>
			</keyframePos>
		</ent>
		<depth>3</depth>
	</guielement>

	<guielement>
		<ent>
			<class>guipage</class>
			
			<Transparent>1</Transparent>

			<shader>GUITextShadow.shd</shader>

			<font><family>Day Roman</family></font>

			<emsize>parent.width, 0.04</emsize>

			<string>cutsceneBardylisDefeated::caption2a</string>

			<autoDestruct>true</autoDestruct>

			<keyframeAlpha>
				<time>0</time>
				<val>0</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame2A</time>
				<val>0</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame2A parent.vars.FadeTime +</time>
				<val>1</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame2B parent.vars.FadeTime -</time>
				<val>1</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame2B</time>
				<val>0</val>
			</keyframeAlpha>

			<firstlinecorrect>true</firstlinecorrect>
			<padding type="stringlist">0.25, 0.25, 0.25, 0.25</padding>
		</ent>

		<x>0</x>
		<y>parent.height textheight - parent.vars.LetterboxBottom min</y>
		<w>parent.width</w>
		<h>textheight</h>

		<depth>1</depth>
	</guielement>
	<scheduledScript time="vars.Frame2A">
		playsound "Resources/Sounds/Cutscenes/Bardylis Defeated/2a.wav" -stream  -tag cutscene -system cutscene
	</scheduledScript>
	<guielement>
		<ent>
			<class>guipage</class>
			
			<Transparent>1</Transparent>

			<shader>GUITextShadow.shd</shader>

			<font><family>Day Roman</family></font>

			<emsize>parent.width, 0.04</emsize>

			<string>cutsceneBardylisDefeated::caption2b</string>

			<autoDestruct>true</autoDestruct>

			<keyframeAlpha>
				<time>0</time>
				<val>0</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame2B</time>
				<val>0</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame2B parent.vars.FadeTime +</time>
				<val>1</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame3A parent.vars.FadeTime -</time>
				<val>1</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame3A</time>
				<val>0</val>
			</keyframeAlpha>

			<firstlinecorrect>true</firstlinecorrect>
			<padding type="stringlist">0.25, 0.25, 0.25, 0.25</padding>
		</ent>

		<x>0</x>
		<y>parent.height textheight - parent.vars.LetterboxBottom min</y>
		<w>parent.width</w>
		<h>textheight</h>

		<depth>1</depth>
	</guielement>
	<scheduledScript time="vars.Frame2B">
		playsound "Resources/Sounds/Cutscenes/Bardylis Defeated/2b.wav" -stream  -tag cutscene -system cutscene
	</scheduledScript>

	<!-- Olympias -->
	<guielement>
		<ent>
			<class>guisprite</class>

			<textureparam>
				<name>TexClr</name>
				<texfile>Resources/Images/cutscenes/Bardylis Defeated/olympias.dds</texfile>
			</textureparam>

			<meshent>
				<class>spritemesh</class>
				<texturecoord type="stringlist">0, 0, 1, 1</texturecoord>
			</meshent>

			<autoDestruct>true</autoDestruct>

			<keyframeAlpha>
				<time>0</time>
				<val>0</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame3A 1 -</time>
				<val>0</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame3A</time>
				<val>1</val>
			</keyframeAlpha>

			<keyframeSize>
				<time>parent.vars.Frame3A</time>
				<val type="stringlist">parent.width 0.39 /, self.width self.params.TexClr.aspect /</val>
			</keyframeSize>
			<keyframeSize>
				<time>parent.vars.Frame3B</time>
				<val type="stringlist">parent.width 0.61 /, self.width self.params.TexClr.aspect /</val>
			</keyframeSize>

			<keyframePos>
				<time>parent.vars.Frame3A</time>
				<val type="stringlist">0, self.parent.controls.LetterboxTop.Height</val>
			</keyframePos>
			<keyframePos>
				<time>parent.vars.Frame3B</time>
				<val type="stringlist">0, self.parent.controls.LetterboxTop.Height</val>
			</keyframePos>
			<keyframePos>
				<time>parent.vars.Frame4A</time>
				<val type="stringlist">parent.width self.width -, self.parent.controls.LetterboxBottom.PosY self.height -</val>
			</keyframePos>
		</ent>
		<depth>6</depth>
	</guielement>
	<guielement>
		<ent>
			<class>guipage</class>
			
			<Transparent>1</Transparent>

			<shader>GUITextShadow.shd</shader>

			<font><family>Day Roman</family></font>

			<emsize>parent.width, 0.04</emsize>

			<string>cutsceneBardylisDefeated::caption3a</string>

			<autoDestruct>true</autoDestruct>

			<keyframeAlpha>
				<time>0</time>
				<val>0</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame3A</time>
				<val>0</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame3A parent.vars.FadeTime +</time>
				<val>1</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame3B parent.vars.FadeTime -</time>
				<val>1</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame3B</time>
				<val>0</val>
			</keyframeAlpha>

			<firstlinecorrect>true</firstlinecorrect>
			<padding type="stringlist">0.25, 0.25, 0.25, 0.25</padding>
		</ent>

		<x>0</x>
		<y>parent.height textheight - parent.vars.LetterboxBottom min</y>
		<w>parent.width</w>
		<h>textheight</h>

		<depth>1</depth>
	</guielement>
	<scheduledScript time="vars.Frame3A">
		musicoverrideintensity low
		playsound "Resources/Sounds/Cutscenes/Bardylis Defeated/3a.wav" -stream  -tag cutscene -system cutscene
	</scheduledScript>
	<guielement>
		<ent>
			<class>guipage</class>
			
			<Transparent>1</Transparent>

			<shader>GUITextShadow.shd</shader>

			<font><family>Day Roman</family></font>

			<emsize>parent.width, 0.04</emsize>

			<string>cutsceneBardylisDefeated::caption3b</string>

			<autoDestruct>true</autoDestruct>

			<keyframeAlpha>
				<time>0</time>
				<val>0</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame3B</time>
				<val>0</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame3B parent.vars.FadeTime +</time>
				<val>1</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame4A parent.vars.FadeTime -</time>
				<val>1</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame4A</time>
				<val>0</val>
			</keyframeAlpha>

			<firstlinecorrect>true</firstlinecorrect>
			<padding type="stringlist">0.25, 0.25, 0.25, 0.25</padding>
		</ent>

		<x>0</x>
		<y>parent.height textheight - parent.vars.LetterboxBottom min</y>
		<w>parent.width</w>
		<h>textheight</h>

		<depth>1</depth>
	</guielement>
	<scheduledScript time="vars.Frame3B">
		playsound "Resources/Sounds/Cutscenes/Bardylis Defeated/3b.wav" -stream  -tag cutscene -system cutscene
	</scheduledScript>

	<!-- Warring Factions -->
	<guielement>
		<ent>
			<class>guisprite</class>

			<textureparam>
				<name>TexClr</name>
				<texfile>Resources/Images/cutscenes/Bardylis Defeated/WarringFactions.dds</texfile>
			</textureparam>

			<meshent>
				<class>spritemesh</class>
				<texturecoord type="stringlist">0, 0, 1, 1</texturecoord>
			</meshent>

			<autoDestruct>true</autoDestruct>

			<keyframeAlpha>
				<time>0</time>
				<val>0</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame4A 1 -</time>
				<val>0</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame4A</time>
				<val>1</val>
			</keyframeAlpha>

			<keyframeSize>
				<time>parent.vars.Frame4A</time>
				<val type="stringlist">parent.width 0.4 /, width params.TexClr.aspect /</val>
			</keyframeSize>
			<keyframeSize>
				<time>parent.vars.FramesDone</time>
				<val type="stringlist">parent.width, width params.TexClr.aspect /</val>
			</keyframeSize>

			<keyframePos>
				<time>0</time>
				<val type="stringlist">parent.width width -, parent.vars.LetterboxHeight height 4 / -</val>
			</keyframePos>
		</ent>
		<depth>6</depth>
	</guielement>
	<guielement>
		<ent>
			<class>guipage</class>
			
			<Transparent>1</Transparent>

			<shader>GUITextShadow.shd</shader>

			<font><family>Day Roman</family></font>

			<emsize>parent.width, 0.04</emsize>

			<string>cutsceneBardylisDefeated::caption4a</string>

			<autoDestruct>true</autoDestruct>

			<keyframeAlpha>
				<time>0</time>
				<val>0</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame4A</time>
				<val>0</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame4A parent.vars.FadeTime +</time>
				<val>1</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame4B parent.vars.FadeTime -</time>
				<val>1</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame4B</time>
				<val>0</val>
			</keyframeAlpha>

			<firstlinecorrect>true</firstlinecorrect>
			<padding type="stringlist">0.25, 0.25, 0.25, 0.25</padding>
		</ent>

		<x>0</x>
		<y>parent.height textheight - parent.vars.LetterboxBottom min</y>
		<w>parent.width</w>
		<h>textheight</h>

		<depth>1</depth>
	</guielement>
	<scheduledScript time="vars.Frame4A">
		musicoverrideintensity high
		playsound "Resources/Sounds/Cutscenes/Bardylis Defeated/4a.wav" -stream  -tag cutscene -system cutscene
	</scheduledScript>
	<guielement>
		<ent>
			<class>guipage</class>
			
			<Transparent>1</Transparent>

			<shader>GUITextShadow.shd</shader>

			<font><family>Day Roman</family></font>

			<emsize>parent.width, 0.04</emsize>

			<string>cutsceneBardylisDefeated::caption4b</string>

			<autoDestruct>true</autoDestruct>

			<keyframeAlpha>
				<time>0</time>
				<val>0</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame4B</time>
				<val>0</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame4B parent.vars.FadeTime +</time>
				<val>1</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame4C parent.vars.FadeTime -</time>
				<val>1</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame4C</time>
				<val>0</val>
			</keyframeAlpha>

			<firstlinecorrect>true</firstlinecorrect>
			<padding type="stringlist">0.25, 0.25, 0.25, 0.25</padding>
		</ent>

		<x>0</x>
		<y>parent.height textheight - parent.vars.LetterboxBottom min</y>
		<w>parent.width</w>
		<h>textheight</h>

		<depth>1</depth>
	</guielement>
	<scheduledScript time="vars.Frame4B">
		playsound "Resources/Sounds/Cutscenes/Bardylis Defeated/4b.wav" -stream  -tag cutscene -system cutscene
	</scheduledScript>
	<guielement>
		<ent>
			<class>guipage</class>
			
			<Transparent>1</Transparent>

			<shader>GUITextShadow.shd</shader>

			<font><family>Day Roman</family></font>

			<emsize>parent.width, 0.04</emsize>

			<string>cutsceneBardylisDefeated::caption4c</string>

			<autoDestruct>true</autoDestruct>

			<keyframeAlpha>
				<time>0</time>
				<val>0</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame4C</time>
				<val>0</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.Frame4C parent.vars.FadeTime +</time>
				<val>1</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.FramesDone parent.vars.FadeTime -</time>
				<val>1</val>
			</keyframeAlpha>
			<keyframeAlpha>
				<time>parent.vars.FramesDone</time>
				<val>0</val>
			</keyframeAlpha>

			<firstlinecorrect>true</firstlinecorrect>
			<padding type="stringlist">0.25, 0.25, 0.25, 0.25</padding>
		</ent>

		<x>0</x>
		<y>parent.height textheight - parent.vars.LetterboxBottom min</y>
		<w>parent.width</w>
		<h>textheight</h>

		<depth>1</depth>
	</guielement>
	<scheduledScript time="vars.Frame4C">
		playsound "Resources/Sounds/Cutscenes/Bardylis Defeated/4c.wav" -stream  -tag cutscene -system cutscene
	</scheduledScript>
</entity>
