
<sequence>
  <scene id="fork">

    <resources>
    </resources>

    <script>
		<switchtosceneifall id="scene_happyend_0">
			<testvariable key="pylons" value="8"/>
		</switchtosceneifall>
    </script>
  </scene>

<!-- ============ SAD  </dialogtextsequence>  ============== -->

  <scene id="scene_sadend_0">

    <resources>
      <bg id="background" priority="2">
        <bitmap file="sequences/outro/outro2.jpg"/>
      </bg>
      <dialogbox/>
    </resources>

    <script>
		<setbrightness value="0" duration="0"/> <setbrightness value="1" duration="1.5"/> <waitforall> <brightness/> </waitforall>

		<starttimer/>
		<waitforall>
			<timerelapsed time="3"/>
		</waitforall>

	    <dialogtextsequence characterdelay="0.02" orientation="right">
		"John, look, it&apos;s a hot-air balloon! This is the eye he was talking about in his diary!"
		</dialogtextsequence>

		<dialogtextsequence characterdelay="0.02" orientation="left">
		"Valerie, quick, we have to reach the basket before the wind takes it away!"
		</dialogtextsequence>

		<setbrightness value="2" duration="0.15"/> <waitforall> <brightness/> </waitforall>

    </script>
  </scene>


  <scene id="scene_sadend_1">
    <resources>
      <bg id="background" priority="2">
        <bitmap file="sequences/outro/outroB0.jpg"/>
      </bg>
      <dialogbox/>
    </resources>

    <script>
		<setbrightness value="1" duration="0.15"/>

		<setvariable key="hidemap" value = "true"/>

		<starttimer/>
		<waitforall>
			<timerelapsed time="3"/>
		</waitforall>

        <rumbleeffect type="5" periods="0"/>

		<dialogtextsequence characterdelay="0.02" orientation="neutral">
		Before the balloon is out of reach, Valerie grabs the ladder. She quickly climbs up it. But John is shattered, the whole day was far too strenuous, he can hardly hold on to the ladder. Valerie is determined not to let her companion down. She reaches downwards. But suddenly the island starts to tremble and John&apos;s hand slips away. Tears well up in her eyes as she realizes that she has to leave John behind.
    Helpless, John looks at the balloon and Valerie, floating towards the open sea.
		</dialogtextsequence>
		<hidedialogbox/>

        <rumbleeffect type="2"/>


		<starttimer/>
		<waitforall>
			<timerelapsed time="3"/>
		</waitforall>

		<fadeoutallsound duration="0.5"/>
		<setbrightness value="2" duration="0.15"/> <waitforall> <brightness/> </waitforall>
        <rumbleeffect type="0"/>
    </script>
  </scene>

  <scene id="scene_sadend_2">
    <resources>
      <bg id="background" priority="2">
        <bitmap file="sequences/outro/outroB1.jpg"/>
      </bg>
	  <sounds>
	    <atmo id="water" minpitch="0.9" maxpitch="1.1" minpause="1.0" maxpause="2.5">
			<sample file="sound>water/splash00.wav"/>
			<sample file="sound>water/splash01.wav"/>
			<sample file="sound>water/splash02.wav"/>
			<sample file="sound>water/splash03.wav"/>
		</atmo>
	  </sounds>
      <dialogbox/>
    </resources>

    <script>
		<fadeinsound id="water" duration="1.0"/>
		<setbrightness value="1" duration="0.15"/>

		<starttimer/>
		<waitforall>
			<timerelapsed time="3"/>
		</waitforall>

		<dialogtextsequence characterdelay="0.02" orientation="left">
		"No, please, I am so sorry, John."
		</dialogtextsequence>
		<hidedialogbox/>

		<setbrightness value="2" duration="0.15"/> <waitforall> <brightness/> </waitforall>
    </script>
  </scene>

  <scene id="scene_sadend_3">
    <resources>
      <bg id="background" priority="2">
        <bitmap file="sequences/outro/outroB2.jpg"/>
      </bg>
      <dialogbox/>
    </resources>

    <script>
		<setbrightness value="1" duration="0.15"/>

		<starttimer/>
		<waitforall>
			<timerelapsed time="4.5"/>
		</waitforall>

		<dialogtextsequence characterdelay="0.02" orientation="neutral">
		Helpless, she watches with her own eyes while the island virtually dissolves and disappears through time.
		</dialogtextsequence>
		<hidedialogbox/>

		<starttimer/>
		<waitforall>
			<timerelapsed time="3"/>
		</waitforall>

		<setbrightness value="2" duration="0.15"/> <waitforall> <brightness/> </waitforall>
    </script>
  </scene>

  <scene id="scene_sadend_4">
    <resources>
      <bg id="background" priority="2">
        <bitmap file="sequences/outro/outroB3.jpg"/>
      </bg>
      <dialogbox/>
    </resources>

    <script>
		<setbrightness value="1" duration="0.15"/>

		<starttimer/>
		<waitforall>
			<timerelapsed time="5"/>
		</waitforall>

		<setbrightness value="2" duration="0.15"/> <waitforall> <brightness/> </waitforall>
    </script>
  </scene>

  <scene id="scene_sadend_5">
    <resources>
      <bg id="background" priority="2">
        <bitmap file="sequences/outro/outroB4.jpg"/>
      </bg>
      <dialogbox/>
    </resources>

    <script>
		<setbrightness value="1" duration="0.15"/>

		<starttimer/>
		<waitforall>
			<timerelapsed time="3"/>
		</waitforall>

		<dialogtextsequence characterdelay="0.02" orientation="neutral">
		When the spectacle is over, nothing indicates the island ever even existed. The ocean is calm in front of her.
		</dialogtextsequence>
		<hidedialogbox/>

		<starttimer/>
		<waitforall>
			<timerelapsed time="3"/>
		</waitforall>

		<setbrightness value="2" duration="0.15"/> <waitforall> <brightness/> </waitforall>
    </script>
  </scene>

  <scene id="scene_sadend_6">
    <resources>
      <bg id="background" priority="2">
        <bitmap file="sequences/outro/outroB5.jpg"/>
      </bg>
      <dialogbox/>
    </resources>

    <script>
		<setbrightness value="1" duration="0.15"/>

		<starttimer/>
		<waitforall>
			<timerelapsed time="3"/>
		</waitforall>

		<dialogtextsequence characterdelay="0.02" orientation="left">
		"John, I swear, when this island reappears out of time in 20 years, I will be ready. I will never forget you."
		</dialogtextsequence>
		<hidedialogbox/>

		<starttimer/>
		<waitforall>
			<timerelapsed time="3"/>
		</waitforall>

		<fadeoutsound id="water" duration="1.0"/>
		<setbrightness value="0" duration="1.5"/> <waitforall> <brightness/> </waitforall>

		<switchtosequence file="sequence>credits.xml"/>

    </script>
  </scene>


<!-- ============ HAPPY  </dialogtextsequence>  ============== -->

  <scene id="scene_happyend_0">

    <resources>
      <bg id="background" priority="2">
        <bitmap file="sequences/outro/outro2.jpg"/>
      </bg>
      <dialogbox/>
    </resources>

    <script>
		<setbrightness value="0" duration="0"/> <setbrightness value="1" duration="1.5"/> <waitforall> <brightness/> </waitforall>

		<starttimer/>
		<waitforall>
			<timerelapsed time="3"/>
		</waitforall>

	    <dialogtextsequence characterdelay="0.02" orientation="right">
		"It is a balloon, a hot-air balloon! This is the eye he was talking about in the diary!"
		</dialogtextsequence>

		<dialogtextsequence characterdelay="0.02" orientation="left">
		"Valerie, quick, we have to reach the basket, before the wind takes it away! Don&apos;t let go of the rope ladder, this is our only chance."
		</dialogtextsequence>

		<setbrightness value="2" duration="0.15"/> <waitforall> <brightness/> </waitforall>

    </script>
  </scene>

  <scene id="scene_happyend_1">
    <resources>
      <bg id="background" priority="2">
        <bitmap file="sequences/outro/outroA0.jpg"/>
      </bg>
      <dialogbox/>
    </resources>

    <script>
		<setbrightness value="1" duration="0.15"/>

		<setvariable key="hidemap" value = "true"/>

		<starttimer/>
		<waitforall>
			<timerelapsed time="3"/>
		</waitforall>

        <rumbleeffect type="5" periods="0"/>

		<dialogtextsequence characterdelay="0.02" orientation="neutral">
		Before the balloon is out of reach, Valerie grabs the ladder. She quickly climbs on top of it. But John is shattered, the whole day was far too strenuous, he can hardly hold on to the ladder. Valerie is determined not to let her companion down. With her last ounce of strength she is able to get John and herself to the safety of the basket of the balloon.
    Gently they are floating towards the open sea.
		</dialogtextsequence>
		<hidedialogbox/>

        <rumbleeffect type="0"/>

		<starttimer/>
		<waitforall>
			<timerelapsed time="3"/>
		</waitforall>

		<fadeoutallsound duration="0.5"/>
		<setbrightness value="2" duration="0.15"/> <waitforall> <brightness/> </waitforall>
    </script>
  </scene>

  <scene id="scene_happyend_2">
    <resources>
      <bg id="background" priority="2">
        <bitmap file="sequences/outro/outroA1.jpg"/>
      </bg>
	  <sounds>
	    <atmo id="water" minpitch="0.9" maxpitch="1.1" minpause="1.0" maxpause="2.5">
			<sample file="sound>water/splash00.wav"/>
			<sample file="sound>water/splash01.wav"/>
			<sample file="sound>water/splash02.wav"/>
			<sample file="sound>water/splash03.wav"/>
		</atmo>
	  </sounds>
      <dialogbox/>
    </resources>

    <script>
		<fadeinsound id="water" duration="1.0"/>
		<setbrightness value="1" duration="0.15"/>

		<starttimer/>
		<waitforall>
			<timerelapsed time="3"/>
		</waitforall>

		<dialogtextsequence characterdelay="0.02" orientation="left">
		"Thank you, Valerie, without you I would have never made it."
		</dialogtextsequence>

		<dialogtextsequence characterdelay="0.02" orientation="left">
		"I wouldn&apos;t have left you back on the island, John."
		</dialogtextsequence>

		<dialogtextsequence characterdelay="0.02" orientation="left">
		"Look over there Valerie...the island!"
		</dialogtextsequence>
		<hidedialogbox/>

		<rumbleeffect type="0"/>
		<rumbleeffect type="4"/>
		<setbrightness value="2" duration="0.15"/> <waitforall> <brightness/> </waitforall>
    </script>
  </scene>

  <scene id="scene_happyend_3">
    <resources>
      <bg id="background" priority="2">
        <bitmap file="sequences/outro/outroA2.jpg"/>
      </bg>
      <dialogbox/>
    </resources>

    <script>
		<setbrightness value="1" duration="0.15"/>

		<starttimer/>
		<waitforall>
			<timerelapsed time="4.5"/>
		</waitforall>

		<dialogtextsequence characterdelay="0.02" orientation="left">
		"It&apos;s sinking into the sea."
		</dialogtextsequence>

		<dialogtextsequence characterdelay="0.02" orientation="left">
		"I suppose that the energy balls we found have stabilized the island in time. We are witnessing the catastrophe which threatened the island."
		</dialogtextsequence>
		<hidedialogbox/>

		<starttimer/>
		<waitforall>
			<timerelapsed time="3"/>
		</waitforall>

		<rumbleeffect type="0"/>
		<rumbleeffect type="4"/>
		<setbrightness value="2" duration="0.15"/> <waitforall> <brightness/> </waitforall>
    </script>
  </scene>

  <scene id="scene_happyend_4">
    <resources>
      <bg id="background" priority="2">
        <bitmap file="sequences/outro/outroA3.jpg"/>
      </bg>
      <dialogbox/>
    </resources>

    <script>
		<setbrightness value="1" duration="0.15"/>

		<starttimer/>
		<waitforall>
			<timerelapsed time="3"/>
		</waitforall>

		<dialogtextsequence characterdelay="0.02" orientation="left">
		"You mean that the time leaps only delayed the sinking of the island."
		</dialogtextsequence>

		<dialogtextsequence characterdelay="0.02" orientation="left">
		"Yes, finally its fate has caught up with it."
		</dialogtextsequence>

		<dialogtextsequence characterdelay="0.02" orientation="left">
		"Maybe it will find its peace now."
		</dialogtextsequence>
		<hidedialogbox/>

		<starttimer/>
		<waitforall>
			<timerelapsed time="3"/>
		</waitforall>

		<rumbleeffect type="0"/>
		<rumbleeffect type="4"/>
		<setbrightness value="2" duration="0.15"/> <waitforall> <brightness/> </waitforall>
    </script>
  </scene>

  <scene id="scene_happyend_5">
    <resources>
      <bg id="background" priority="2">
        <bitmap file="sequences/outro/outroA4.jpg"/>
      </bg>
      <dialogbox/>
    </resources>

    <script>
		<setbrightness value="1" duration="0.15"/>

		<starttimer/>
		<waitforall>
			<timerelapsed time="3"/>
		</waitforall>

		<dialogtextsequence characterdelay="0.02" orientation="left">
		"Do you think we are safe now?"
		</dialogtextsequence>

		<dialogtextsequence characterdelay="0.02" orientation="left">
		"Let&apos;s see where the wind takes us. But I hope you will also back me up out there."
		</dialogtextsequence>

		<dialogtextsequence characterdelay="0.02" orientation="left">
		"Back you up?"
		</dialogtextsequence>

		<dialogtextsequence characterdelay="0.02" orientation="left">
		"After all, I have to make up for 50 years."
		</dialogtextsequence>
		<hidedialogbox/>

		<starttimer/>
		<waitforall>
			<timerelapsed time="3"/>
		</waitforall>

		<fadeoutsound id="water" duration="1.0"/>
		<setbrightness value="0" duration="1.5"/> <waitforall> <brightness/> </waitforall>

		<switchtosequence file="sequence>credits.xml"/>

    </script>
  </scene>

</sequence>
