-----------------------------------------------------------------------------
-- Stage 5-1
-----------------------------------------------------------------------------

function PostStage()

    EntGame.EnablePlayerControl(false);
    EntGame.ClearFlag(GF_READYTOSTART);
    EntGame.BindCameraToEntity("IntroCamera");

    end;     
    
-----------------------------------------------------------------------------    
-- Setup

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

    -- load world
    SetupWorld("Maps\\WorldRedLands\\RedLandsCommon.ini", "Maps\\Stage5-1\\Stage5-1.ini","","");
    EntGame.CreatePlayerEntities();
    
	EntGame.SetGlobalDustColorInitial(1.0, 0.72, .58, .26);
    EntGame.SetGlobalDustColorFinal  (0.0, 0.72, .58, .26);

    EntGame.SetStageTimer(180);

    EntGame.LoadAnimal(AID_SABLE_M);
    EntGame.LoadAnimal(AID_SABLE_F);
	EntGame.LoadAnimal(AID_KUDU_M);
	EntGame.LoadAnimal(AID_KUDU_F);	
	EntGame.LoadAnimal(AID_ELEPHANT_M);
	EntGame.LoadAnimal(AID_SPURWINGGOOSE_M);
	
	StartupSequence("Music\\Moteff.ogg");
      
    end;
    
-----------------------------------------------------------------------------

function Part1()

	Camera.JumpToWaypoint(entCamera, "CamWptAA");
    Camera.SetSpeed(entCamera, 0.0, 0.01); 
    
    EntGame.SpawnAnimalOnPath(AID_KUDU_M, "MainPath1", 0, ST_WPT_RUN, 0, 0, 0, .3);
    EntGame.SpawnAnimalOnPath(AID_KUDU_M, "Path1", 0, ST_WPT_RUN, 0, 0, 0, .4);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "LongerPath1", 0, 0, 0, 0, 1); 
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "LongerPath2", 0, 0, 0, 0, 1); 
    Script.WaitSec(1.5);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "LongerPath1", 0, 1, 1, 1, 1); 
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "LongerPath2", 0, -1, -1, -1, 1); 
    Script.WaitSec(1);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "LongerPath1", 0, 0, 0, 0, 1); 
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "LongerPath2", 0, 0, 0, 0, 1);	
    Script.WaitSec(1);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "LongerPath1", 0, -1, -1, -1, 1); 
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "LongerPath2", 0, 0, 1, 1, 1); 		
    EntGame.SpawnAnimalOnPath(AID_KUDU_F, "MainPath2", 0, ST_WPT_RUN, 0, -.5, .5, .3);
    EntGame.SpawnAnimalOnPath(AID_KUDU_F, "MainPath3", 0, ST_WPT_RUN, 0, -.5, .5, .3);
    Script.WaitSec(2.0);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "LongerPath1", 0, 0, 0, 0, 1); 
    EntGame.SpawnAnimalOnPath(AID_KUDU_F, "MainPath1", 0, ST_WPT_RUN, 0, 0, 0, .3);	
    EntGame.SpawnAnimalOnPath(AID_KUDU_M, "MainPath2", 0, ST_WPT_RUN, 0, 0, 0, .3);
    EntGame.SpawnAnimalOnPath(AID_KUDU_M, "MainPath3", 0, ST_WPT_RUN, 0, 0, 0, .3);
    Script.WaitSec(2.5);
    EntGame.SpawnAnimalOnPath(AID_SABLE_M, "MainPath3", 0, ST_WPT_RUN, 0, 0, 0, .3);
    EntGame.SpawnAnimalOnPath(AID_KUDU_M, "Path1", 0, ST_WPT_RUN, 0, 0, 0, .3);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "LongerPath2", 0, 0, 0, 0, 1);
    Script.WaitSec(2.5);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "LongerPath2", 0, 0, 1, 0, 1);	
    EntGame.SpawnAnimalOnPath(AID_SABLE_F, "MainPath2", 0, ST_WPT_RUN, 0, 1, 1, .3);
    Script.WaitSec(2.5);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "LongerPath2", 0, 1.5, 0, 1.5, 1);	
    EntGame.SpawnAnimalOnPath(AID_KUDU_M, "MainPath3", 0, ST_WPT_RUN, 0, -1, -1, .3);
    EntGame.SpawnAnimalOnPath(AID_KUDU_F, "MainPath4", 0, ST_WPT_RUN, 0, 0, 0, .3);
    Script.WaitSec(2.5);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "LongerPath2", 0, .5, -2, .5, 1);	
    EntGame.SpawnAnimalOnPath(AID_SABLE_M, "MainPath2", 0, ST_WPT_RUN, 0, 0, 0, .3);
    EntGame.SpawnAnimalOnPath(AID_KUDU_M, "MainPath4", 0, ST_WPT_RUN, 0, 0, 0, .3);
    Script.WaitSec(1.0);
    EntGame.SpawnAnimalOnPath(AID_SABLE_M, "MainPath1", 0, ST_WPT_RUN, 0, 0, 0, .3);
    Script.WaitSec(1.0);
    EntGame.SpawnAnimalOnPath(AID_SABLE_F, "MainPath1", 0, ST_WPT_RUN, 0, 0, 0, .3);   
    EntGame.SpawnAnimalOnPath(AID_SABLE_M, "MainPath2", 0, ST_WPT_RUN, 0, 0, 0, .3);  	
    Script.WaitSec(1.0);
    EntGame.SpawnAnimalOnPath(AID_KUDU_F, "MainPath1", 0, ST_WPT_RUN, 0, 0, 0, .3);   	
    EntGame.SpawnAnimalOnPath(AID_KUDU_M, "MainPath2", 0, ST_WPT_RUN, 0, 0, 0, .3);  	
	Script.WaitSec(8);
		
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "MainPath7", 0, 0, 0, 0, 1);	
    EntGame.SpawnAnimalOnPath(AID_SABLE_M, "MainPath5", 0, ST_WPT_RUN, 0, 0, 0, .3);
    	
    Script.WaitSec(1);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "MainPath7", 0, -1.5, .5, 1.5, 1);		
    Script.WaitSec(1);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "MainPath7", 0, 1.5, -1, -1.5, 1);		
    EntGame.SpawnAnimalOnPath(AID_SABLE_F, "MainPath5", 0, ST_WPT_RUN, 0, 0, 0, .3);
    EntGame.SpawnAnimalOnPath(AID_KUDU_M, "MainPath6", 0, ST_WPT_RUN, 0, 0, 0, .3);	
    
    Camera.StopAtWaypoint(entCamera, "CamWptCC");
    Camera.SetSpeed(entCamera, 2.5, 0.001);
    
    Script.WaitSec(2);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "MainPath7", 0, 1.5, -1, -1.5, 1);	
    EntGame.SpawnAnimalOnPath(AID_KUDU_M, "MainPath5", 0, ST_WPT_RUN, 0, 0, 0, .3);
    Script.WaitSec(.5);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "MainPath7", 0, 1.5, -1, -1.5, 1);		
    Script.WaitSec(.5);	
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "MainPath7", 0, -1.5, 0, 1.5, 1);		
    Script.WaitSec(3);
    EntGame.SpawnAnimalOnPath(AID_KUDU_M, "MainPath5", 0, ST_WPT_RUN, 0, 0, 0, .3);
    EntGame.SpawnAnimalOnPath(AID_SABLE_F, "MainPath6", 0, ST_WPT_RUN, 0, 0, 0, .3);	
    Script.WaitSec(3);
    EntGame.SpawnAnimalOnPath(AID_SABLE_F, "MainPath5", 0, ST_WPT_RUN, 0, 0, 0, .3);
    EntGame.SpawnAnimalOnPath(AID_KUDU_M, "MainPath6", 0, ST_WPT_RUN, 0, 0, 0, .3); 
    Script.WaitSec(2);   
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "MainPath7", 0, -1.5, 0, 1.5, 1);		
    EntGame.SpawnAnimalOnPath(AID_SABLE_M, "MainPath5", 0, ST_WPT_RUN, 0, 0, 0, .3);
    Script.WaitSec(1.5);
    EntGame.SpawnAnimalOnPath(AID_KUDU_M, "MainPath5", 0, ST_WPT_RUN, 0, 0, 0, .3);	   		
    Script.WaitSec(3.5); --TRAVEL TIME
	
    --ARRIVED AT CC
    
    end;
    
-----------------------------------------------------------------------------

function Part2()

	--DEBUG
	--Camera.JumpToWaypoint(entCamera, "CamWptCC");
    --Camera.SetSpeed(entCamera, 0.0, 0.007); 
    
    EntGame.SpawnAnimalOnPath(AID_ELEPHANT_M, "MainPath8", 0, ST_WPT_RUN, 0, 0, 0, .5);
    EntGame.SpawnAnimalOnPath(AID_ELEPHANT_M, "MainPath9", 0, ST_WPT_RUN, 0, 0, 0, .5);
    EntGame.SpawnAnimalOnPath(AID_ELEPHANT_M, "MainPath10", 0, ST_WPT_RUN, 0, 0, 0, .5);
    EntGame.SpawnAnimalOnPath(AID_ELEPHANT_M, "MainPath12", 0, ST_WPT_RUN, 0, 0, 0, .5);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "MainPath11", 0, -1.5, 0, 1.5, .8);
    Script.WaitSec(6);
    EntGame.SpawnAnimalOnPath(AID_SABLE_M, "MainPath13", 0, ST_WPT_RUN, 0, 0, 0, .3);
    Script.WaitSec(1);
    EntGame.SpawnAnimalOnPath(AID_KUDU_M, "MainPath13", 0, ST_WPT_RUN, 0, 0, 0, .3);	
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "MainPath11", 0, 0, .5, 0, .8);
    Script.WaitSec(1.5);
    EntGame.SpawnAnimalOnPath(AID_SABLE_F, "MainPath14", 0, ST_WPT_RUN, 0, 0, 0, .3);	
    Script.WaitSec(1.5);
    EntGame.SpawnAnimalOnPath(AID_KUDU_M, "MainPath12", 0, ST_WPT_RUN, 0, 0, 0, .3);
    Script.WaitSec(1.5);
    EntGame.SpawnAnimalOnPath(AID_KUDU_F, "MainPath13", 0, ST_WPT_RUN, 0, 0, 0, .3);	
    Script.WaitSec(3);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "MainPath11", 0, 0, .5, 0, .8);	
    EntGame.SpawnAnimalOnPath(AID_SABLE_M, "MainPath8", 0, ST_WPT_RUN, 0, 0, 0, .5);
    EntGame.SpawnAnimalOnPath(AID_SABLE_M, "MainPath9", 0, ST_WPT_RUN, 0, 0, 0, .5);
    EntGame.SpawnAnimalOnPath(AID_SABLE_M, "MainPath10", 0, ST_WPT_RUN, 0, 0, 0, .5);
    EntGame.SpawnAnimalOnPath(AID_SABLE_F, "MainPath12", 0, ST_WPT_RUN, 0, 0, 0, .5);
    Script.WaitSec(.5);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "MainPath11", 0, -1, -.5, -1, .8);		
    Script.WaitSec(.5);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "MainPath11", 0, 1, 1, 1, .8);
    Script.WaitSec(.5);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "MainPath11", 0, 0, .5, 0, .8);	
    EntGame.SpawnAnimalOnPath(AID_ELEPHANT_M, "MainPath12", 0, ST_WPT_RUN, 0, 0, 0, .5);
    Script.WaitSec(1.5);
    EntGame.SpawnAnimalOnPath(AID_KUDU_M, "MainPath13", 0, ST_WPT_RUN, 0, 0, 0, .3);	
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "MainPath11", 0, 0, .5, 0, .8);
    Script.WaitSec(1.5);
    EntGame.SpawnAnimalOnPath(AID_SABLE_F, "MainPath14", 0, ST_WPT_RUN, 0, 0, 0, .3);	
    Script.WaitSec(1.5);
    EntGame.SpawnAnimalOnPath(AID_KUDU_M, "MainPath12", 0, ST_WPT_RUN, 0, 0, 0, .3);
    Script.WaitSec(1.5);
    EntGame.SpawnAnimalOnPath(AID_KUDU_F, "MainPath13", 0, ST_WPT_RUN, 0, 0, 0, .3);	   
    
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "MainPath11", 0, -1, -.5, -1, .8);
    Script.WaitSec(.5);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "MainPath11", 0, 1, .5, 1, .8);
    Script.WaitSec(.5);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "MainPath11", 0, 0, 0, 0, .8);	
    Script.WaitSec(4);
    
    Camera.StopAtWaypoint(entCamera, "CamWptFF");
    Camera.SetSpeed(entCamera, 2.5, 0.001);
   
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "MainPath16", 0, 0, 0, 0, .8);	
    EntGame.SpawnAnimalOnPath(AID_ELEPHANT_M, "MainPath8", 0, ST_WPT_RUN, 0, 0, 0, .5);
    EntGame.SpawnAnimalOnPath(AID_ELEPHANT_M, "MainPath9", 0, ST_WPT_RUN, 0, 0, 0, .5);
    EntGame.SpawnAnimalOnPath(AID_ELEPHANT_M, "MainPath10", 0, ST_WPT_RUN, 0, 0, 0, .5);
    EntGame.SpawnAnimalOnPath(AID_SABLE_M, "MainPath15", 0, ST_WPT_RUN, 0, 0, 0, .3);	
    Script.WaitSec(1.0);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "MainPath16", 0, 2, 2, 2, .8);		
    EntGame.SpawnAnimalOnPath(AID_KUDU_F, "Path2", 0, ST_WPT_RUN, 0, 0, 0, .3);	
    EntGame.SpawnAnimalOnPath(AID_SABLE_F, "Path4", 0, ST_WPT_RUN, 0, 0, 0, .3);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "MainPath16", 0, -2, -2, -2, .8);
    EntGame.SpawnAnimalOnPath(AID_KUDU_M, "Path3", 0, ST_WPT_RUN, 0, 0, 0, .3); 
    Script.WaitSec(.5);  	
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "MainPath16", 0, 0, 0, 0, .8);	
    Script.WaitSec(1.0);   
    EntGame.SpawnAnimalOnPath(AID_KUDU_M, "Path3", 0, ST_WPT_RUN, 0, 0, 0, .3);	
   	Script.WaitSec(1.5);
   	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "MainPath16", 0, 1, 1, 1, .8);	
    EntGame.SpawnAnimalOnPath(AID_KUDU_M, "Path2", 0, ST_WPT_RUN, 0, 0, 0, .3);	
    EntGame.SpawnAnimalOnPath(AID_SABLE_F, "Path4", 0, ST_WPT_RUN, 0, 0, 0, .3);
	
    Script.WaitSec(1.5);  
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "MainPath16", 0, 0, 0, 0, .8);	 

    Script.WaitSec(1.5);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "MainPath16", 0, 0, 0, 0, .8);	
    EntGame.SpawnAnimalOnPath(AID_SABLE_M, "Path4", 0, ST_WPT_RUN, 0, 0, 0, .3);
    Script.WaitSec(1.0);
    EntGame.SpawnAnimalOnPath(AID_KUDU_M, "Path4", 0, ST_WPT_RUN, 0, 0, 0, .3);
       	
    Script.WaitSec(12); --TRAVEL TIME

    --ARRIVED AT FF
	
    end;
        
-----------------------------------------------------------------------------

function Part3()

	--DEBUG
	--Camera.JumpToWaypoint(entCamera, "CamWptFF");
    --Camera.SetSpeed(entCamera, 0.0, 0.007); 
    
    a = EntGame.SpawnAnimalOnPath(AID_ELEPHANT_M, "MainPath17", 0, ST_WPT_RUN, 0, 0, 0, .5);
    Animal.SetChargeWhenShot(a, true);
    Animal.SetAttackType(a, ATK_STATIC);
	Animal.SetAttackRepeat(a, 3);
	Animal.SetPostAttackRand(a, false);
	Animal.SetPostAttackDir(a, 90);	
		
    EntGame.SpawnAnimalOnPath(AID_ELEPHANT_M, "Path5", 0, ST_WPT_RUN, 0, 0, 0, .8);
    Script.WaitSec(2);
    EntGame.SpawnAnimalOnPath(AID_ELEPHANT_M, "Path5", 0, ST_WPT_RUN, 0, 0, -2.5, .3);
    Script.WaitSec(1);
    a = EntGame.SpawnAnimalOnPath(AID_ELEPHANT_M, "MainPath12", 0, ST_WPT_RUN, 0, -1, 2.0, .5);
    Animal.SetChargeWhenShot(a, true);
    Animal.SetAttackType(a, ATK_STATIC);
	Animal.SetAttackRepeat(a, 3);
	Animal.SetPostAttackRand(a, false);
	Animal.SetPostAttackDir(a, -90);
    
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path7", 0, -1.5, 0, 1.5, .8);
    Script.WaitSec(.5);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path7", 0, 0, 0, 1.5, .8);
    Script.WaitSec(.5);
    EntGame.SpawnAnimalOnPath(AID_ELEPHANT_M, "Path5", 0, ST_WPT_RUN, 0, 0, -3, .7);	
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path7", 0, 1.5, 0, 1.5, .8);
    Script.WaitSec(2);
    EntGame.SpawnAnimalOnPath(AID_ELEPHANT_M, "Path5", 0, ST_WPT_RUN, 0, 0, 5, .6);
    EntGame.SpawnAnimalOnPath(AID_KUDU_M, "MainPath17", 0, ST_WPT_RUN, 0, 0, 0, 1);	
    Script.WaitSec(2);
    EntGame.SpawnAnimalOnPath(AID_ELEPHANT_M, "Path5", 0, ST_WPT_RUN, 0, 0, -1, .2);
    Script.WaitSec(3);
    EntGame.SpawnAnimalOnPath(AID_SABLE_M, "MainPath18", 0, ST_WPT_RUN, 0, 0, 0, 1);
    Script.WaitSec(1);
    EntGame.SpawnAnimalOnPath(AID_KUDU_M, "MainPath19", 0, ST_WPT_RUN, 0, 0, 0, 1);	
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path8", 0, 0, .5, 0, .8);
    Script.WaitSec(1.5);
    EntGame.SpawnAnimalOnPath(AID_SABLE_F, "MainPath17", 0, ST_WPT_RUN, 0, 0, 0, .8);	
    Script.WaitSec(1.5);
    EntGame.SpawnAnimalOnPath(AID_KUDU_M, "MainPath18", 0, ST_WPT_RUN, 0, 0, 0, .8);
    Script.WaitSec(1.5);
    EntGame.SpawnAnimalOnPath(AID_KUDU_F, "MainPath19", 0, ST_WPT_RUN, 0, 0, 0, .8);	
    Script.WaitSec(3);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "MainPath16", 0, 0, .5, 0, .8);	
    EntGame.SpawnAnimalOnPath(AID_SABLE_M, "Path6", 0, ST_WPT_RUN, 0, 0, 1.5, .8);
    Script.WaitSec(1);
    EntGame.SpawnAnimalOnPath(AID_SABLE_F, "Path6", 0, ST_WPT_RUN, 0, 0, -2, .8);
    Script.WaitSec(1);
    EntGame.SpawnAnimalOnPath(AID_KUDU_M, "MainPath17", 0, ST_WPT_RUN, 0, 0, 0, 1);		
    EntGame.SpawnAnimalOnPath(AID_SABLE_M, "Path6", 0, ST_WPT_RUN, 0, 1.5, 0, .8);
    Script.WaitSec(1);
    EntGame.SpawnAnimalOnPath(AID_KUDU_F, "MainPath17", 0, ST_WPT_RUN, 0, 0, 0, 1);		
    EntGame.SpawnAnimalOnPath(AID_SABLE_M, "MainPath18", 0, ST_WPT_RUN, 0, -1, 1, 1);
    Script.WaitSec(1);
    EntGame.SpawnAnimalOnPath(AID_SABLE_F, "Path6", 0, ST_WPT_RUN, 0, -3, 3, 1);
    Script.WaitSec(.5);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path7", 0, -1, -.5, -1, .8);		
    Script.WaitSec(.5);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path8", 0, 1, 1, 1, .8);
    Script.WaitSec(.5);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path8", 0, 0, .5, 0, .8);	
    
    a = EntGame.SpawnAnimalOnPath(AID_ELEPHANT_M, "MainPath17", 0, ST_WPT_RUN, 0, 0, 0, .5);
    Animal.SetChargeWhenShot(a, true);
    Animal.SetAttackType(a, ATK_STATIC);
	Animal.SetAttackRepeat(a, 2);
	Animal.SetPostAttackRand(a, false);
	Animal.SetPostAttackDir(a, 90);
	
    Script.WaitSec(1.5);
    EntGame.SpawnAnimalOnPath(AID_KUDU_M, "MainPath17", 0, ST_WPT_RUN, 0, 0, 5, 1);	
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "MainPath16", 0, 0, .5, 0, .8);
    Script.WaitSec(1.5);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "MainPath16", 0, 0, .5, 0, .8);	
    EntGame.SpawnAnimalOnPath(AID_SABLE_F, "MainPath19", 0, ST_WPT_RUN, 0, 0, 0, 1);	
    Script.WaitSec(1.5);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "MainPath16", 0, 0, .5, 0, .8);    
    EntGame.SpawnAnimalOnPath(AID_KUDU_M, "MainPath19", 0, ST_WPT_RUN, 0, 0, 0, 1);
    Script.WaitSec(1.5);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "MainPath16", 0, 0, .5, 0, .8);    
    EntGame.SpawnAnimalOnPath(AID_KUDU_F, "MainPath19", 0, ST_WPT_RUN, 0, 0, 0, 1);	   
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path7", 0, -1, -.5, -1, .8);
    Script.WaitSec(.5);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path7", 0, 1, .5, 1, .8);
    Script.WaitSec(.5);
    EntGame.SpawnAnimalOnPath(AID_SABLE_M, "MainPath17", 0, ST_WPT_RUN, 0, 0, 0, 1);		
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path8", 0, 0, 0, 0, .8);	    
    Script.WaitSec(1);
    EntGame.SpawnAnimalOnPath(AID_SABLE_F, "Path6", 0, ST_WPT_RUN, 0, 0, -2, .8);
    Script.WaitSec(1);
    EntGame.SpawnAnimalOnPath(AID_KUDU_M, "MainPath17", 0, ST_WPT_RUN, 0, 0, 0, 1);		
    EntGame.SpawnAnimalOnPath(AID_SABLE_M, "Path6", 0, ST_WPT_RUN, 0, 1.5, 0, .8);
    Script.WaitSec(1);
    EntGame.SpawnAnimalOnPath(AID_KUDU_F, "MainPath17", 0, ST_WPT_RUN, 0, 0, 0, 1);		
    EntGame.SpawnAnimalOnPath(AID_SABLE_M, "MainPath18", 0, ST_WPT_RUN, 0, -1, 1, 1);
    	
    Script.WaitSec(6); --SHOOT TIME

    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path7", 0, 0, .5, 0, .8);
    Script.WaitSec(.5);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path7", 0, 1, -1, 0, .8);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path8", 0, 3, .5, 0, .8);
    Script.WaitSec(.5);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path8", 0, 1, 0, 0, .8);		
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path7", 0, -2, -.5, 0, .8);
    Script.WaitSec(.5);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path7", 0, 1.5, .5, 0, .8);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path8", 0, 0, 1.5, 0, .8);
    Script.WaitSec(.5);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path8", 0, 4, 2, 0, .8);		
        
    Script.WaitSec(5);
    
    end;
       
-----------------------------------------------------------------------------

function Part4()

	--DEBUG
	--Camera.JumpToWaypoint(entCamera, "CamWptFF");
    --Camera.SetSpeed(entCamera, 0.0, 0.01); 
	
	Camera.StopAtWaypoint(entCamera, "CamWptJJ");
    Camera.SetSpeed(entCamera, 2.0, 0.001);
    
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "MainPath27", 0, 0, 0, 0, 1.0);
    
    a = EntGame.SpawnAnimalOnPath(AID_KUDU_M, "MainPath26", 0, ST_WPT_RUN, 0, 0, 2, .9);
    Animal.FaceEntity(a, entCamera);
	a = EntGame.SpawnAnimalOnPath(AID_SABLE_M, "MainPath22", 0, ST_WPT_RUN, 0, 0, 0, .2);
	Animal.FaceEntity(a, entCamera);
	Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "MainPath27", 0, 0, 1, 0, 1.0);
	Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "MainPath27", 0, 0, -1.5, 0, 1.0);
	Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "MainPath27", 0, 0, -.5, 0, 1.0);	
	a = EntGame.SpawnAnimalOnPath(AID_KUDU_M, "MainPath26", 0, ST_WPT_RUN, 0, 0, 7, .6);
	Animal.FaceEntity(a, entCamera);	
	a = EntGame.SpawnAnimalOnPath(AID_SABLE_F, "MainPath22", 0, ST_WPT_RUN, 0, 0, 0, .2);
	Animal.FaceEntity(a, entCamera);
	
	a = EntGame.SpawnAnimalOnPath(AID_ELEPHANT_M, "MainPath20", 0, ST_WPT_RUN, 0, 0, 0, .2); 
	Animal.SetChargeWhenShot(a, true);
    Animal.SetAttackType(a, ATK_STRAFE);
	Animal.SetStrafeAttackDist(a, 6.5);
	Animal.SetPostAttackRand(a, false);
	Animal.SetPostAttackDir(a, -90);
	
	EntGame.SpawnAnimalOnPath(AID_ELEPHANT_M, "MainPath21", 0, ST_WPT_RUN, 0, 0, 0, .2);
	Script.WaitSec(1.0); 
	
	a = EntGame.SpawnAnimalOnPath(AID_KUDU_F, "MainPath26", 0, ST_WPT_RUN, 0, 0, 2, .6);  
	Animal.FaceEntity(a, entCamera); 
	a = EntGame.SpawnAnimalOnPath(AID_SABLE_M, "MainPath22", 0, ST_WPT_RUN, 0, 0, 0, .2);  
	Animal.FaceEntity(a, entCamera); 
	Script.WaitSec(1);
	
	a = EntGame.SpawnAnimalOnPath(AID_ELEPHANT_M, "MainPath20", 0, ST_WPT_RUN, 0, 0, 3, .2);
	Animal.SetAutoChargeDist(a, 10);	
	Animal.SetAttackType(a, ATK_STRAFE);
	Animal.SetStrafeAttackDist(a, 6.5);
	Animal.SetPostAttackRand(a, false);
	Animal.SetPostAttackDir(a, -90);
	 
	EntGame.SpawnAnimalOnPath(AID_ELEPHANT_M, "MainPath21", 0, ST_WPT_RUN, 0, 0, -5, .2);
	Script.WaitSec(2);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "MainPath28", 0, 0, 0, 0, 1.0);   	
	EntGame.SpawnAnimalOnPath(AID_SABLE_F, "MainPath23", 0, ST_WPT_RUN, 0, 0, 0, 1);   
 	Script.WaitSec(.5);
 	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "MainPath28", 0, 0, -1, 0, 1.0);
 	Script.WaitSec(.5);
 	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "MainPath28", 0, -1.5, 1.5, -1.5, 1.0);
 	Script.WaitSec(.5);	
 	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "MainPath28", 0, 0, .5, -3.5, .8);	
	EntGame.SpawnAnimalOnPath(AID_SABLE_M, "MainPath23", 0, ST_WPT_RUN, 0, 0, 0, 1);  
 	Script.WaitSec(1.5);
 	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "MainPath28", 0, 3, -2, 0, .7);	
 	a = EntGame.SpawnAnimalOnPath(AID_SABLE_M, "MainPath25", 0, ST_WPT_RUN, 0, 0, 0, 1); 
 	Animal.FaceEntity(a, entCamera); 	
	EntGame.SpawnAnimalOnPath(AID_SABLE_M, "MainPath23", 0, ST_WPT_RUN, 0, 0, 0, 1); 
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "MainPath28", 0, -3, 0, 0, .6); 
	Script.WaitSec(1.0);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "MainPath28", 0, 0, -3, 0, .5);    
	a = EntGame.SpawnAnimalOnPath(AID_KUDU_M, "MainPath25", 0, ST_WPT_RUN, 0, 0, 3.5, 1.3);  
	Animal.FaceEntity(a, entCamera);  
	Script.WaitSec(1.0);
	a = EntGame.SpawnAnimalOnPath(AID_SABLE_F, "MainPath25", 0, ST_WPT_RUN, 0, 0, -3.5, 1);	
	Animal.FaceEntity(a, entCamera);    
	Script.WaitSec(1.0);
	a = EntGame.SpawnAnimalOnPath(AID_SABLE_M, "MainPath25", 0, ST_WPT_RUN, 0, 0, 0, .6);
	Animal.FaceEntity(a, entCamera);
	Script.WaitSec(1.0);
	a = EntGame.SpawnAnimalOnPath(AID_SABLE_M, "MainPath25", 0, ST_WPT_RUN, 0, 0, 0, .6);
	Animal.FaceEntity(a, entCamera);
	a = EntGame.SpawnAnimalOnPath(AID_ELEPHANT_M, "MainPath24", 0, ST_WPT_RUN, 0, 0, 0, .2);
	Animal.FaceEntity(a, entCamera);
	Script.WaitSec(5.0);    
	a = EntGame.SpawnAnimalOnPath(AID_ELEPHANT_M, "MainPath24", 0, ST_WPT_RUN, 0, 0, 0, .2);	
	Animal.FaceEntity(a, entCamera);
	Script.WaitSec(3.0);
	a = EntGame.SpawnAnimalOnPath(AID_SABLE_M, "MainPath30", 0, ST_WPT_RUN, 0, 0, 0, .8);
	Animal.FaceEntity(a, entCamera);
	
	EntGame.SpawnAnimalOnPath(AID_SABLE_M, "MainPath31", 0, ST_WPT_RUN, 0, 0, 0, .8);
	EntGame.SpawnAnimalOnPath(AID_SABLE_F, "MainPath32", 0, ST_WPT_RUN, 0, 0, 0, .8);
	EntGame.SpawnAnimalOnPath(AID_KUDU_M, "MainPath33", 0, ST_WPT_RUN, 0, 0, 15, .8);
	Script.WaitSec(1.0);
	EntGame.SpawnAnimalOnPath(AID_KUDU_M, "MainPath32", 0, ST_WPT_RUN, 0, 0, 15, .8);	
	Script.WaitSec(1.0);
	EntGame.SpawnAnimalOnPath(AID_SABLE_F, "MainPath31", 0, ST_WPT_RUN, 0, 0, -12, .8);
	EntGame.SpawnAnimalOnPath(AID_SABLE_M, "MainPath33", 0, ST_WPT_RUN, 0, 0, 16, .8);
	Script.WaitSec(1.0);
	EntGame.SpawnAnimalOnPath(AID_SABLE_M, "MainPath33", 0, ST_WPT_RUN, 0, 0, 5, .8);	
			
	a = EntGame.SpawnAnimalOnPath(AID_ELEPHANT_M, "MainPath29", 0, ST_WPT_RUN, 0, 0, 0, 1);	
	Animal.FaceEntity(a, entCamera);
	Animal.SetAutoChargeDist(a, 10);	
	Animal.SetAttackType(a, ATK_STRAFE);
	Animal.SetStrafeAttackDist(a, 6.5);
	Animal.SetPostAttackRand(a, false);
	Animal.SetPostAttackDir(a, -90);	

	a = EntGame.SpawnAnimalOnPath(AID_SABLE_F, "MainPath34", 0, ST_WPT_RUN, 0, 0, 0, .8);
	Animal.FaceEntity(a, entCamera);
	
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "MainPath34", 0, 0, 0, 0, 1);
	Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "MainPath34", 0, 0, -2, 0, 1);
	Script.WaitSec(.5);
	a = EntGame.SpawnAnimalOnPath(AID_KUDU_M, "MainPath34", 0, ST_WPT_RUN, 0, 0, 0, 1);
	Animal.FaceEntity(a, entCamera);	
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "MainPath34", 0, 0, 1.5, 0, 1);
	Script.WaitSec(1);				
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "MainPath34", 0, -2, -4, -2, 1);
	Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "MainPath34", 0, 0, 1.5, 0, 1);
	Script.WaitSec(1);		
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "MainPath34", 0, 0, 1.5, 0, 1);
	Script.WaitSec(.5);		
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "MainPath34", 0, 2, 0, 2, 1);
	Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "MainPath34", 0, -2, -4, -2, 1);
	Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "MainPath34", 0, 0, 1.5, 0, 1);				
	a = EntGame.SpawnAnimalOnPath(AID_SABLE_M, "MainPath34", 0, ST_WPT_RUN, 0, 0, 0, .8);
	Animal.FaceEntity(a, entCamera);	
	
    end;
       
-----------------------------------------------------------------------------
-- Main entry point
   
Setup();   
Part1();   
Part2();   
Part3();   
Part4(); 

