-----------------------------------------------------------------------------
-- Stage 5-4
-----------------------------------------------------------------------------
-- GLOBALS
    
function Walk2(name)    
    local x;
	x = Entity.FindName(entRoot, name);
	if (x) then
		Animal.SetAiTimer(x, 60);
		Animal.EnableFear(x, false);
    	Animal.SetState(x, ST_WPT_WALK);	
    	end;
    end; 
    
-----------------------------------------------------------------------------    

function PostStage()

    EntGame.EnablePlayerControl(false);
    EntGame.ClearFlag(GF_READYTOSTART);
    EntGame.BindCameraToEntity("IntroCamera");
  
    Sound.Release(smpHelicopter);
    	
    end;    
    
-----------------------------------------------------------------------------    
-- Setup

function Setup()
    -- turn on the "Game running" menu - may not be needed for this game
    EntGame.PushMenu("MenuGameRunning");

    -- load world
    SetupWorld("Maps\\WorldMountainPass\\MountainPassCommon.ini", "Maps\\Stage5-4\\Stage5-4.ini","","");
    EntGame.CreatePlayerEntities();

    EntGame.SetGlobalDustColorInitial(1.0, 0.65, .55, .45);
    EntGame.SetGlobalDustColorFinal  (0.0, 0.65, .55, .45);
    
    EntGame.SetStageTimer(210);

    -- load sounds
    smpHelicopter  = Sound.Load("Sound\\Environment\\HelicopterIdle.wav");
    
    EntGame.LoadAnimal(AID_SABLE_M);
    EntGame.LoadAnimal(AID_SABLE_F);
	EntGame.LoadAnimal(AID_IMPALA_M);
	EntGame.LoadAnimal(AID_NILECROC_M);
	EntGame.LoadAnimal(AID_HARE_M);
	EntGame.LoadAnimal(AID_MEERKAT_M);	
	EntGame.LoadAnimal(AID_SPURWINGGOOSE_M);

	StartupSequence("Music\\Verdure.ogg");
		
	-- Get pointer to camera that jeep is following.
	entJeepCamera = Entity.FindName(entRoot, "JeepCamera");
	if (entJeepCamera) then
	    Camera.JumpToWaypoint(entJeepCamera, "JeepWptBB");
	    end;	
	
    end;

-----------------------------------------------------------------------------
function Part1()
	
	Camera.JumpToWaypoint(entCamera, "CamWptAA");
    Camera.SetSpeed(entCamera, 0.0, 0.01); 
      
    a1=EntGame.SpawnAnimalOnPath(AID_NILECROC_M, "Path1", 0, ST_WPT_WALK, 0, 0, 0, .1);
	Animal.EnableFear(a1, false);
	Animal.FaceEntity(a1, entCamera);
	Animal.SetChargeWhenShot(a1, true);
	Animal.SetAttackType(a1, ATK_STATIC);
	Animal.SetAttackRepeat(a1, 2);
	Animal.SetPostAttackRand(a1, false);
	Animal.SetPostAttackDir(a1, -90);
		
	a2=EntGame.SpawnAnimalOnPath(AID_NILECROC_M, "Path2", 0, ST_GRAZING, 20, 0, 0, .1);
	Animal.EnableFear(a2, false);	
	Animal.FaceEntity(a2, entCamera);
	Animal.SetChargeWhenShot(a2, true);
	Animal.SetAttackType(a2, ATK_STRAFE);
	Animal.SetPostAttackRand(a2, false);
	Animal.SetPostAttackDir(a2, -90);
	
	a3=EntGame.SpawnAnimalOnPath(AID_NILECROC_M, "Path5", 0, ST_GRAZING, 13, 0, 0, .1);
	Animal.EnableFear(a3, false);	
	Animal.FaceEntity(a3, entCamera);
	Animal.SetAutoChargeDist(a3, 15);
	Animal.SetAttackType(a3, ATK_STRAFE);
	Animal.SetPostAttackRand(a3, false);
	Animal.SetPostAttackDir(a3, -90);
	
	a4=EntGame.SpawnAnimalOnPath(AID_NILECROC_M, "Path6", 0, ST_GRAZING, 60, 0, 0, .1);
	Animal.EnableFear(a4, false);	
	Entity.SetName(a4, "CROC1");
	a5=EntGame.SpawnAnimalOnPath(AID_NILECROC_M, "Path7", 0, ST_GRAZING, 22, 0, 0, .4);
	Animal.EnableFear(a5, false);	
	Animal.FaceEntity(a5, entCamera);
	Animal.SetAutoChargeDist(a5, 15);
	Animal.SetAttackType(a5, ATK_STRAFE);
	Animal.SetPostAttackRand(a5, false);
	Animal.SetPostAttackDir(a5, -90);
		
	a6=EntGame.SpawnAnimalOnPath(AID_NILECROC_M, "Path8", 0, ST_GRAZING, 60, 0, 0, .1);
	Animal.EnableFear(a6, false);	
	Animal.FaceEntity(a6, entCamera);		
	
    c1=EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath2", 0, ST_WPT_WALK, 20, 0, 0, 1.0);
    Animal.EnableFear(c1, false);
    Script.WaitSec(3); 
	b1=EntGame.SpawnAnimalOnPath(AID_MEERKAT_M, "Path3", 0, ST_POPUP, 2, 0, 0, 1);     
    Animal.SetElvOffset(b1, -.1); 
    Animal.FaceEntity(b1, entCamera);     
    Script.WaitSec(5);
   
    --START MOVING
    Camera.SetSpeed(entCamera, 1.0, 0.001); 
    Camera.StopAtWaypoint(entCamera, "CamWptEE");
    
    Script.WaitSec(2);
    b12=EntGame.SpawnAnimalOnPath(AID_MEERKAT_M, "Path3", 0, ST_POPUP, 2, 0, 0, 1);     
    Animal.SetElvOffset(b12, -.1); 
    Animal.FaceEntity(b12, entCamera);	
    EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath1", 0, ST_WPT_RUN, 20, 0, 0, 1.2);
    EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath3", 0, ST_WPT_RUN, 20, 0, 0, 1.2);
	Script.WaitSec(1);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath4", 0, ST_WPT_RUN, 20, 0, 0, 1.2);	
		
	--LOOK LEFT
	Camera.SetPanOffset(entCamera, -30, 1.5);	
	Script.WaitSec(1);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath5", 0, ST_WPT_RUN, 20, 0, 0, 1.2);	  
    Script.WaitSec(1);
    EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath1", 0, ST_WPT_RUN, 20, 0, 0, 1.2);
    EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath3", 0, ST_WPT_RUN, 20, 0, 0, 1.2);
	Script.WaitSec(1);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath4", 0, ST_WPT_RUN, 20, 0, 0, 1.2);	
	Script.WaitSec(1);
	b2=EntGame.SpawnAnimalOnPath(AID_MEERKAT_M, "Path4", 0, ST_POPUP, 2.5, 0, 0, 1);     
    Animal.SetElvOffset(b2, -.1); 
    Animal.FaceEntity(b2, entCamera); 		
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath5", 0, ST_WPT_RUN, 20, 0, 0, 1.2);	    	
    Script.WaitSec(1);
    Camera.SetPanOffset(entCamera, -10, 1.5);
	Script.WaitSec(2);
	Walk2("CROC1");    
    Script.WaitSec(4);
    	
	Camera.SetSpeed(entCamera, 1.5, 0.1);    	
    Script.WaitSec(.25);
    Camera.SetSpeed(entCamera, 2.0, 0.001); 	
    Camera.SetPanOffset(entCamera, 30, 1.5);	
    Script.WaitSec(2);		
    
	b3=EntGame.SpawnAnimalOnPath(AID_MEERKAT_M, "Path9", 0, ST_POPUP, 2, 0, 0, 1);     
    Animal.SetElvOffset(b3, .1); 
    Animal.FaceEntity(b3, entCamera);
    Script.WaitSec(.75);	
	b4=EntGame.SpawnAnimalOnPath(AID_MEERKAT_M, "Path10", 0, ST_POPUP, 2, 0, 0, 1);     
    Animal.SetElvOffset(b4, -.1); 
    Animal.FaceEntity(b4, entCamera);    
    Script.WaitSec(2);
    Camera.SetPanOffset(entCamera, 20, 1.5);	
    Script.WaitSec(3);
    Camera.SetPanOffset(entCamera, -35, 1.5);
    Script.WaitSec(2);
 	Camera.SetPanOffset(entCamera, 30, 1.5);
	Script.WaitSec(5);	  
    
    Camera.JumpToWaypoint(entCamera, "CamWptHH");
    Camera.SetSpeed(entCamera, 0.0, 0.001);

    -- Now, attach the helicopter to the main camera.          
	entHelicopter = Entity.FindName(entRoot, "CameraFollower1");  
	if (entHelicopter) then  
	-- Attach the helicopter to the main camera.  
		Entity.SetVoid(entHelicopter, "entCamera", entCamera);  
		end; 		
		    	
	Script.WaitSec(.5);   
	 
	EntGame.ShowCaption(STR_LVL_5_4_A, 0, 2.5);
	
	Script.WaitSec(1.5);
    EntGame.SpawnAnimalOnPath(AID_IMPALA_M, "Path15", 0, ST_WPT_RUN, 0, 0, -2, .1);
    Script.WaitSec(1.5);
    
    EntGame.SpawnAnimalOnPath(AID_IMPALA_M, "Path15", 0, ST_WPT_RUN, 0, 0, -2, .1);

     
    --ACCELLERATE	
	Camera.SetSpeed(entCamera, .5, 0.1);
	Script.WaitSec(.25);
	Camera.SetSpeed(entCamera, 1.0, 0.1);
	Script.WaitSec(.25);
	Camera.SetSpeed(entCamera, 1.5, 0.1);
	Script.WaitSec(.5);
	Camera.SetSpeed(entCamera, 2.0, 0.1);	
	Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_IMPALA_M, "Path15", 0, ST_WPT_RUN, 0, 0, -2, .1);		
	Camera.SetSpeed(entCamera, 2.5, 0.1);	
	Script.WaitSec(.5);
	Camera.SetSpeed(entCamera, 3.0, 0.1);	
	Script.WaitSec(.75);
	Camera.SetSpeed(entCamera, 3.5, 0.1);	
	Script.WaitSec(.75);
	Camera.SetSpeed(entCamera, 4.0, 0.1);
	
	CameraFollower.SetRollOffset(entHelicopter, -25, 3.0);
	Camera.SetPanOffset(entCamera, 95, 4.0);
	Camera.SetTiltOffset(entCamera, 20, 3.0);	
			
	Script.WaitSec(.75);
	Camera.SetSpeed(entCamera, 4.5, 0.1);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path13", 0, -.5, .5, -.5, 1.2);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path14", 0, -1.5, -.5, 2, 1.2);			
	Script.WaitSec(.75);
	Camera.SetSpeed(entCamera, 5.0, 0.1);				
	--MAX SPEED 
	
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path13", 0, 0, 0, 0, 1.2);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path14", 0, 0, 0, 0, 1.2);
	EntGame.SpawnAnimalOnPath(AID_IMPALA_M, "Path13", 0, ST_WPT_RUN, 0, 0, 0, .1);
	Script.WaitSec(1);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path13", 0, -1, .5, -1, 1.2);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path14", 0, 1.5, -1, -2, 1.2);
	EntGame.SpawnAnimalOnPath(AID_IMPALA_M, "Path13", 0, ST_WPT_RUN, 0, 0, 0, .1);
	Script.WaitSec(1);
	Camera.SetPanOffset(entCamera, 75, 3.0);	
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path13", 0, 0, 0, 0, 1.2);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path14", 0, 0, 0, 0, 1.2);		
	Script.WaitSec(1);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path13", 0, -.5, .5, -.5, 1.2);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path14", 0, -1.5, -.5, 2, 1.2);	
	Script.WaitSec(2);

	CameraFollower.SetRollOffset(entHelicopter, 25, 2.0);
	Camera.SetTiltOffset(entCamera, -25, 2.0);
	
	Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_SABLE_F, "BunnyPath7", 0, ST_WPT_RUN, 0, 0, 0, .1);
	EntGame.SpawnAnimalOnPath(AID_SABLE_M, "Path11", 0, ST_WPT_RUN, 0, 0, 1.5, .1);
	EntGame.SpawnAnimalOnPath(AID_SABLE_M, "Path12", 0, ST_WPT_RUN, 0, 0, 3.5, .1);
	Script.WaitSec(1.5);
	EntGame.SpawnAnimalOnPath(AID_SABLE_M, "BunnyPath7", 0, ST_WPT_RUN, 0, -2.5, 0, .1);
	EntGame.SpawnAnimalOnPath(AID_SABLE_F, "Path11", 0, ST_WPT_RUN, 0, 0, 0, .1);
	Script.WaitSec(1.5);
	EntGame.SpawnAnimalOnPath(AID_SABLE_M, "BunnyPath6", 0, ST_WPT_RUN, 0, 0, 2.5, .1);
	EntGame.SpawnAnimalOnPath(AID_SABLE_F, "Path11", 0, ST_WPT_RUN, 0, 0, -1.5, .1);
	EntGame.SpawnAnimalOnPath(AID_SABLE_M, "Path12", 0, ST_WPT_RUN, 0, 0, 1.5, .1);	
	Script.WaitSec(1.5);
	EntGame.SpawnAnimalOnPath(AID_SABLE_F, "BunnyPath6", 0, ST_WPT_RUN, 0, 0, 0, .1);
	EntGame.SpawnAnimalOnPath(AID_SABLE_M, "BunnyPath7", 0, ST_WPT_RUN, 0, 0, 0, .1);
	EntGame.SpawnAnimalOnPath(AID_SABLE_M, "Path11", 0, ST_WPT_RUN, 0, 0, -.5, .2);
	Script.WaitSec(1.5);
	EntGame.SpawnAnimalOnPath(AID_SABLE_F, "Path11", 0, ST_WPT_RUN, 0, 0, -2, .2);
	EntGame.SpawnAnimalOnPath(AID_SABLE_M, "Path12", 0, ST_WPT_RUN, 0, 0, -1, .1);
	
	Script.WaitSec(14);
	EntGame.SpawnAnimalOnPath(AID_SABLE_F, "BunnyPath8", 0, ST_WPT_RUN, 0, 1.5, 1.5, .1);
	EntGame.SpawnAnimalOnPath(AID_SABLE_M, "BunnyPath9", 0, ST_WPT_RUN, 0, -1.5, .5, .1);
	EntGame.SpawnAnimalOnPath(AID_SABLE_M, "BunnyPath10", 0, ST_WPT_RUN, 0, 0, .5, .1);	
	Script.WaitSec(1.5);		
	EntGame.SpawnAnimalOnPath(AID_SABLE_M, "BunnyPath8", 0, ST_WPT_RUN, 0, 0, 0, .1);
	EntGame.SpawnAnimalOnPath(AID_SABLE_F, "BunnyPath9", 0, ST_WPT_RUN, 0, 0, 0, .1);
	EntGame.SpawnAnimalOnPath(AID_SABLE_M, "BunnyPath10", 0, ST_WPT_RUN, 0, 0, 0, .1);
	Script.WaitSec(2);
	EntGame.SpawnAnimalOnPath(AID_SABLE_F, "BunnyPath8", 0, ST_WPT_RUN, 0, 1.5, 1.5, .1);
	EntGame.SpawnAnimalOnPath(AID_SABLE_M, "BunnyPath9", 0, ST_WPT_RUN, 0, -1.5, .5, .1);
	EntGame.SpawnAnimalOnPath(AID_SABLE_M, "BunnyPath10", 0, ST_WPT_RUN, 0, 0, .5, .1);			
	Script.WaitSec(8.0);		

	CameraFollower.SetRollOffset(entHelicopter, 0, 2.0);
	Camera.SetPanOffset(entCamera, 0, 2.0);	
	Camera.SetTiltOffset(entCamera, 0, 2.0);		
		
	Script.WaitSec(2.5);
	EntGame.ShowCaption(STR_LVL_5_4_B, 0, 3.0);
	Script.WaitSec(4.0);

    d1=EntGame.SpawnAnimalOnPath(AID_SABLE_M, "LongerPath1", 0, ST_GRAZING, 15, 0, 0, .1);
	Animal.EnableFear(d1, false);
	Entity.SetName(d1, "SABLE1");	
    d2=EntGame.SpawnAnimalOnPath(AID_SABLE_F, "LongerPath1", 1, ST_GRAZING, 15, 0, 0, .1);
	Animal.EnableFear(d2, false);
	Entity.SetName(d2, "SABLE2");	
    d3=EntGame.SpawnAnimalOnPath(AID_SABLE_M, "LongerPath1", 2, ST_GRAZING, 15, 0, 0, .1);
	Animal.EnableFear(d3, false);
	Entity.SetName(d3, "SABLE3");	
    d4=EntGame.SpawnAnimalOnPath(AID_SABLE_M, "LongerPath1", 3, ST_GRAZING, 15, 0, 0, .1);
	Animal.EnableFear(d4, false);
	Entity.SetName(d4, "SABLE4");	
    d5=EntGame.SpawnAnimalOnPath(AID_SABLE_F, "LongerPath1", 4, ST_GRAZING, 15, 0, 0, .1);
	Animal.EnableFear(d5, false);
	Entity.SetName(d5, "SABLE5");
	d6=EntGame.SpawnAnimalOnPath(AID_SABLE_M, "LongerPath2", 0, ST_GRAZING, 15, 0, 0, .1);
	Animal.EnableFear(d6, false);
	Entity.SetName(d6, "SABLE6");
	d7=EntGame.SpawnAnimalOnPath(AID_SABLE_M, "LongerPath2", 1, ST_GRAZING, 15, 0, 0, .1);
	Animal.EnableFear(d7, false);
	Entity.SetName(d7, "SABLE7");
	d8=EntGame.SpawnAnimalOnPath(AID_SABLE_M, "LongerPath2", 2, ST_GRAZING, 15, 0, 0, .1);
	Animal.EnableFear(d8, false);
	Entity.SetName(d8, "SABLE8");	
								
	Camera.SetPanOffset(entCamera, -75, 2.0);	
	CameraFollower.SetRollOffset(entHelicopter, -25, 2.0);
	Camera.SetTiltOffset(entCamera, -30, 2.0);		
		
	Script.WaitSec(12);
	
	CameraFollower.SetRollOffset(entHelicopter, 0, 3.0);
	Camera.SetPanOffset(entCamera, 75, 3.0);	
	Camera.SetTiltOffset(entCamera, 0, 2.0);		

	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path16", 0, 1.5, -2, -1.5, 1.2);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path17", 0, .5, 1.5, 2, 1.2);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path18", 0, 0, 0, -1, 1.2);
    	
	Script.WaitSec(2);

	Gone("SABLE1");
	Gone("SABLE2");
	Gone("SABLE3");
	Gone("SABLE4");
	Gone("SABLE5");
	Gone("SABLE6");
	Gone("SABLE7");
	Gone("SABLE8");
				
	CameraFollower.SetRollOffset(entHelicopter, 0, 3.0);
	Camera.SetPanOffset(entCamera, 75, 3.0);

	d9=EntGame.SpawnAnimalOnPath(AID_SABLE_F, "LongerPath2", 3, ST_GRAZING, 15, 0, 0, .1);
	Animal.EnableFear(d9, false);
	Entity.SetName(d9, "SABLE9");
	d10=EntGame.SpawnAnimalOnPath(AID_SABLE_M, "LongerPath2", 4, ST_GRAZING, 15, 0, 0, .1);
	Animal.EnableFear(d10, false);
	Entity.SetName(d10, "SABLE10");		
	d11=EntGame.SpawnAnimalOnPath(AID_SABLE_M, "LongerPath2", 5, ST_GRAZING, 15, 0, 0, .1);
	Animal.EnableFear(d11, false);
	Entity.SetName(d11, "SABLE11");	

	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path16", 0, 0, 0, 0, 1.2);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path17", 0, 0, 0, 0, 1.2);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path18", 0, 0, 0, 0, 1.2);
				
    Script.WaitSec(1.5);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path16", 0, 1.5, -2, -1.5, 1.2);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path17", 0, .5, 1.5, 2, 1.2);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path18", 0, 0, 0, -1, 1.2); 
	Script.WaitSec(6.0);	  	  
					
	a1=EntGame.SpawnAnimalOnPath(AID_NILECROC_M, "BunnyPath12", 0, ST_GRAZING, 10, 0, 0, .1);
	Animal.EnableFear(a1, false);
	a2=EntGame.SpawnAnimalOnPath(AID_NILECROC_M, "BunnyPath12", 1, ST_GRAZING, 10, 0, 0, .1);
	Animal.EnableFear(a2, false);	
	a3=EntGame.SpawnAnimalOnPath(AID_NILECROC_M, "BunnyPath12", 2, ST_GRAZING, 10, 0, 0, .1);
	Animal.EnableFear(a3, false);	
	
	e1=EntGame.SpawnAnimalOnPath(AID_SABLE_M, "BunnyPath13", 0, ST_WPT_WALK, 0, 0, 0, .1);
	Animal.EnableFear(e1, false);
	e2=EntGame.SpawnAnimalOnPath(AID_SABLE_M, "BunnyPath14", 0, ST_WPT_WALK, 0, 0, 0, .1);
	Animal.EnableFear(e2, false);
	e3=EntGame.SpawnAnimalOnPath(AID_SABLE_F, "BunnyPath14", 2, ST_GRAZING, 0, 0, 0, .1);
	Animal.EnableFear(e3, false);
	e4=EntGame.SpawnAnimalOnPath(AID_SABLE_M, "BunnyPath15", 1, ST_WPT_WALK, 0, 0, 0, .1);
	Animal.EnableFear(e4, false);
				
	CameraFollower.SetRollOffset(entHelicopter, -25, 3.0);
	Camera.SetPanOffset(entCamera, -90, 2.0);
	Camera.SetTiltOffset(entCamera, -20, 3.0);
	
    Script.WaitSec(1); 
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path19", 0, 0, -3, 0, 1.2);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path20", 0, 0, -3, 0, 1.2);	
    Script.WaitSec(1);
    	
 	Gone("SABLE9");
	Gone("SABLE10");
	Gone("SABLE11");
	   	
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path19", 0, -1.5, -4, 1, 1.2);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path20", 0, 1.0, -6, -.5, 1.2);    	
    Script.WaitSec(3); 
    	   
	CameraFollower.SetRollOffset(entHelicopter, 25, 3.0);
	Camera.SetPanOffset(entCamera, -30, 3.0);
	Camera.SetTiltOffset(entCamera, 0, 3.0); 
	Script.WaitSec(3);
		
	f1=EntGame.SpawnAnimalOnPath(AID_IMPALA_M, "LongerPath3", 0, ST_GRAZING, 10, 0, 0, .1);
	Animal.EnableFear(f1, false);
	f2=EntGame.SpawnAnimalOnPath(AID_IMPALA_M, "LongerPath3", 1, ST_GRAZING, 10, 0, 0, .1);
	Animal.EnableFear(f2, false);	
	f3=EntGame.SpawnAnimalOnPath(AID_IMPALA_M, "LongerPath3", 2, ST_GRAZING, 10, 0, 0, .1);
	Animal.EnableFear(f3, false);	
	f4=EntGame.SpawnAnimalOnPath(AID_IMPALA_M, "LongerPath3", 3, ST_GRAZING, 10, 0, 0, .1);
	Animal.EnableFear(f4, false);
	f5=EntGame.SpawnAnimalOnPath(AID_IMPALA_M, "LongerPath3", 4, ST_GRAZING, 10, 0, 0, .1);
	Animal.EnableFear(f5, false);
	Script.WaitSec(2);		
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path21", 0, 0, 0, 0, 1.0);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "BunnyPath16", 0, 0, 0, 0, 1.0);	

	CameraFollower.SetRollOffset(entHelicopter, -15, 3.0);
	Camera.SetPanOffset(entCamera, -80, 3.0);
	Camera.SetTiltOffset(entCamera, -10, 3.0);
	Script.WaitSec(1.0);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path21", 0, 0, .5, 0, 1.0);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "BunnyPath16", 0, 0, -.5, 0, 1.0);
	Script.WaitSec(1.0);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path21", 0, 0, -.5, 0, 1.0);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "BunnyPath16", 0, 0, .5, 0, 1.0);	
	Script.WaitSec(1.5);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path21", 0, 0, 0, 0, 1.0);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "BunnyPath16", 0, 0, 0, 0, 1.0);		
	Script.WaitSec(1.0);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path22", 0, 0, 0, 0, 1.0);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path23", 0, 0, 1.5, 0, 1.0);
	Script.WaitSec(1.0);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path22", 0, 0, 1, 0, 1.0);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path23", 0, 0, .5, 0, 1.0);	
	Script.WaitSec(1.0);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path22", 0, 0, -1, 0, 1.0);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path23", 0, 0, 3, 0, 1.0);			
				
	CameraFollower.SetRollOffset(entHelicopter, -10, 3.0);
	Camera.SetTiltOffset(entCamera, -5, 3.0);	
	
	Script.WaitSec(1.0);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path22", 0, 0, .5, 0, 1.0);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path23", 0, 0, -1.5, 0, 1.0);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path24", 0, 0, 0, 0, 1.0);
	Script.WaitSec(1.0);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path22", 0, 0, -1, 0, 1.0);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path23", 0, 0, .5, 0, 1.0);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path24", 0, 0, -1.5, 0, 1.0);	
	Script.WaitSec(1.0);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path22", 0, 0, 0, 0, 1.0);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path23", 0, 0, 2.5, 0, 1.0);		
	
	G1=EntGame.SpawnAnimalOnPath(AID_SABLE_M, "BunnyPath17", 0, ST_GRAZING, 6.5, 0, 0, .3);
	Animal.EnableFear(G1, false);
	G2=EntGame.SpawnAnimalOnPath(AID_SABLE_F, "BunnyPath18", 0, ST_GRAZING, 6, 0, 0, .1);
	Animal.EnableFear(G2, false);
	G3=EntGame.SpawnAnimalOnPath(AID_SABLE_M, "BunnyPath19", 0, ST_GRAZING, 5, 0, 0, .1);
	Animal.EnableFear(G3, false);
	G4=EntGame.SpawnAnimalOnPath(AID_SABLE_M, "BunnyPath20", 0, ST_GRAZING, 4.5, 0, 0, .1);
	Animal.EnableFear(G4, false);	
	G5=EntGame.SpawnAnimalOnPath(AID_SABLE_F, "BunnyPath21", 0, ST_GRAZING, 8, 0, 0, .1);
	Animal.EnableFear(G5, false);	
	G6=EntGame.SpawnAnimalOnPath(AID_SABLE_M, "BunnyPath22", 0, ST_GRAZING, 5, 0, 0, .1);
	Animal.EnableFear(G6, false);	
	G7=EntGame.SpawnAnimalOnPath(AID_SABLE_M, "BunnyPath23", 0, ST_GRAZING, 7, 0, 0, .1);
	Animal.EnableFear(G7, false);
		
	Script.WaitSec(13);		
 
	H1=EntGame.SpawnAnimalOnPath(AID_NILECROC_M, "LongerPath4", 1, ST_GRAZING, 30, 0, 0, .3);
	Animal.EnableFear(H1, false);
	Entity.SetName(H1, "CROC1");
	H2=EntGame.SpawnAnimalOnPath(AID_NILECROC_M, "LongerPath4", 2, ST_GRAZING, 30, 0, 0, .1);
	Animal.EnableFear(H2, false);
	Entity.SetName(H2, "CROC2");
	H3=EntGame.SpawnAnimalOnPath(AID_NILECROC_M, "LongerPath4", 3, ST_GRAZING, 30, 0, 0, .1);
	Animal.EnableFear(H3, false);
	Entity.SetName(H3, "CROC3");
	
	H4=EntGame.SpawnAnimalOnPath(AID_NILECROC_M, "LongerPath4", 4, ST_GRAZING, 20, 0, 0, .1);
	Animal.EnableFear(H4, false);
	Animal.SetAutoChargeDist(H4, 10);	
	Animal.SetAttackType(H4, ATK_STRAFE);
	Animal.SetPostAttackRand(H4, false);
	Animal.SetPostAttackDir(H4, 90);	
	Entity.SetName(H4, "CROC4");	
	
	H5=EntGame.SpawnAnimalOnPath(AID_NILECROC_M, "LongerPath5", 0, ST_GRAZING, 20, 0, 0, .1);
	Animal.EnableFear(H5, false);
	Entity.SetName(H5, "CROC5");	
	H6=EntGame.SpawnAnimalOnPath(AID_NILECROC_M, "LongerPath5", 1, ST_GRAZING, 20, 0, 0, .1);
	Animal.EnableFear(H6, false);
	Entity.SetName(H6, "CROC6");	
	H7=EntGame.SpawnAnimalOnPath(AID_NILECROC_M, "LongerPath5", 2, ST_GRAZING, 20, 0, 0, .1);
	Animal.EnableFear(H7, false);
	Entity.SetName(H7, "CROC7");
			
 	CameraFollower.SetRollOffset(entHelicopter, 15, 3.0);
	Camera.SetPanOffset(entCamera, 80, 3.0);
	Camera.SetTiltOffset(entCamera, -10, 3.0);
 	
	Script.WaitSec(4);
	EntGame.ShowCaption(STR_LVL_5_4_C, 0, 3.0);	
	Script.WaitSec(3);
	Camera.SetPanOffset(entCamera, -50, 3.0);
	Script.WaitSec(1);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path25", 0, 1.5, .5, .5, .8);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path25", 0, -2, 0, 0, 1.0);		
 	CameraFollower.SetRollOffset(entHelicopter, 0, 3.0);
	Camera.SetTiltOffset(entCamera, 0, 3.0);
    Script.WaitSec(1.0);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path25", 0, -1, -1, 1, 1.0);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path25", 0, 1.5, 1.5, -1, 1.0);
	Script.WaitSec(1.0);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path25", 0, -2, 2, -2, 1.2);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path25", 0, 0, 0, 0, 1.0);	
	    	    	   	
    --DECELLERATE	
	Camera.SetSpeed(entCamera, 4.5, 0.1);
	Script.WaitSec(.25);
	Camera.SetSpeed(entCamera, 4.0, 0.1);
	Script.WaitSec(2);		    
	Camera.SetSpeed(entCamera, 3.5, 0.1);
	Script.WaitSec(.25);
	Camera.SetSpeed(entCamera, 3.0, 0.1);	
	Script.WaitSec(.25);	
	
	Camera.SetSpeed(entCamera, 2.5, 0.001);			
	--MAX SPEED     	
 
 	Script.WaitSec(4);
 	
 	Gone("CROC1");		
 	Gone("CROC5");
 	Gone("CROC6");
 	Gone("CROC7");	
 	
 	--LOOKING LEFT
 	Camera.SetPanOffset(entCamera, -80, 3.0);	
    Camera.StopAtWaypoint(entCamera, "CamWptB1");	

	Script.WaitSec(2);				
   
	Gone("CROC2");
		  		  
    end;    

-----------------------------------------------------------------------------

function Part2()
	 
--[[
	--DEBUG (Next 3 Lines)
	Camera.JumpToWaypoint(entCamera, "CamWptB1");
	Camera.SetSpeed(entCamera, 0, 0.007); 
 	Camera.SetPanOffset(entCamera, -80, .007);
--]] 	


    -- Detach the helicopter from the camera.    
    entHelicopter = Entity.FindName(entRoot, "CameraFollower1");  
	if (entHelicopter) then  
	-- This says, set the camera the helicopter is following to "null", which will detach it.  
		Entity.SetVoid(entHelicopter, "entCamera", 0);  
		end; 
	
	Camera.JumpToWaypoint(entCamera, "CamWptF1");
    
    Script.WaitSec(2);
   
    Camera.SetSpeed(entCamera, .5, 0.1); 
 	Script.WaitSec(.25);
    Camera.SetSpeed(entCamera, 1, 0.1); 
 	Script.WaitSec(.25); 		
    Camera.SetSpeed(entCamera, 1.5, 0.1); 
 	Script.WaitSec(.25); 		
    Camera.SetSpeed(entCamera, 2.0, 0.1);
     		
    Camera.StopAtWaypoint(entCamera, "CamWptQQQ");
    --SET CAMERA BACK TO CENTER
    Camera.SetPanOffset(entCamera, 0, 5.0);
    
    Script.WaitSec(1.0);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "LongPath1", 0, 1.5, .5, .5, 1.0);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "LongPath2", 0, -2, 0, 0, 1.0);
	Script.WaitSec(1.0);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "LongPath1", 0, -1, -1, 1, 1.0);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "LongPath2", 0, 1.5, .5, -1, 1.0);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "LongPath1", 0, -2, -1.5, 1.0, 1.0);	
	Script.WaitSec(1.0);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "LongPath2", 0, 0, 0, 0, 1.0);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "LongPath1", 0, 0, 0, 0, 1.0);
	Script.WaitSec(1.0);	
			
    a = EntGame.SpawnAnimalOnPath(AID_NILECROC_M, "Path26", 0, ST_WPT_RUN, 0, 0, 0, .3);
    Animal.SetChargeWhenShot(a, true);
    Animal.SetAttackType(a, ATK_STRAFE);
    Animal.SetPostAttackTimer(a, 0);
    	
	Script.WaitSec(1.0);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "LongPath3", 0, 1.5, .5, .5, 1.0);
	Script.WaitSec(1.0);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "LongPath3", 0, -1, -1, 1, 1.0);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "LongPath4", 0, 1.5, .5, -1, 1.0);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "LongPath3", 0, -2, -1.5, 1.0, 1.0);	
	Script.WaitSec(1.0);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "LongPath3", 0, 0, 0, 0, 1.0);
	EntGame.SpawnAnimalOnPath(AID_IMPALA_M, "BunnyPath24", 0, ST_WPT_RUN, 0, 1, 1, .5);	
	EntGame.SpawnAnimalOnPath(AID_IMPALA_M, "BunnyPath25", 0, ST_WPT_RUN, 0, -1, -.5, .5);		
	Script.WaitSec(1.0);		
		
    a = EntGame.SpawnAnimalOnPath(AID_NILECROC_M, "Path27", 0, ST_WPT_RUN, 0, 0, 0, .3);
    Animal.SetChargeWhenShot(a, true);
    Animal.SetAttackType(a, ATK_STRAFE);
    Animal.SetPostAttackTimer(a, 0);
    
    EntGame.SpawnAnimalOnPath(AID_IMPALA_M, "BunnyPath26", 0, ST_WPT_RUN, 0, 0, 0, .5);	
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "LongPath3", 0, 1.5, .5, .5, 1.0);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "LongPath4", 0, -2, 0, 0, 1.0);
	Script.WaitSec(1.0);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "LongPath4", 0, 1.5, .5, -1, 1.0);
	EntGame.SpawnAnimalOnPath(AID_IMPALA_M, "BunnyPath24", 0, ST_WPT_RUN, 0, 0, 0, .5);	
	EntGame.SpawnAnimalOnPath(AID_IMPALA_M, "BunnyPath25", 0, ST_WPT_RUN, 0, 0, 0, .5);	
	Script.WaitSec(1.0);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "LongPath4", 0, 1.5, .5, -1, 1.0);	
	EntGame.SpawnAnimalOnPath(AID_IMPALA_M, "BunnyPath26", 0, ST_WPT_RUN, 0, 0, 0, .5);			
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "LongPath4", 0, 0, 0, 0, 1.0);
	Script.WaitSec(1.0);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "LongPath4", 0, -1.5, -.5, 1, 1.0);	
	EntGame.SpawnAnimalOnPath(AID_IMPALA_M, "BunnyPath27", 0, ST_WPT_RUN, 0, 0, 0, .5);	
	Script.WaitSec(1.5);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "LongPath4", 0, 0, 0, 0, 1.0);	
	EntGame.SpawnAnimalOnPath(AID_IMPALA_M, "BunnyPath27", 0, ST_WPT_RUN, 0, 0, 0, .5);		
	Script.WaitSec(1.0);
	EntGame.SpawnAnimalOnPath(AID_IMPALA_M, "BunnyPath27", 0, ST_WPT_RUN, 0, 0, 0, .5);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "LongPath4", 0, -2, -1, 2, 1.0);	
	Script.WaitSec(5.0);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath28", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	Script.WaitSec(1);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "LongPath4", 0, -2, -1, 2, 1.0);		
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath29", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "LongPath4", 0, 0, 0, 0, 1.0);	
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath28", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	Script.WaitSec(1);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "LongPath4", 0, -1.5, -.5, 1, 1.0);		
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath30", 0, ST_WPT_RUN, 0, 0, 0, 1.2);	
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath31", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	Script.WaitSec(1);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "LongPath4", 0, 1.5, .5, -1, 1.0);		
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath28", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath31", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	Script.WaitSec(1.5);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "LongPath4", 0, 0, 1, -1, 1.0);	
	Script.WaitSec(1.5);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path28", 0, 0, 1, -1, 1.0);	
	Script.WaitSec(2);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path28", 0, 0, 0, 0, 1.0);	
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "LongPath4", 0, 0, 1, -1, 1.0);	
	Script.WaitSec(2);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path28", 0, -1.5, 1.5, 1.5, 1.0);	
	EntGame.SpawnAnimalOnPath(AID_IMPALA_M, "BunnyPath32", 0, ST_WPT_RUN, 0, 0, 0, .5);
	Script.WaitSec(1.5);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path28", 0, 1.5, .5, -1.5, 1.0);		
	EntGame.SpawnAnimalOnPath(AID_IMPALA_M, "BunnyPath24", 0, ST_WPT_RUN, 0, 0, 0, .5);
	EntGame.SpawnAnimalOnPath(AID_IMPALA_M, "BunnyPath26", 0, ST_WPT_RUN, 0, 0, 0, .5);
	Script.WaitSec(1.5);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path28", 0, 0, 0, 0, 1.2);	
	EntGame.SpawnAnimalOnPath(AID_IMPALA_M, "BunnyPath25", 0, ST_WPT_RUN, 0, 0, 0, .5);
	Script.WaitSec(1.5);
	EntGame.SpawnAnimalOnPath(AID_IMPALA_M, "BunnyPath32", 0, ST_WPT_RUN, 0, 0, 0, .5);	
	Script.WaitSec(1.5);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path28", 0, 0, 1.5, 0, 1.2);	
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "LongPath4", 0, 0, 1, -1, 1.0);	
	EntGame.SpawnAnimalOnPath(AID_IMPALA_M, "BunnyPath24", 0, ST_WPT_RUN, 0, 0, 0, .5);
	EntGame.SpawnAnimalOnPath(AID_IMPALA_M, "BunnyPath25", 0, ST_WPT_RUN, 0, 0, 0, .5);		
	Script.WaitSec(1.5);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path28", 0, -1, -1.5, 0, 1.2);	
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "LongPath4", 0, 0, -1, -1, 1.0);		
	EntGame.SpawnAnimalOnPath(AID_IMPALA_M, "BunnyPath26", 0, ST_WPT_RUN, 0, 0, 0, .5);	
	EntGame.SpawnAnimalOnPath(AID_IMPALA_M, "BunnyPath32", 0, ST_WPT_RUN, 0, 0, 0, .5);
	EntGame.SpawnAnimalOnPath(AID_IMPALA_M, "BunnyPath24", 0, ST_WPT_RUN, 0, 0, 0, .5);
	EntGame.SpawnAnimalOnPath(AID_IMPALA_M, "BunnyPath25", 0, ST_WPT_RUN, 0, 0, 0, .5);
	Script.WaitSec(1.5);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path28", 0, 0, 0, 0, 1.2);	
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "LongPath4", 0, 0, 0, 0, 1.0);			
	EntGame.SpawnAnimalOnPath(AID_IMPALA_M, "BunnyPath26", 0, ST_WPT_RUN, 0, 0, 0, .5);
  		  
    end;    

-----------------------------------------------------------------------------
-- Main entry point
   
Setup();   
Part1();
Part2();
  