-----------------------------------------------------------------------------
-- Stage 4-2
-----------------------------------------------------------------------------
-- GLOBALS
 
function Height(name)    
    local animal2;
	animal2 = Entity.FindName(entRoot, name);
	if (animal2) then
    	Animal.SetElvOffset(animal2, 0);
    	Animal.SetCoinMode(animal2, CM_SPAWNREL);	
    	end;
    end;  
        
-----------------------------------------------------------------------------    

function PostStage()

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

function Setup()

    EntGame.PushMenu("MenuGameRunning");

    SetupWorld("Maps\\WorldGreenValley\\GreenValleyCommon.ini", "Maps\\Stage4-2\\Stage4-2.ini","","");
    EntGame.CreatePlayerEntities();

    EntGame.SetGlobalDustColorInitial(1.0, 0.71, .68, .55);
    EntGame.SetGlobalDustColorFinal  (0.0, 0.71, .68, .55);
    
    EntGame.SetStageTimer(180);
    
    EntGame.LoadAnimal(AID_BUFFALO_M);
    EntGame.LoadAnimal(AID_BUFFALO_F);
	EntGame.LoadAnimal(AID_SPURWINGGOOSE_M);	
	EntGame.LoadAnimal(AID_HARE_M);
	EntGame.LoadAnimal(AID_HIPPO_M);
	EntGame.LoadAnimal(AID_RHINO_M);
	EntGame.LoadAnimal(AID_ELAND_M);
	EntGame.LoadAnimal(AID_ELAND_F);
  
	StartupSequence("Music\\Dim Horizon.ogg");
      
    end;

-----------------------------------------------------------------------------
function Part1()

	Camera.JumpToWaypoint(entCamera, "CamWptAA");
    Camera.SetSpeed(entCamera, 0.0, 0.1); 
          
	Rhino1=EntGame.SpawnAnimalOnPath(AID_RHINO_M, "BunnyPath1", 0, ST_GRAZING, 3, 0, 0, 1.6);
	Animal.EnableFear(Rhino1, false);
	Entity.SetName(Rhino1, "Rhino1");
	
	Rhino2=EntGame.SpawnAnimalOnPath(AID_RHINO_M, "BunnyPath2", 0, ST_WPT_WALK, 5, 0, 0, 1.6);
	Animal.EnableFear(Rhino2, false);
	Entity.SetName(Rhino2, "Rhino2");
	Animal.FaceEntity(Rhino2, entCamera);
	
	Buffalo1=EntGame.SpawnAnimalOnPath(AID_BUFFALO_M, "Path1", 0, ST_WPT_WALK, 9, 0, 0, 1.2);
	Animal.EnableFear(Buffalo1, false);
	Entity.SetName(Buffalo1, "Buffalo1");
	Buffalo2=EntGame.SpawnAnimalOnPath(AID_BUFFALO_M, "LongPath1", 0, ST_GRAZING, 7, 0, 0, 1.2);
	Animal.EnableFear(Buffalo2, false);
	Entity.SetName(Buffalo2, "Buffalo2");
	Buffalo3=EntGame.SpawnAnimalOnPath(AID_BUFFALO_M, "LongPath2", 0, ST_GRAZING, 3, 0, 0, 1.2);
	Animal.EnableFear(Buffalo3, false);
	Entity.SetName(Buffalo3, "Buffalo3");	

	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path3", 0, 0, 0, 0, .8);
	EntGame.SpawnAnimalOnPath(AID_ELAND_M, "LongerPath1", 0, ST_WPT_RUN, 0, 0, 0, .8);
	Script.WaitSec(1.5);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path3", 0, -3.6, 0, 4, .8);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path3", 0, 0, 0, -2.5, .8);  	
	EntGame.SpawnAnimalOnPath(AID_ELAND_M, "LongerPath2", 0, ST_WPT_RUN, 0, 0, 0, .8);
	Script.WaitSec(1.0);
	Run("Rhino2");			
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path3", 0, 0, -1.5, 0, .8);    
	Script.WaitSec(1.0);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path3", 0, -3.6, 0, 4, .8);	
	EntGame.SpawnAnimalOnPath(AID_ELAND_M, "LongerPath2", 0, ST_WPT_RUN, 0, -1.5, -1.5, .8);	
	Run("Buffalo1");	
	Script.WaitSec(1.5);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path3", 0, 0, -1.5, 0, .8);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path3", 0, 3, 0, -3, .8);		
	
	EntGame.SpawnAnimalOnPath(AID_ELAND_F, "LongerPath2", 0, ST_WPT_RUN, 0, 1.5, 1.5, .8);		
	EntGame.SpawnAnimalOnPath(AID_ELAND_M, "BunnyPath4", 0, ST_WPT_RUN, 0, 0, 0, 1.3);
	Script.WaitSec(2.5);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path3", 0, 1.5, -.5, 0, .8);		
	EntGame.SpawnAnimalOnPath(AID_ELAND_M, "LongerPath1", 0, ST_WPT_RUN, 0, 0, 0, .8);		
	EntGame.SpawnAnimalOnPath(AID_ELAND_M, "BunnyPath3", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	Script.WaitSec(2.0);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path3", 0, 0, -1.5, 0, .8);
    Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path3", 0, 2.5, -4, 2.5, .8);	
	Script.WaitSec(3.5);
	EntGame.SpawnAnimalOnPath(AID_ELAND_F, "BunnyPath5", 0, ST_WPT_RUN, 0, 0, 0, .9);			
	Script.WaitSec(3.0);
	EntGame.SpawnAnimalOnPath(AID_ELAND_M, "BunnyPath6", 0, ST_WPT_RUN, 0, 0, 0, .8);
	Script.WaitSec(4.0);
	EntGame.SpawnAnimalOnPath(AID_ELAND_M, "BunnyPath5", 0, ST_WPT_RUN, 0, -1.5, -1.5, .8);	
	Script.WaitSec(3.5);
	EntGame.SpawnAnimalOnPath(AID_ELAND_M, "BunnyPath6", 0, ST_WPT_RUN, 0, 1.5, 1.5, .7);	
	Script.WaitSec(1.0);
	EntGame.SpawnAnimalOnPath(AID_ELAND_F, "BunnyPath6", 0, ST_WPT_RUN, 0, 0, 0, .7);	
	Script.WaitSec(.5);	
	EntGame.SpawnAnimalOnPath(AID_ELAND_M, "BunnyPath6", 0, ST_WPT_RUN, 0, -1.5, 2.5, .7);
	Script.WaitSec(.5);	
	EntGame.SpawnAnimalOnPath(AID_ELAND_M, "BunnyPath6", 0, ST_WPT_RUN, 0, -1.5, 2.5, .5);
	
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path3", 0, 0, 0, 0, 1.2);
	Script.WaitSec(1.5);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path3", 0, -3.6, 0, 4, 1.4);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path3", 0, 0, 0, -2.5, 1.3);  	
	Script.WaitSec(1.0);			
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path3", 0, 0, -1.5, 0, 1.0);    
	Script.WaitSec(1.0);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path3", 0, -3.6, 0, 4, 1.2);	
  
    Camera.SetSpeed(entCamera, 3.0, 0.1); 
    Camera.StopAtWaypoint(entCamera, "CamWptHH");
    
    Script.WaitSec(4.0); 
    a = EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath7", 0, ST_WPT_RUN, 0, 0, 0, 2);
    Animal.FaceEntity(a, entCamera);
    Script.WaitSec(2.5);
    a = EntGame.SpawnAnimalOnPath(AID_RHINO_M, "BunnyPath2", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
    Animal.FaceEntity(a, entCamera);
	Animal.SetAutoChargeDist(a, 20);	
	Animal.SetAttackType(a, ATK_STRAFE);
	Animal.SetStrafeAttackDist(a, 7);
	Animal.SetPostAttackRand(a, false);
	Animal.SetPostAttackDir(a, 90);
    Script.WaitSec(1.0);
    EntGame.SpawnAnimalOnPath(AID_RHINO_M, "BunnyPath2", 0, ST_WPT_RUN, 0, -2.0, 2.0, 1.1);
    Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_RHINO_M, "BunnyPath2", 0, ST_WPT_RUN, 0, 3, -3, 1.0);

	--LOOK LEFT
	Camera.SetPanOffset(entCamera, -90, 1.2);
	
	Script.WaitSec(2.5);
	EntGame.SpawnAnimalOnPath(AID_ELAND_M, "BunnyPath3", 0, ST_WPT_RUN, 0, 0, 0, 1.1);
	EntGame.SpawnAnimalOnPath(AID_ELAND_M, "BunnyPath4", 0, ST_WPT_RUN, 0, .5, .5, 1.2);
	Script.WaitSec(2.0);
	EntGame.SpawnAnimalOnPath(AID_ELAND_M, "BunnyPath3", 0, ST_WPT_RUN, 0, 0, 0, 1.1);	
	
	--LOOK RIGHT
	Camera.SetPanOffset(entCamera, 10, 1.2);
	
	Buffalo1=EntGame.SpawnAnimalOnPath(AID_BUFFALO_M, "LongPath3", 0, ST_WPT_WALK, 9, 0, 0, 1.2);
	Animal.EnableFear(Buffalo1, false);
	Entity.SetName(Buffalo1, "Buffalo1");
	Buffalo2=EntGame.SpawnAnimalOnPath(AID_BUFFALO_M, "Path2", 0, ST_WPT_WALK, 9, 0, 0, 1.2);	
	Animal.EnableFear(Buffalo2, false);
	Entity.SetName(Buffalo2, "Buffalo2");
	Script.WaitSec(2.0);
	EntGame.SpawnAnimalOnPath(AID_ELAND_M, "BunnyPath3", 0, ST_WPT_RUN, 0, -1, -.5, .9);
	EntGame.SpawnAnimalOnPath(AID_ELAND_F, "BunnyPath4", 0, ST_WPT_RUN, 0, 1.0, 0, 1.2);			
	Script.WaitSec(2.5);
	EntGame.SpawnAnimalOnPath(AID_ELAND_M, "BunnyPath3", 0, ST_WPT_RUN, 0, -.5, 1.5, 1.0);
	EntGame.SpawnAnimalOnPath(AID_ELAND_M, "BunnyPath4", 0, ST_WPT_RUN, 0, -.5, .5, .7);
	Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_ELAND_F, "BunnyPath3", 0, ST_WPT_RUN, 0, 0, 0, 1.1);
	Script.WaitSec(.5);
	Run("Buffalo1");
	Script.WaitSec(3.5);
	Run("Buffalo2");
	Script.WaitSec(1.5);
	
	a1=EntGame.SpawnAnimalOnPath(AID_BUFFALO_M, "BunnyPath11", 0, ST_WPT_RUN, 0, 0, 0, 1.5);
	Animal.FaceEntity(a1, entCamera);	
	Animal.SetAutoChargeDist(a1, 20);	
	Animal.SetAttackType(a1, ATK_STRAFE);
	Animal.SetStrafeAttackDelay(a1, .5);
	Animal.SetStrafeAttackDist(a1, 7.0);
	Animal.SetPostAttackRand(a1, false);
	Animal.SetPostAttackDir(a1, -85);	
	Script.WaitSec(1.5);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "BunnyPath8", 0, 0, 0, 0, .8);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath15", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	Script.WaitSec(1.5);		
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "BunnyPath8", 0, -3.6, 0, 4, .8);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "BunnyPath9", 0, 0, 0, -2.5, .8);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "BunnyPath10", 0, 3, 0, -3, .8);  	
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath16", 0, ST_WPT_RUN, 0, .5, .5, 1.2);
	Script.WaitSec(1.0);
	a2=EntGame.SpawnAnimalOnPath(AID_BUFFALO_F, "BunnyPath13", 0, ST_WPT_RUN, 0, 0, 0, 1.5);
	Animal.FaceEntity(a2, entCamera);			
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "BunnyPath10", 0, 0, -1.5, 0, .8); 
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "BunnyPath9", 0, 0, 0, -2.5, .8);	
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "BunnyPath8", 0, 0, -1, 0, .8);   
	Script.WaitSec(1.0);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "BunnyPath9", 0, -3.6, 0, 4, .8);	
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath16", 0, ST_WPT_RUN, 0, -1.0, -1.0, 1.0);	
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath15", 0, ST_WPT_RUN, 0, .5, .5, 1.2);	

	b1=EntGame.SpawnAnimalOnPath(AID_BUFFALO_M, "BunnyPath12", 0, ST_WPT_RUN, 0, 0, 0, 1.5);
	Animal.FaceEntity(b1, entCamera);	
	Animal.SetAutoChargeDist(b1, 20);	
	Animal.SetAttackType(b1, ATK_STRAFE);
	Animal.SetStrafeAttackDelay(b1, .5);
	Animal.SetStrafeAttackDist(b1, 7);
	Animal.SetPostAttackRand(b1, false);
	Animal.SetPostAttackDir(b1, -90);	   
	Script.WaitSec(1.5); 					
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "BunnyPath8", 0, 0, -1.5, 0, .8);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "BunnyPath10", 0, 3, 0, -3, .8);	
	Script.WaitSec(1.0);
	c1=EntGame.SpawnAnimalOnPath(AID_BUFFALO_M, "BunnyPath13", 0, ST_WPT_RUN, 0, 0, 0, 1.5);
	Animal.FaceEntity(c1, entCamera);	
	Animal.SetAutoChargeDist(c1, 20);	
	Animal.SetAttackType(c1, ATK_STRAFE);
	Animal.SetStrafeAttackDelay(c1, .5);
	Animal.SetStrafeAttackDist(c1, 7);
	Animal.SetPostAttackRand(c1, false);
	Animal.SetPostAttackDir(c1, -90);		
	Script.WaitSec(1.0);
		
	a3=EntGame.SpawnAnimalOnPath(AID_BUFFALO_F, "BunnyPath11", 0, ST_WPT_RUN, 0, 0, 0, 1.5);
	Animal.FaceEntity(a3, entCamera);
	
	Script.WaitSec(4.0);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath17", 0, ST_WPT_RUN, 0, .5, .5, 1.2);	
	c2=EntGame.SpawnAnimalOnPath(AID_BUFFALO_F, "BunnyPath12", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	Animal.FaceEntity(c2, entCamera);	  
	Script.WaitSec(1.0);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath18", 0, ST_WPT_RUN, 0, -.5, -.5, 1.2);	
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "BunnyPath20", 0, -3.6, 0, 4, .8);	
	d1=EntGame.SpawnAnimalOnPath(AID_BUFFALO_M, "BunnyPath14", 0, ST_WPT_RUN, 0, 0, 0, 1.5);
	Animal.FaceEntity(d1, entCamera);	
	Animal.SetAutoChargeDist(d1, 17);	
	Animal.SetAttackType(d1, ATK_STRAFE);
	Animal.SetStrafeAttackDist(d1, 6);
	Animal.SetStrafeAttackDelay(d1, .5);
	Animal.SetPostAttackRand(d1, false);
	Animal.SetPostAttackDir(d1, -90);	    
	Script.WaitSec(1.0);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "BunnyPath20", 0, 0, -1.5, 0, .8);

    Script.WaitSec(2.0);	
    EntGame.SpawnAnimalOnPath(AID_HARE_M, "Path4", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "BunnyPath20", 0, 0, 0, 0, .8);
	
	Script.WaitSec(1.0);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "BunnyPath20", 0, 1.5, .5, 2, .8);  	
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "BunnyPath20", 0, .5, -1, .5, .8);
		  	
	Script.WaitSec(.5);
	Camera.SetPanOffset(entCamera, -10, 1.5);
	
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "BunnyPath20", 0, 0, 0, 0, .8);
	Script.WaitSec(1.0);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "BunnyPath20", 0, 1.5, .5, 2, .8);  	
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "BunnyPath20", 0, .5, -1, .5, .8);
	Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "BunnyPath20", 0, -1.0, .5, -1.0, .8);
	Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "BunnyPath20", 0, -.5, -2, 1.5, .8);	
		
	
	EntGame.SpawnAnimalOnPath(AID_RHINO_M, "BunnyPath3", 2, ST_WPT_RUN, 0, 0, 0, 1.2);
    Script.WaitSec(3);  
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "BunnyPath19", 0, 0, 0, 0, .8);
    a = EntGame.SpawnAnimalOnPath(AID_RHINO_M, "BunnyPath3", 2, ST_WPT_RUN, 0, 0, 0, 1.2);
    Animal.SetAutoChargeDist(a, 15);	
	Animal.SetAttackType(a, ATK_STRAFE);
	Animal.SetStrafeAttackDist(a, 7);
	Animal.SetPostAttackRand(a, false);
	Animal.SetPostAttackDir(a, 90);	

    Script.WaitSec(2);
	Camera.SetPanOffset(entCamera, 0, 1.5);    	
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "BunnyPath19", 0, -3.6, 0, 4, .8);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "BunnyPath19", 0, 0, 0, -2.5, .8);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "BunnyPath19", 0, 3, 0, -3, .8);  	    	
    a = EntGame.SpawnAnimalOnPath(AID_RHINO_M, "BunnyPath3", 2, ST_WPT_RUN, 0, 0, 0, 1.2);
    Animal.SetAutoChargeDist(a, 15);	
	Animal.SetAttackType(a, ATK_STRAFE);
	Animal.SetStrafeAttackDist(a, 6.3);
	Animal.SetPostAttackRand(a, false);
	Animal.SetPostAttackDir(a, 90);	
	Script.WaitSec(1.5);		
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "BunnyPath19", 0, 0, -1.5, 0, .8); 
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "BunnyPath19", 0, 1.0, 0, -2.5, .8);	
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "BunnyPath19", 0, 0, -1, 2.0, .8); 
	Script.WaitSec(1.5);        	
        
    --AT WPT HH
  
    Script.WaitSec(2.5); --TIME TO BLAST WHATEVER LIVES.
    EntGame.SpawnAnimalOnPath(AID_ELAND_F, "BunnyPath21", 0, ST_WPT_RUN, 0, -.5, -.5, .8);
    Script.WaitSec(1.5);
    EntGame.SpawnAnimalOnPath(AID_ELAND_M, "BunnyPath21", 0, ST_WPT_RUN, 0, .5, .5, .8); 
    Script.WaitSec(1.0);
    	            	    		  
    end;    

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

function Part2()

	--Camera.JumpToWaypoint(entCamera, "CamWptHH");
	
	Camera.SetSpeed(entCamera, 3.0, 0.1); 
	Camera.StopAtWaypoint(entCamera, "CamWptMM");
    Camera.SetPanOffset(entCamera, 0, 1.0);
    
    EntGame.SpawnAnimalOnPath(AID_ELAND_M, "BunnyPath21", 0, ST_WPT_RUN, 0, 0, 0, .8);
    EntGame.SpawnAnimalOnPath(AID_ELAND_M, "BunnyPath22", 0, ST_WPT_RUN, 0, .5, .5, 1.0);
    Script.WaitSec(1.0);
    EntGame.SpawnAnimalOnPath(AID_ELAND_F, "BunnyPath22", 0, ST_WPT_RUN, 0, 0, 0, 1.0);	
    EntGame.SpawnAnimalOnPath(AID_ELAND_F, "BunnyPath21", 0, ST_WPT_RUN, 0, -.5, -.5, .8);
    Script.WaitSec(1.5);
    EntGame.SpawnAnimalOnPath(AID_ELAND_M, "BunnyPath21", 0, ST_WPT_RUN, 0, .5, .5, .8); 
    Script.WaitSec(5.5);
    EntGame.SpawnAnimalOnPath(AID_ELAND_M, "BunnyPath23", 0, ST_WPT_RUN, 0, .5, .5, .8); 
    Script.WaitSec(1.0);
    EntGame.SpawnAnimalOnPath(AID_ELAND_F, "BunnyPath23", 0, ST_WPT_RUN, 0, -.5, -.5, .8);    	
    EntGame.SpawnAnimalOnPath(AID_ELAND_F, "BunnyPath21", 0, ST_WPT_RUN, 0, -.5, -.5, .8);
    Script.WaitSec(1.5);
    EntGame.SpawnAnimalOnPath(AID_ELAND_M, "BunnyPath21", 0, ST_WPT_RUN, 0, .5, .5, .8); 
    Script.WaitSec(1.0);		
    EntGame.SpawnAnimalOnPath(AID_ELAND_M, "BunnyPath21", 0, ST_WPT_RUN, 0, 1, 1, .8); 	
    Script.WaitSec(3.0);
    EntGame.SpawnAnimalOnPath(AID_ELAND_M, "BunnyPath23", 0, ST_WPT_RUN, 0, .5, .5, .8); 
    Script.WaitSec(1.0);
    EntGame.SpawnAnimalOnPath(AID_ELAND_F, "BunnyPath23", 0, ST_WPT_RUN, 0, -.5, -.5, .8);    	
    Script.WaitSec(1.0);
    EntGame.SpawnAnimalOnPath(AID_ELAND_M, "BunnyPath26", 0, ST_WPT_RUN, 0, -3, -3, 1.2);    	
    Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path5", 0, -2.5, 2, -2.5, 1.0);     	
    EntGame.SpawnAnimalOnPath(AID_ELAND_F, "BunnyPath26", 0, ST_WPT_RUN, 0, -1.5, -1.5, 1.0);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path5", 0, 0, 0, 0, 1.2);   
    Script.WaitSec(1.5);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path5", 0, 2.5, 1.5, 2.5, 1.3);  	    	
    EntGame.SpawnAnimalOnPath(AID_ELAND_M, "BunnyPath26", 0, ST_WPT_RUN, 0, -2.0, -2.0, 1.0); 
    Script.WaitSec(1.5);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path5", 0, -.5, 2, 3.5,1.2); 
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path5", 0, 0, 1, 0, 1.0);  	
    EntGame.SpawnAnimalOnPath(AID_ELAND_F, "BunnyPath24", 0, ST_WPT_RUN, 0, .5, .5, 1.4); 
    EntGame.SpawnAnimalOnPath(AID_ELAND_F, "BunnyPath25", 0, ST_WPT_RUN, 0, .5, .5, 1.4); 
    Script.WaitSec(1.5);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path5", 0, -3.6, 1.5, 4, .9);      	
    EntGame.SpawnAnimalOnPath(AID_ELAND_M, "BunnyPath24", 0, ST_WPT_RUN, 0, 0, 0, 1.3); 
    EntGame.SpawnAnimalOnPath(AID_ELAND_M, "BunnyPath25", 0, ST_WPT_RUN, 0, 0, 0, 1.3); 
    Script.WaitSec(1.5);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path5", 0, 0, 0, 0, 1.3); 	
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path5", 0, 0, .5, 2.0, 1.0);    	   	
    EntGame.SpawnAnimalOnPath(AID_RHINO_M, "BunnyPath25", 0, ST_WPT_RUN, 0, .5, .5, 1.4); 
    EntGame.SpawnAnimalOnPath(AID_ELAND_M, "BunnyPath27", 0, ST_WPT_RUN, 0, .5, .5, 1.4); 
    Script.WaitSec(1.5);   	
    EntGame.SpawnAnimalOnPath(AID_RHINO_M, "BunnyPath25", 0, ST_WPT_RUN, 0, 0, 0, 1.3); 
    EntGame.SpawnAnimalOnPath(AID_ELAND_M, "BunnyPath27", 0, ST_WPT_RUN, 0, 0, 0, 1.3); 
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path5", 0, 1.0, 0, -2.5, .8);          	
	Script.WaitSec(2.5);
    EntGame.SpawnAnimalOnPath(AID_ELAND_F, "BunnyPath27", 0, ST_WPT_RUN, 0, 0, 0, .8);
	Script.WaitSec(2.0);
    EntGame.SpawnAnimalOnPath(AID_ELAND_M, "BunnyPath27", 0, ST_WPT_RUN, 0, 1.5, 1.5, .7);    
	Script.WaitSec(1.5);
    EntGame.SpawnAnimalOnPath(AID_ELAND_M, "BunnyPath28", 0, ST_WPT_RUN, 0, 0, 0, .8); 
    EntGame.SpawnAnimalOnPath(AID_RHINO_M, "BunnyPath25", 0, ST_WPT_RUN, 0, 0, 0, .8); 
 	Script.WaitSec(1.5);
    EntGame.SpawnAnimalOnPath(AID_ELAND_F, "BunnyPath28", 0, ST_WPT_RUN, 0, -2, -2, .8);
    Script.WaitSec(1.5);   
    EntGame.SpawnAnimalOnPath(AID_ELAND_F, "BunnyPath27", 0, ST_WPT_RUN, 0, 0, 0, .8);
	Script.WaitSec(1.5);
    EntGame.SpawnAnimalOnPath(AID_ELAND_F, "BunnyPath28", 0, ST_WPT_RUN, 0, 1.5, 1.5, .7);    
	Script.WaitSec(1.5);
    EntGame.SpawnAnimalOnPath(AID_ELAND_M, "BunnyPath25", 0, ST_WPT_RUN, 0, 0, 0, .8); 
    EntGame.SpawnAnimalOnPath(AID_RHINO_M, "BunnyPath28", 0, ST_WPT_RUN, 0, 0, 0, .8); 
 	Script.WaitSec(1.5);
    EntGame.SpawnAnimalOnPath(AID_ELAND_F, "BunnyPath27", 0, ST_WPT_RUN, 0, -2, -2, .8);
 	Script.WaitSec(1.0);
    EntGame.SpawnAnimalOnPath(AID_ELAND_M, "BunnyPath27", 0, ST_WPT_RUN, 0, -2, -2, .8);
    
    Script.WaitSec(3); --TIME TO BLAST WHATEVER LIVES.
    
    Camera.SetSpeed(entCamera, 3.0, 0.1); 
    Camera.StopAtWaypoint(entCamera, "CamWptUU");
    
    EntGame.SpawnAnimalOnPath(AID_BUFFALO_F, "BunnyPath27", 0, ST_WPT_RUN, 0, 0, 0, .8);
    Script.WaitSec(3);
    EntGame.SpawnAnimalOnPath(AID_ELAND_F, "BunnyPath32", 0, ST_WPT_RUN, 0, -2, -2, .8);	
    a = EntGame.SpawnAnimalOnPath(AID_BUFFALO_M, "BunnyPath28", 0, ST_WPT_RUN, 0, 0, 0, .8);
    Animal.SetAutoChargeDist(a, 8);	
	Animal.SetAttackType(a, ATK_STRAFE);
	Animal.SetPostAttackRand(a, false);
	Animal.SetPostAttackDir(a, 90);	 
    
    Script.WaitSec(3);
    EntGame.SpawnAnimalOnPath(AID_ELAND_M, "BunnyPath32", 0, ST_WPT_RUN, 0, 0, 0, .8); 	
    EntGame.SpawnAnimalOnPath(AID_BUFFALO_M, "BunnyPath25", 0, ST_WPT_RUN, 0, 0, 0, .8);
        
    Script.WaitSec(3);
    EntGame.SpawnAnimalOnPath(AID_ELAND_F, "BunnyPath32", 0, ST_WPT_RUN, 0, 0, 0, .8);	
    EntGame.SpawnAnimalOnPath(AID_BUFFALO_F, "BunnyPath28", 0, ST_WPT_RUN, 0, 0, 0, .8);	
    Script.WaitSec(1);
    EntGame.SpawnAnimalOnPath(AID_ELAND_M, "BunnyPath32", 0, ST_WPT_RUN, 0, 1.5, 1.5, .7);	
    EntGame.SpawnAnimalOnPath(AID_BUFFALO_M, "BunnyPath29", 0, ST_WPT_RUN, 0, 0, 0, .8);	
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path6", 0, 2.5, .5, 2.5, .8);  	    	
    EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath31", 0, ST_WPT_RUN, 0, -2.0, -2.0, 1.0); 
    Script.WaitSec(1.5);
    EntGame.SpawnAnimalOnPath(AID_ELAND_M, "BunnyPath32", 0, ST_WPT_RUN, 0, 0, 0, .8);   	
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path6", 0, 3, 0, 3.5, 1.0); 
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path6", 0, 2, 0, 0, .8);  	
    EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath31", 0, ST_WPT_RUN, 0, .5, .5, 1.4); 
    EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath32", 0, ST_WPT_RUN, 0, .5, .5, 1.4); 
    Script.WaitSec(.5);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path6", 0, 2, 1.5, 4, .7);      	
    EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath31", 0, ST_WPT_RUN, 0, 0, 0, 1.3); 
    EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath32", 0, ST_WPT_RUN, 0, 0, 0, 1.3); 
    Script.WaitSec(.5);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path6", 0, 3.5, 0, 0, .8);
    Script.WaitSec(1.0); 	
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path6", 0, 2., -1, 1.0, .8);    	  
    	
    Script.WaitSec(12); --TIME TO BLAST WHATEVER LIVES.
    	        	    		  	
    end;    

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

function Part3()

	--DEBUG
	--Camera.JumpToWaypoint(entCamera, "CamWptQQ");
 
	--LOOK RIGHT	
	Camera.SetPanOffset(entCamera, 30, 1.5);	
	
	Camera.SetSpeed(entCamera, 2.5, 0.1); 

	Script.WaitSec(3.0);
		
	--LOOK LEFT	
	Camera.SetPanOffset(entCamera, -50, .5);
	Camera.SetTiltOffset(entCamera, -20, .5);

	--RISE HIPPOS!!!  
	Hippo1 = EntGame.SpawnAnimalOnPath(AID_HIPPO_M, "Path7", 0, ST_GRAZING, 30,0,0,1);	
	Animal.SetElvOffset(Hippo1, .5);
	Animal.SetCoinMode(Hippo1, CM_SPAWNREL);
	Animal.SetCoinOffset(Hippo1, 1.5);
	Entity.SetName(Hippo1, "Hippo1");
	Animal.EnableFear(Hippo1,false);
	Animal.FaceEntity(Hippo1, entCamera );
	
	Hippo2 = EntGame.SpawnAnimalOnPath(AID_HIPPO_M, "Path8", 0, ST_GRAZING, 30,0,0,1);	
	Animal.SetElvOffset(Hippo2, .5);
	Animal.SetCoinMode(Hippo2, CM_SPAWNREL);
	Animal.SetCoinOffset(Hippo2, 1.5);
	Entity.SetName(Hippo2, "Hippo2");
	Animal.EnableFear(Hippo2,false);
	Animal.FaceEntity(Hippo2, entCamera );

	Script.WaitSec(3.5);
        
	--LOOK RIGHT	
	Camera.SetPanOffset(entCamera, 30, .5);
	Camera.SetTiltOffset(entCamera, -10, .5);		
	Camera.SetSpeed(entCamera, 2.0, 0.1);
    	  		 
    --RISE HIPPOS!!!  
	Hippo3 = EntGame.SpawnAnimalOnPath(AID_HIPPO_M, "Path9", 0, ST_GRAZING, 30,0,0,1);	
	Animal.SetElvOffset(Hippo3, .5);
	Animal.SetCoinMode(Hippo3, CM_SPAWNREL);
	Animal.SetCoinOffset(Hippo3, 1.5);
	Entity.SetName(Hippo3, "Hippo3");
	Animal.EnableFear(Hippo3,false);
	Animal.FaceEntity(Hippo3, entCamera );
           	
	Hippo4 = EntGame.SpawnAnimalOnPath(AID_HIPPO_M, "Path11", 0, ST_GRAZING, 30,0,0,1);	
	Animal.SetElvOffset(Hippo4, .5);
	Animal.SetCoinMode(Hippo4, CM_SPAWNREL);
	Animal.SetCoinOffset(Hippo4, 1.5);
	Entity.SetName(Hippo4, "Hippo4");
	Animal.EnableFear(Hippo4,false);
	Animal.FaceEntity(Hippo4, entCamera );
        	
	Hippo5 = EntGame.SpawnAnimalOnPath(AID_HIPPO_M, "Path10", 0, ST_GRAZING, 30,0,0,1);	
	Animal.SetElvOffset(Hippo5, .5);
	Animal.SetCoinMode(Hippo5, CM_SPAWNREL);
	Animal.SetCoinOffset(Hippo5, 1.5);
	Entity.SetName(Hippo5, "Hippo5");
	Animal.EnableFear(Hippo5,false);
	Animal.FaceEntity(Hippo5, entCamera );

	Script.WaitSec(3.5);
 
	Gone("Hippo1");
    Gone("Hippo2");
    
	--LOOK LEFT	
	Camera.SetPanOffset(entCamera, -60, .5);
	Camera.SetTiltOffset(entCamera, -10, .5);
		   
	--RISE HIPPOS!!!  	
	Hippo6 = EntGame.SpawnAnimalOnPath(AID_HIPPO_M, "Path12", 0, ST_GRAZING, 30,0,0,1);	
	Animal.SetElvOffset(Hippo6, .5);
	Animal.SetCoinMode(Hippo6, CM_SPAWNREL);
	Animal.SetCoinOffset(Hippo6, 1.5);
	Entity.SetName(Hippo6, "Hippo6");
	Animal.EnableFear(Hippo6,false);
	Animal.FaceEntity(Hippo6, entCamera );
        
	Hippo7 = EntGame.SpawnAnimalOnPath(AID_HIPPO_M, "Path14", 0, ST_GRAZING, 30,0,0,1);	
	Animal.SetElvOffset(Hippo7, .5);
	Animal.SetCoinMode(Hippo7, CM_SPAWNREL);
	Animal.SetCoinOffset(Hippo7, 1.5);
	Entity.SetName(Hippo7, "Hippo7");
	Animal.EnableFear(Hippo7,false);
	Animal.FaceEntity(Hippo7, entCamera );
		
	Hippo8 = EntGame.SpawnAnimalOnPath(AID_HIPPO_M, "Path13", 0, ST_GRAZING, 30,0,0,1);	
	Animal.SetElvOffset(Hippo8, .5);
	Animal.SetCoinMode(Hippo8, CM_SPAWNREL);
	Animal.SetCoinOffset(Hippo8, 1.5);
	Entity.SetName(Hippo8, "Hippo8");
	Animal.EnableFear(Hippo8,false);
	Animal.FaceEntity(Hippo8, entCamera );
		
	Script.WaitSec(1.5);
	
	EntGame.SpawnAnimalOnPath(AID_ELAND_M, "BunnyPath34", 0, ST_WPT_RUN, 0, 0, 0, .6);	
	EntGame.SpawnAnimalOnPath(AID_ELAND_M, "BunnyPath35", 0, ST_WPT_RUN, 0, 0, 0, .5);
    
    Script.WaitSec(1.5);
    
    Gone("Hippo3");
    Gone("Hippo4");
    Gone("Hippo5");
    
    Camera.SetSpeed(entCamera, 2.5, 0.1);
   
 	EntGame.SpawnAnimalOnPath(AID_ELAND_F, "BunnyPath33", 0, ST_WPT_RUN, 0, 0, 0, 1.3);
	EntGame.SpawnAnimalOnPath(AID_ELAND_M, "BunnyPath35", 0, ST_WPT_RUN, 0, 0, 0, .8);
	Script.WaitSec(1.0);
	Camera.SetSpeed(entCamera, 3.0, 0.1);	
	EntGame.SpawnAnimalOnPath(AID_ELAND_M, "BunnyPath33", 0, ST_WPT_RUN, 0, -.5, .5, 1.3);
	EntGame.SpawnAnimalOnPath(AID_ELAND_M, "BunnyPath35", 0, ST_WPT_RUN, 0, .5, -.5, .8);		
	Script.WaitSec(.5);
		
	--TURN RIGHT	
	Camera.SetPanOffset(entCamera, 0, 1.0);
	Camera.SetTiltOffset(entCamera, -13, 1.0);
	
	Script.WaitSec(.5); 
	EntGame.SpawnAnimalOnPath(AID_ELAND_M, "BunnyPath33", 0, ST_WPT_RUN, 0, .5,.5, 1.0);
	EntGame.SpawnAnimalOnPath(AID_ELAND_M, "BunnyPath34", 0, ST_WPT_RUN, 0, .5, .5, 1.1);	
	EntGame.SpawnAnimalOnPath(AID_ELAND_F, "BunnyPath35", 0, ST_WPT_RUN, 0, 0, 0, .9);	

    Script.WaitSec(1);
    
    EntGame.SpawnAnimalOnPath(AID_ELAND_M, "BunnyPath34", 0, ST_WPT_RUN, 0, 0, 0, .8);	
	EntGame.SpawnAnimalOnPath(AID_ELAND_M, "BunnyPath35", 0, ST_WPT_RUN, 0, 0, 0, .8);
	
	Script.WaitSec(.5);
	
	EntGame.SpawnAnimalOnPath(AID_ELAND_F, "BunnyPath33", 0, ST_WPT_RUN, 0, .5,.5, 1.0);
	
	Gone("Hippo6");
    Gone("Hippo7");
    Gone("Hippo8");
 	    		  
    end;    

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

