{
	debug_spew [0]

	clock [0]
	RCnt [0]
	display_line [0]
	start_offset [0]

	Init[ ()
	{
		SetVis_RayLen(64);

		Spew("Clock:  0");
		GetPlayer().SetFrozen(true);
		GetPlayer().SetNationality(3);

		boat = GetEntity("bottom");
		boat.SetState_TruckDrive(3);
		boat.SetBaseRotation(0,0,0);
		boat.SetMinRotation(-40,-45,-20);
		boat.SetMaxRotation(40,45,40);
		boat.SetProne();

		capt = CreateEntity(195,0,0,0);
		capt.AttachTo( boat, 4 );
		capt.PlayAnimation(0);

		rider1 = CreateEntity(194,0,0,0);
		rider1.AttachTo( boat, 5 );
		rider1.PlayAnimationOffset(0);

		rider2 = CreateEntity(194,0,0,0);
		rider2.AttachTo( boat, 6 );
		rider2.PlayAnimationOffset(0);

		rider3 = CreateEntity(194,0,0,0);
		rider3.AttachTo( boat, 7 );
		rider3.PlayAnimationOffset(0);

		rider4 = CreateEntity(194,0,0,0);
		rider4.AttachTo( boat, 0 );
		rider4.PlayAnimationOffset(0);

		rider5 = CreateEntity(194,0,0,0);
		rider5.AttachTo( boat, 1 );
		rider5.PlayAnimationOffset(0);

		rider6 = CreateEntity(194,0,0,0);
		rider6.AttachTo( boat, 2 );
		rider6.PlayAnimationOffset(0);
	}]

	OnLevelLoad[ ()
	{
		PlayAmbient(158);  //amb_stalingrad_boatride
		StartTimer(start_offset,0);

		SetMessage(413,75,35);
		SetMessage2(427,75,50);
		SetMessage3(428,75,65);

		capt = GetEntity("Captain");
		capt.Delay(2,10);

		s1 = GetEntity("sounds1");
		Spew("        --> s1.Delay(10)");
		s1.Delay(4,10);

		s2 = GetEntity("sounds2");
		Spew("        --> s2.Delay(20)");
		s2.Delay(2,20);

		s3 = GetEntity("sounds3");
		Spew("        --> s3.Delay(21)");
		s3.Delay(33,50);

		s4 = GetEntity("sounds4");
		s4.Delay(36,51);

		s5 = GetEntity("sounds5");
		s5.Delay(37,52);

		s6 = GetEntity("sounds6");
		s6.Delay(38,53);

		t = GetEntity("tower");
		t.Delay(2,70);
	}]

	Spew[ (msg)
	{
		if( debug_spew = 1 )
		{
			Log(msg);
		}
	}]

	Subtitle[ ()
	{
		switch( display_line )
		{
			case 0 	{ ManualSubtitle(429); }
			case 1 	{ ManualSubtitle(430); }
			case 2 	{ ManualSubtitle(431); }
			case 3 	{ ManualSubtitle(432); }
			case 4 	{ ManualSubtitle(433); }
			case 5 	{ ManualSubtitle(434); }
			case 6 	{ ManualSubtitle(435); }
			case 7 	{ ManualSubtitle(436); }
			case 8 	{ ManualSubtitle(437); }
			case 9 	{ ManualSubtitle(438); }
			case 10 { ManualSubtitle(439); }
			case 11 { ManualSubtitle(440); }
			case 12 { ManualSubtitle(441); }
			case 13 { ManualSubtitle(410); }
			case 14 { ManualSubtitle(26); }
			case 15 { ManualSubtitle(442); }
			case 16 { ManualSubtitle(26); }
		}

		display_line = toInt(display_line+1);
	}]

	TimerReached[ (tid)
	{
		Subtitle();
		switch( tid )
		{
			case 0  { StartTimer(896, 1);  }
			case 1  { StartTimer(384, 2);  }
			case 2  { StartTimer(448, 3);  }
			case 3  { StartTimer(320, 4);  }
			case 4  { StartTimer(512, 5);  }
			case 5  { StartTimer(512, 6);  }
			case 6  { StartTimer(832, 7);  }
			case 7  { StartTimer(640, 8);  }
			case 8  { StartTimer(384, 9);  }
			case 9  { StartTimer(512, 10); }
			case 10 { StartTimer(832, 11); }
			case 11 { StartTimer(1108,12); }
			case 12 { StartTimer(779,13); }
			case 13 { StartTimer(256,14); }
			case 14 { StartTimer(3712,15); }
			case 15 { StartTimer(512,16); }
		}
	}]
}