-----------------------------------------------------------------------------
-- Stage 5-6
-----------------------------------------------------------------------------
--GLOBALS

function Graze2(name)    
    local y;
    y = Entity.FindName(entRoot, name);
    if (y) then
        Animal.SetAiTimer(y, 60);
        Animal.EnableFear(y, false);
        Animal.SetState(y, ST_GRAZING);	
        end;
    end;
    
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 Charge(name)    
    local v;
    v = Entity.FindName(entRoot, name);
    if (v) then
        Animal.SetChargeWhenShot(v, true);
		Animal.SetAutoChargeDist(v, 5);	
		Animal.SetAttackType(v, ATK_STATIC);
		Animal.SetAttackRepeat(v, 1);	
		Animal.SetPostAttackRand(v, false);
		Animal.SetPostAttackDir(v, -90);      	
        end;
    end; 
      
function Jump(name)    
    local u;
    u = Entity.FindName(entRoot, name);
    if (u) then
    	Animal.SetState(u, ST_ATTACK_STRAFE);
    	Animal.SetStrafeAttackDelay(u, 500.0);     	
        end;
    end; 
    
function Angry(name)    
    local t;
    t = Entity.FindName(entRoot, name);
    if (t) then
        Animal.SetChargeWhenShot(t, true);	
		Animal.SetAttackType(t, ATK_STRAFE);        	
        end;
    end; 
                
-----------------------------------------------------------------------------    

function PostStage()

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

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

    -- load world
    SetupWorld("Maps\\WorldBadlands\\BadlandsCommon.ini", "Maps\\Stage5-6\\Stage5-6.ini","","");
    EntGame.CreatePlayerEntities();

    EntGame.SetGlobalDustColorInitial(.8, 0.65, .55, .45);
    EntGame.SetGlobalDustColorFinal  (0.0, 0.65, .55, .45);
    
    EntGame.SetStageTimer(210);
    
    -- load sounds
    smpJeepAcceleration  = Sound.Load("Sound\\Environment\\JeepAcceleration.wav");     
	smpJeepOff 			 = Sound.Load("Sound\\Environment\\JeepOff.wav");     
	    
    EntGame.LoadAnimal(AID_LION_M);
    EntGame.LoadAnimal(AID_LEOPARD_M);
    EntGame.LoadAnimal(AID_ELEPHANT_M);
    EntGame.LoadAnimal(AID_HARE_M);
    EntGame.LoadAnimal(AID_MEERKAT_M);	
	EntGame.LoadAnimal(AID_WILDEBEEST_M);    
    EntGame.LoadAnimal(AID_SPURWINGGOOSE_M);
    
	StartupSequence("Music\\Dim Horizon.ogg");
    
    end;

-----------------------------------------------------------------------------
function Part1()
    
	entJeep = Entity.FindName(entRoot, "CameraFollower1");  	
		
	EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "BunnyPath1", 0, ST_WPT_RUN, 0, 0, 0, .1);
	EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "BunnyPath1", 1, ST_WPT_RUN, 0, 0, 0, .3);
	EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "BunnyPath1", 2, ST_WPT_RUN, 0, .5, .5, .3);
	EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "BunnyPath2", 0, ST_WPT_RUN, 0, 0, 0, .2);
	EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "BunnyPath2", 1, ST_WPT_RUN, 0, 0, 0, .2);
		
	Camera.JumpToWaypoint(entCamera, "CamWptAA");
    Camera.SetSpeed(entCamera, 0.0, 0.01); 
    CameraFollower.SetRollOffset(entJeep, -15, .001);
    Camera.SetRollOffset(entCamera, -15, .001);
    
	--Acceleration Sound
	Sound.Play(smpJeepAcceleration, 1, DS2_VOLMAX, DS2_CENTER);
	    
    --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(.25);
	Camera.SetSpeed(entCamera, 2.0, 0.1);	
	Script.WaitSec(.25);
	Camera.SetSpeed(entCamera, 2.5, 0.1);	
	Script.WaitSec(.25);
	Camera.SetSpeed(entCamera, 3.0, 0.1);	
	Script.WaitSec(.25);
	CameraFollower.SetRollOffset(entJeep, 0, 3);
	Camera.SetRollOffset(entCamera, 0, 3);	
	Camera.SetSpeed(entCamera, 3.5, 0.1);	
	Script.WaitSec(.25);
	Camera.SetSpeed(entCamera, 4.0, 0.1);
	Script.WaitSec(.25);
	Camera.SetSpeed(entCamera, 4.5, 0.1);	
	Script.WaitSec(.25);
	Camera.SetSpeed(entCamera, 5.0, 0.001);	
     
    Camera.StopAtWaypoint(entCamera, "CamWptEE");
    
    Script.WaitSec(1);
	EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "BunnyPath3", 0, ST_WPT_RUN, 0, 0, 0, .5); 
	
	Elephant1 = EntGame.SpawnAnimalOnPath(AID_ELEPHANT_M, "Path11", 1, ST_WPT_WALK, 0, 0, 0, .1);
	Animal.EnableFear(Elephant1, false);
	   	
    Script.WaitSec(2);
    EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "BunnyPath1", 0, ST_WPT_RUN, 0, 0, 0, .5);
	EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "BunnyPath2", 0, ST_WPT_RUN, 0, 0, 0, .5);
	Camera.SetPanOffset(entCamera, -50, 3);
	   	
    CameraFollower.SetRollOffset(entJeep, -15, 1);
    Camera.SetRollOffset(entCamera, -15, .8);
    
    Script.WaitSec(.5);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path12", 0, -.5, -.5, -.5, .5);    
    Script.WaitSec(1.0);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path12", 0, .5, 0, .5, .3);	 
    CameraFollower.SetRollOffset(entJeep, 0, 1);
    Camera.SetRollOffset(entCamera, 0, .8);
	 
    EntGame.SpawnAnimalOnPath(AID_HARE_M, "Path3", 0, ST_WPT_RUN, 0, .5, .5, 1.2);
    Script.WaitSec(1.0);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path12", 0, 0, -1.5, 0, .3);   
    Script.WaitSec(.5);    
    EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "BunnyPath1", 0, ST_WPT_RUN, 0, 0, 0, .5);
       
    CameraFollower.SetRollOffset(entJeep, 15, .2);
    Camera.SetRollOffset(entCamera, 15, .1);
    
    --Turn on rumble for all pads
--	EntGame.SetRumble(0, 1.0);
--	EntGame.SetRumble(1, 1.0);
--	EntGame.SetRumble(2, 1.0);
--	EntGame.SetRumble(3, 1.0);
	
    Script.WaitSec(.25);
    
    CameraFollower.SetRollOffset(entJeep, -10, .2);
    Camera.SetRollOffset(entCamera, -10, .1);
	
    Script.WaitSec(.25);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path12", 0, 0, 0, 0, .3);   
    
    CameraFollower.SetRollOffset(entJeep, 0, .2);
    Camera.SetRollOffset(entCamera, 0, .2);
 
    --Turn off rumble for all pads
--	EntGame.SetRumble(0, 0);
--	EntGame.SetRumble(1, 0);
--	EntGame.SetRumble(2, 0);
--	EntGame.SetRumble(3, 0);
	
    EntGame.SpawnAnimalOnPath(AID_HARE_M, "Path2", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
           
    Script.WaitSec(.5);
    EntGame.SpawnAnimalOnPath(AID_HARE_M, "Path2", 0, ST_WPT_RUN, 0, 1, 1, 1.2);
    EntGame.SpawnAnimalOnPath(AID_HARE_M, "Path2", 0, ST_WPT_RUN, 0, -1, -1, 1.2);	
    EntGame.SpawnAnimalOnPath(AID_HARE_M, "Path3", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
    EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "BunnyPath5", 0, ST_WPT_RUN, 0, 0, 0, .5);     
    Script.WaitSec(.5);	
    EntGame.SpawnAnimalOnPath(AID_HARE_M, "Path1", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
    Script.WaitSec(.5);
    EntGame.SpawnAnimalOnPath(AID_HARE_M, "Path1", 0, ST_WPT_RUN, 0, -1, -1, 1.2);
    EntGame.SpawnAnimalOnPath(AID_HARE_M, "Path1", 0, ST_WPT_RUN, 0, 1, 1, 1.2);	
    EntGame.SpawnAnimalOnPath(AID_HARE_M, "Path3", 0, ST_WPT_RUN, 0, -1, -1, 1.2);
    EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "BunnyPath4", 0, ST_WPT_RUN, 0, 0, 0, .5);  
    
    Script.WaitSec(.5);  	
    CameraFollower.SetRollOffset(entJeep, -15, 3);
    Camera.SetRollOffset(entCamera, -15, 3); 
	
    Script.WaitSec(.5);
    Lion = EntGame.SpawnAnimalOnPath(AID_LION_M, "BunnyPath9", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	Animal.SetAttackType(Lion, ATK_STRAFE);
	Animal.SetAutoChargeDist(Lion, 6);
	Animal.SetPostAttackRand(Lion, false);
	Animal.SetPostAttackDir(Lion, 90);	      
    Script.WaitSec(.5); 	
    EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "BunnyPath4", 0, ST_WPT_RUN, 0, 0, 0, .5);  
    EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "BunnyPath5", 0, ST_WPT_RUN, 0, 0, 0, .5); 
    Script.WaitSec(1);      	
    
    CameraFollower.SetRollOffset(entJeep, 0, 3);
    Camera.SetRollOffset(entCamera, 0, 3); 
	
    Script.WaitSec(2);   
	
 	Camera.SetPanOffset(entCamera, 0, 2);
 	
    Script.WaitSec(2);
    	
    CameraFollower.SetRollOffset(entJeep, 10, .3);
    Camera.SetRollOffset(entCamera, 15, .2);
	
    Script.WaitSec(.5);
    
    --Turn on rumble for all pads
--	EntGame.SetRumble(0, 1.0);
--	EntGame.SetRumble(1, 1.0);
--	EntGame.SetRumble(2, 1.0);
--	EntGame.SetRumble(3, 1.0);
	
    CameraFollower.SetRollOffset(entJeep, -10, .3);
    Camera.SetRollOffset(entCamera, -10, .2);
 
    Script.WaitSec(.5);
    
    CameraFollower.SetRollOffset(entJeep, 0, .3);
    Camera.SetRollOffset(entCamera, 0, .2);
    	 	     
    --Turn off rumble for all pads
--	EntGame.SetRumble(0, 0);
--	EntGame.SetRumble(1, 0);
--	EntGame.SetRumble(2, 0);
--	EntGame.SetRumble(3, 0);
	
    Script.WaitSec(2.0);
         
	--PAN Right
	Rhino1 = EntGame.SpawnAnimalOnPath(AID_ELEPHANT_M, "Path10", 0, ST_GRAZING, 15, 0, 0, 1);
	Animal.EnableFear(Rhino1, false);
	
    Camera.SetPanOffset(entCamera, 85, 0.5);
    
  	Rhino2 = EntGame.SpawnAnimalOnPath(AID_ELEPHANT_M, "Path8", 0, ST_WPT_WALK, 0, 0, 0, 1);
 	Animal.EnableFear(Rhino2, false);
 	Entity.SetName(Rhino2, "RHINO1");        
    Script.WaitSec(1);  
	Meerkat1 = EntGame.SpawnAnimalOnPath(AID_MEERKAT_M, "Path4", 0, ST_POPUP, .8, 0, 0, 1);     
    Animal.SetElvOffset(Meerkat1, 1.2); 
    Animal.SetCoinMode(Meerkat1, CM_SPAWNREL);
    Animal.FaceEntity(Meerkat1, entCamera);
    Script.WaitSec(1.0);
    
    --Jeep Ignition off	
    Sound.Play(smpJeepOff, 1, DS2_VOLMAX, DS2_CENTER);
    
    Meerkat1 = EntGame.SpawnAnimalOnPath(AID_MEERKAT_M, "Path4", 0, ST_POPUP, .5, 0, .6, 1);     
    Animal.SetElvOffset(Meerkat1, 1.2); 
    Animal.SetCoinMode(Meerkat1, CM_SPAWNREL);
    Animal.FaceEntity(Meerkat1, entCamera);
  	Script.WaitSec(1.0);  
    Meerkat1 = EntGame.SpawnAnimalOnPath(AID_MEERKAT_M, "Path4", 0, ST_POPUP, .5, 0, -.6, 1);     
    Animal.SetElvOffset(Meerkat1, 1.2);
    Animal.SetCoinMode(Meerkat1, CM_SPAWNREL); 
    Animal.FaceEntity(Meerkat1, entCamera);
    Script.WaitSec(1.0);
    		
 	Meerkat1 = EntGame.SpawnAnimalOnPath(AID_MEERKAT_M, "Path4", 0, ST_POPUP, .5, 0, 0, 1);     
    Animal.SetElvOffset(Meerkat1, 1.2); 
    Animal.SetCoinMode(Meerkat1, CM_SPAWNREL);
    Animal.FaceEntity(Meerkat1, entCamera);
    Script.WaitSec(1);  
    	
    -- Detach the Jeep from the camera.    
    entJeep = Entity.FindName(entRoot, "CameraFollower1");  
	if (entJeep) then  
	-- This says, set the camera the jeep is following to "null", which will detach it.  
		Entity.SetVoid(entJeep, "entCamera", 0);  
		end;     
   
	--This jump is NOT debug code.
    Camera.JumpToWaypoint(entCamera, "CamWptII");		
		
    Camera.SetSpeed(entCamera, 1.5, 0.001); 
    Camera.StopAtWaypoint(entCamera, "CamWptJJ");
 	Camera.SetPanOffset(entCamera, 100, .5);
 		
    Script.WaitSec(1);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "Path8", 0, ST_WPT_RUN, 0, -.5, -.5, 1.2);
    	
    --DECELLERATE	
	Camera.SetSpeed(entCamera, 1.0, 0.1);
	Script.WaitSec(.25);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "Path8", 0, ST_WPT_RUN, 0, .5, .5, 1.2);		
	Camera.SetSpeed(entCamera, .5, 0.1);
	Script.WaitSec(.25);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "Path8", 0, ST_WPT_RUN, 0, -.5, -.5, 1.2);	
	Camera.SetSpeed(entCamera, 0, 0.1);	
		
	Meerkat1 = EntGame.SpawnAnimalOnPath(AID_MEERKAT_M, "Path6", 0, ST_POPUP, .7, 0, 0, 1);     
    Animal.SetElvOffset(Meerkat1, 1.4);
    Animal.SetCoinMode(Meerkat1, CM_SPAWNREL); 
    Animal.FaceEntity(Meerkat1, entCamera);
    
    --FACING JEEP	
    Charge("RHINO1");	
    Script.WaitSec(2);
    Camera.SetPanOffset(entCamera, 0, 1.6);
 
	Rhino3 = EntGame.SpawnAnimalOnPath(AID_ELEPHANT_M, "BunnyPath7", 0, ST_WPT_RUN, 0, 0, 0, .5);
	Animal.EnableFear(Rhino3, false);
	Animal.SetAutoChargeDist(Rhino3, 10);	
	Animal.SetAttackType(Rhino3, ATK_STATIC);
	Animal.SetPostAttackRand(Rhino3, false);
	Animal.SetPostAttackDir(Rhino3, -90);
	Animal.SetAttackRepeat(Rhino3, 1);		
	Rhino4 = EntGame.SpawnAnimalOnPath(AID_ELEPHANT_M, "BunnyPath8", 0, ST_WPT_RUN, 0, 0, 0, 1);
	Animal.EnableFear(Rhino4, false);
	Animal.SetAutoChargeDist(Rhino4, 8);	
	Animal.SetAttackType(Rhino4, ATK_STATIC);
	Animal.SetPostAttackRand(Rhino4, false);
	Animal.SetPostAttackDir(Rhino4, 90);
	Animal.SetAttackRepeat(Rhino4, 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.001);
	
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path9", 0, -.5, -.5, -.5, 1.2);
    Script.WaitSec(1.5);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path9", 0, 0, 0, 0, 1.2);	
    Script.WaitSec(1.5);
	EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "BunnyPath13", 0, ST_WPT_RUN, 0, 1, 1, 1.5);
	EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "BunnyPath10", 0, ST_WPT_RUN, 0, 0, 0, 1.5);
	EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "BunnyPath12", 0, ST_WPT_RUN, 0, 0, 0, 1.5);  
	Script.WaitSec(2.0);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path9", 0, 0, 1, 0, 1.2);	
	EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "BunnyPath11", 0, ST_WPT_RUN, 0, 0, 0, 1.5);
	Script.WaitSec(1.5);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path9", 0, 0, 1.2, -1, 1.2);	
	EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "BunnyPath13", 0, ST_WPT_RUN, 0, 0, 0, 1.5);
	Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path9", 0, 0, .8, 1, 1.2);	
	Script.WaitSec(1);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath18", 0, ST_WPT_RUN, 0, 0, 0, 1.2);	
	EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "BunnyPath14", 0, ST_WPT_RUN, 0, 0, 0, 1.5);
	Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath18", 0, ST_WPT_RUN, 0, -1, -1, 1.2);
	Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath18", 0, ST_WPT_RUN, 0, -1, -1, 1.2);
	Script.WaitSec(.5);				
	EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "BunnyPath15", 0, ST_WPT_RUN, 0, 0, 0, 1.5);
	Script.WaitSec(1.5);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path9", 0, 0, 0, 0, 1.2);	
	EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "BunnyPath13", 0, ST_WPT_RUN, 0, -1, -1, 1.5);
    Script.WaitSec(1);
    EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath19", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
    Script.WaitSec(.5);
    EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath19", 0, ST_WPT_RUN, 0, .5, .5, 1.2);	
    Script.WaitSec(1.0);
    EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath19", 0, ST_WPT_RUN, 0, -.5, -.5, 1.2);
    Script.WaitSec(.5);	
	EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "BunnyPath10", 0, ST_WPT_RUN, 0, 0, 0, 1.5);
	EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "BunnyPath12", 0, ST_WPT_RUN, 0, 0, 0, 1.5);  
	Script.WaitSec(2.0);
	EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "BunnyPath11", 0, ST_WPT_RUN, 0, 0, 0, 1.5);
	EntGame.SpawnAnimalOnPath(AID_LION_M, "BunnyPath15", 0, ST_WPT_RUN, 0, 0, 0, 2.0);
	EntGame.SpawnAnimalOnPath(AID_LION_M, "BunnyPath16", 0, ST_WPT_RUN, 0, 0, 0, 2.0);
	
	Lion = EntGame.SpawnAnimalOnPath(AID_LION_M, "BunnyPath17", 0, ST_WPT_RUN, 0, 0, 0, 1.5);
	Animal.SetAutoChargeDist(Lion, 15);	
	Animal.SetAttackType(Lion, ATK_STATIC);
	Animal.SetAttackRepeat(Lion, 1);
	Animal.SetPostAttackRand(Lion, false);
	Animal.SetPostAttackDir(Lion, -90);		
	
	Script.WaitSec(1.5);
	EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "BunnyPath13", 0, ST_WPT_RUN, 0, 0, 0, 1.5);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path9", 0, 0, 0, 0, 1.2);
	Script.WaitSec(2);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath18", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	Script.WaitSec(1.5);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath18", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath18", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	Script.WaitSec(4);
    EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath19", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
    Script.WaitSec(.5);
    EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath19", 0, ST_WPT_RUN, 0, .5, .5, 1.2);	
    Script.WaitSec(1.0);
    EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath19", 0, ST_WPT_RUN, 0, -.5, -.5, 1.2);
	Script.WaitSec(1.0);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath18", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath18", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	Script.WaitSec(1.0);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath18", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	Script.WaitSec(4.0);
			                               
    end;    

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

function Part2()

	--[[ DEBUG
	Camera.JumpToWaypoint(entCamera, "CamWptJJ");
	Camera.SetPanOffset(entCamera, 0, .007);
	-- Detach the Jeep from the camera.    
    entJeep = Entity.FindName(entRoot, "CameraFollower1");  
	if (entJeep) then  
	-- This says, set the camera the jeep is following to "null", which will detach it.  
		Entity.SetVoid(entJeep, "entCamera", 0);  
		end;    
	--]]
	
	Camera.StopAtWaypoint(entCamera, "CamWptNN");
	Camera.SetSpeed(entCamera, 2.5, 0.001);
	
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path9", 0, 0, -7, 0, 1.2);
	
	EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "BunnyPath19", 0, ST_WPT_RUN, 0, 0, 0, 1.5);
	EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "BunnyPath19", 0, ST_WPT_RUN, 0, 2, 0, 1.5);
	EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "BunnyPath10", 0, ST_WPT_RUN, 0, 0, 6, 1.5);
	EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "BunnyPath10", 0, ST_WPT_RUN, 0, 0, -16, 1.5);
	Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path9", 0, -1.5, -8, -1.5, 1.2);	
	Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path9", 0, 1, -6.5, 1, 1.2);	
	Script.WaitSec(1.0);
		
	--WILDEBEEST2		
	Wildebeest2 = EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "BunnyPath10", 0, ST_WPT_RUN, 0, 0, -8, 1.5);
	Animal.FaceEntity(Wildebeest2, entCamera);
	Entity.SetName(Wildebeest2, "WILDEBEEST2");		

	EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "BunnyPath10", 0, ST_WPT_RUN, 0, 0, 0, 1.5);
	Script.WaitSec(2);
		
	--LION2
	Lion2 = EntGame.SpawnAnimalOnPath(AID_LION_M, "BunnyPath10", 0, ST_WPT_RUN, 0, 0, -8, 1.5);
	Animal.FaceEntity(Lion2, entCamera);
	Animal.SetStrafeAttackDelay(Lion2, 500.0);
	Entity.SetName(Lion2, "LION2");
	
	EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "BunnyPath11", 0, ST_WPT_RUN, 0, 0, 0, 1.5);
	Script.WaitSec(1.5);
	
	--WILDEBEEST1	
	Wildebeest1 = EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "BunnyPath11", 0, ST_WPT_RUN, 0, 0, 5.3, 1.5);
	Animal.FaceEntity(Wildebeest1, entCamera);
	Entity.SetName(Wildebeest1, "WILDEBEEST1");
		
	Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_LION_M, "BunnyPath11", 0, ST_WPT_RUN, 0, 0, 5, 1.5); 
	EntGame.SpawnAnimalOnPath(AID_LION_M, "BunnyPath11", 0, ST_WPT_RUN, 0, 0, -5, 1.3); 
	Script.WaitSec(1.5);			
	
	--LION1		
	Lion1 = EntGame.SpawnAnimalOnPath(AID_LION_M, "BunnyPath11", 0, ST_WPT_RUN, 0, 0, 3.5, 1.5);
	Animal.FaceEntity(Lion1, entCamera);
	Animal.SetStrafeAttackDelay(Lion1, 500.0);
	Entity.SetName(Lion1, "LION1");
	
	Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "BunnyPath14", 0, ST_WPT_RUN, 0, 0, 0, 1.8);	
	Script.WaitSec(1.0);
			
	--ATTACKING LION, DYING WILDEBEEST	
	attackingLion = Entity.FindName(entRoot, "LION2");
	dyingWildebeest = Entity.FindName(entRoot, "WILDEBEEST2");
	if (attackingLion and dyingWildebeest) then
	    Jump("LION2");
        end;	
			
	Script.WaitSec(.5);
		
	--WALK AFTER LION JUMPS	
	Walk2("LION2");
	
	Script.WaitSec(.5); 
	EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "BunnyPath12", 0, ST_WPT_RUN, 0, 0, 0, 1.5);
	Script.WaitSec(1.5);
	EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "BunnyPath15", 0, ST_WPT_RUN, 0, 0, 0, 1.5);
	Script.WaitSec(1.0);	
	
	--ATTACKING LION, DYING WILDEBEEST	
	attackingLion = Entity.FindName(entRoot, "LION1");
	dyingWildebeest = Entity.FindName(entRoot, "WILDEBEEST1");
	if (attackingLion and dyingWildebeest) then
	    Jump("LION1");
        end;	
        
	Script.WaitSec(.25); 
	
	attackingLion = Entity.FindName(entRoot, "LION1");
	dyingWildebeest = Entity.FindName(entRoot, "WILDEBEEST1");
	if (attackingLion and dyingWildebeest) then
	    Animal.SetCollapseType(dyingWildebeest, CT_FORWARD)    
        Animal.SetState(dyingWildebeest, ST_COLLAPSE);
        end;
        
	Script.WaitSec(.25);		
	--DELETE LION IN CASE HE CAN'T GET BACK TO WPT.	
	Gone("LION2");
	   
    Script.WaitSec(.4);
            	
	--WALK AFTER LION JUMPS		
	Walk2("LION1");
		
	EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "BunnyPath15", 0, ST_WPT_RUN, 0, 0, 0, 1.5);	
	Script.WaitSec(5);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath20", 0, ST_WPT_RUN, 0, .5, .5, 1.2);
	Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath20", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath20", 0, ST_WPT_RUN, 0, -.5, -.5, 1.2);
	Script.WaitSec(3);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath20", 0, ST_WPT_RUN, 0, .5, .5, 1.2);
	Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath20", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	
	Script.WaitSec(4);
		
    end;    

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

function Part3()

	--[[
	Camera.JumpToWaypoint(entCamera, "CamWptNN");
	Camera.SetSpeed(entCamera, 0, 0.007);
	-- Detach the Jeep from the camera.    
    entJeep = Entity.FindName(entRoot, "CameraFollower1");  
	if (entJeep) then  
	-- This says, set the camera the jeep is following to "null", which will detach it.  
		Entity.SetVoid(entJeep, "entCamera", 0);  
		end;
	--]]
		
	Lion = EntGame.SpawnAnimalOnPath(AID_LION_M, "BunnyPath21", 0, ST_WPT_RUN, 0, 0, 0, 1);
	Animal.SetAttackType(Lion, ATK_STATIC);
	Animal.SetAutoChargeDist(Lion, 10);	
	Animal.SetAttackRepeat(Lion, 1);

	Lion3 = EntGame.SpawnAnimalOnPath(AID_LION_M, "BunnyPath23", 0, ST_WPT_WALK, 0, 0, 0, 1.3);
	Animal.EnableFear(Lion3, false);
	Entity.SetName(Lion3, "LION3");
		
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath24", 0, ST_WPT_RUN, 0, .5, .5, 1.2);
	Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "Path13", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath24", 0, ST_WPT_RUN, 0, -.5, -.5, 1.2);
	Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "Path13", 0, ST_WPT_RUN, 0, 0, 0, 1.2);	
	Script.WaitSec(1.0);
	Run("LION3");	
	EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "BunnyPath24", 0, ST_WPT_RUN, 0, 0, 0, 1);
	EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "BunnyPath23", 0, ST_WPT_RUN, 0, 0, 0, 1);
	Script.WaitSec(1.0);
	EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "BunnyPath24", 0, ST_WPT_RUN, 0, 0, 0, 1);
	Script.WaitSec(1.5);
	EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "Path13", 0, ST_WPT_RUN, 0, 0, 0, 1);
	EntGame.SpawnAnimalOnPath(AID_LION_M, "BunnyPath22", 0, ST_WPT_RUN, 0, 0, -2, 1);
	Script.WaitSec(2);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath22", 0, ST_WPT_RUN, 0, .5, .5, 1.2);
	Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath21", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath22", 0, ST_WPT_RUN, 0, -.5, -.5, 1.2);
	Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath23", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "BunnyPath21", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	Script.WaitSec(2);
	EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "Path14", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "BunnyPath22", 0, ST_WPT_RUN, 0, 0, 0, 1.2);	
	Script.WaitSec(2);
	EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "Path14", 0, ST_WPT_RUN, 0, 0, 0, 1.2);	
	Lion = EntGame.SpawnAnimalOnPath(AID_LION_M, "BunnyPath21", 0, ST_WPT_RUN, 0, 0, -2, .8);
	Animal.SetAttackType(Lion, ATK_STRAFE);
	Animal.SetAutoChargeDist(Lion, 15);	
	Animal.SetAttackRepeat(Lion, 1);
	
	Script.WaitSec(7);	
		
	Camera.StopAtWaypoint(entCamera, "CamWptYY");	
	Camera.SetSpeed(entCamera, 1.5, 0.01);
	
	Elephant = EntGame.SpawnAnimalOnPath(AID_ELEPHANT_M, "Path17", 0, ST_WPT_WALK, 0, -2, 2, .2);
	Animal.EnableFear(Elephant, false);	
	Script.WaitSec(1.5);	
	EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "BunnyPath25", 0, ST_WPT_RUN, 0, 0, 0, 1);
	Script.WaitSec(1.5);
	Elephant = EntGame.SpawnAnimalOnPath(AID_ELEPHANT_M, "Path15", 0, ST_WPT_WALK, 0, 0, 0, .5);
	Animal.EnableFear(Elephant, false);		
	EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "BunnyPath25", 0, ST_WPT_RUN, 0, 0, -1.5, 1);
	Script.WaitSec(1);
	Elephant = EntGame.SpawnAnimalOnPath(AID_ELEPHANT_M, "Path15", 0, ST_WPT_WALK, 0, -2, 2, .5);
	Animal.EnableFear(Elephant, false);			
	EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "BunnyPath25", 0, ST_WPT_RUN, 0, 0, 0, 1);
	Script.WaitSec(1);
	EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "BunnyPath26", 0, ST_WPT_RUN, 0, 0, 0, 1);	
	Elephant = EntGame.SpawnAnimalOnPath(AID_ELEPHANT_M, "Path16", 0, ST_WPT_WALK, 0, -2, 2, .3);
	Animal.EnableFear(Elephant, false);	
	Script.WaitSec(2);
	EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "BunnyPath27", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "BunnyPath26", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	Script.WaitSec(1);
	EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "BunnyPath27", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	Script.WaitSec(1);
	EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "BunnyPath26", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	Script.WaitSec(1.5);
	EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "BunnyPath27", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "BunnyPath26", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	Script.WaitSec(3);
	Lion = EntGame.SpawnAnimalOnPath(AID_LION_M, "Path18", 0, ST_GRAZING, 20, 0, 1, 1.2);
	Animal.EnableFear(Lion, false);
	Animal.FaceEntity(Lion, entCamera);
	Entity.SetName(Lion, "LION4");	
			
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath28", 0, ST_WPT_RUN, 0, 0, 1, 1.2);
	Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath28", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath28", 0, ST_WPT_RUN, 0, 0, -1, 1.2);
	Script.WaitSec(2);
	EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "BunnyPath28", 0, ST_WPT_RUN, 0, 0, 0, 1.5);
	Lion = EntGame.SpawnAnimalOnPath(AID_LION_M, "BunnyPath29", 0, ST_WPT_WALK, 0, 0, 0, 1.2);
	Animal.EnableFear(Lion, false);
	Animal.SetChargeWhenShot(Lion, true);
	Animal.SetAttackType(Lion, ATK_STRAFE);	
	Lion3 = EntGame.SpawnAnimalOnPath(AID_LION_M, "BunnyPath30", 0, ST_WPT_WALK, 0, 0, 0, 1.2);
	Animal.EnableFear(Lion3, false);	
	Entity.SetName(Lion3, "LION6");	
	Script.WaitSec(1);
	EntGame.SpawnAnimalOnPath(AID_LION_M, "BunnyPath28", 0, ST_WPT_RUN, 0, 0, 0, 1.5);	
	Script.WaitSec(1);
	Lion2 = EntGame.SpawnAnimalOnPath(AID_LION_M, "Path19", 0, ST_WPT_WALK, 0, 0, 0, 1.5);
	Animal.EnableFear(Lion2, false);
	Script.WaitSec(1);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath29", 0, ST_WPT_RUN, 0, 0, 1, 1.2);
	Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath29", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath29", 0, ST_WPT_RUN, 0, 0, -1, 1.2);		
	Script.WaitSec(4);
	Angry("LION4");
	Script.WaitSec(1);
	Graze2("LION5");	
	Script.WaitSec(3);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "Path19", 0, ST_WPT_RUN, 0, 0, 1, 1.2);
	Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "Path19", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "Path19", 0, ST_WPT_RUN, 0, 0, -1, 1.2);		
	Script.WaitSec(1);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "Path19", 0, ST_WPT_RUN, 0, 0, 1, 1.2);
	Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "Path19", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "Path19", 0, ST_WPT_RUN, 0, 0, -1, 1.2);
	Script.WaitSec(2.5);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath30", 0, ST_WPT_RUN, 0, 0, 1, 1.0);
	Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath30", 0, ST_WPT_RUN, 0, 0, 0, 1.0);
	Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath30", 0, ST_WPT_RUN, 0, 0, -1, 1.0);
	Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path20", 0, 0, 0, 0, 1.2);
	Script.WaitSec(1.0);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path20", 0, 1, 1, 0, 1.2);	
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path20", 0, 1, 1, 0, 1.2);
	Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path20", 0, -1, -1.5, 0, 1.2);	
	EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "BunnyPath31", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	Script.WaitSec(1);
	EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "BunnyPath31", 0, ST_WPT_RUN, 0, 0, 0, 1.2);	
	EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "BunnyPath32", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	Script.WaitSec(1);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path20", 0, 0, 0, 0, 1.2);	
	EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "BunnyPath32", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	
	--Attacking Lion	
	a = EntGame.SpawnAnimalOnPath(AID_LION_M, "BunnyPath33", 0, ST_WPT_RUN, 0, 0, 0, .7);
	Animal.SetAutoChargeDist(a, 15);	
	Animal.SetAttackType(a, ATK_STRAFE);
	Animal.SetStrafeAttackDist(a, 7);
	Animal.SetPostAttackRand(a, false);
	Animal.SetPostAttackDir(a, 90);

	Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path20", 0, 1, 1, 0, 1.2);	
	EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "BunnyPath31", 0, ST_WPT_RUN, 0, 0, 0, 1.2);		
	Script.WaitSec(.5);	
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path20", 0, -1, -1.5, 0, 1.2);	
	Script.WaitSec(1.0);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath34", 0, ST_WPT_RUN, 0, 0, 1, 1.2);	
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path20", 0, 0, 0, 0, 1.2);	
	EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "BunnyPath32", 0, ST_WPT_RUN, 0, 0, 0, 1.2);	
	Script.WaitSec(1.0);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath34", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "BunnyPath31", 0, ST_WPT_RUN, 0, 0, 0, 1.2);		
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path20", 0, -1, -1.5, 0, 1.2);
	Script.WaitSec(1.0);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath34", 0, ST_WPT_RUN, 0, 0, -1, 1.2);		
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path20", 0, 1, 1, 0, 1.2);
	EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "BunnyPath32", 0, ST_WPT_RUN, 0, 0, 0, 1.2);		
	Script.WaitSec(3.0);
	
	--ACCELERATION
	Camera.SetSpeed(entCamera, 2.0, 0.01);
	Script.WaitSec(.25);
	Camera.SetSpeed(entCamera, 2.5, 0.01);	
	Script.WaitSec(.25);
	Camera.SetSpeed(entCamera, 3.0, 0.01);
	Script.WaitSec(.25);
	Camera.SetSpeed(entCamera, 3.5, 0.01);	
	Script.WaitSec(.25);
	Camera.SetSpeed(entCamera, 4.0, 0.001);		
	--ARRIVED AT TRAVEL SPEED
	
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path21", 0, 0, -1, 0, 1.2);
	Script.WaitSec(1);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path21", 0, 1, 0, 0, 1.2);
	Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path21", 0, 0, -1.5, 0, 1.2);
	Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path21", 0, 0, 2, 0, 1.2);
	Script.WaitSec(1);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path21", 0, -1, 0, 0, 1.2);
	Script.WaitSec(1);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path21", 0, 0, 1, 0, 1.2);
	Script.WaitSec(1);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path21", 0, 0, 0, 0, 1.2);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path22", 0, 0, 0, 0, 1.2);	
	Meerkat = EntGame.SpawnAnimalOnPath(AID_MEERKAT_M, "LongerPath1", 0, ST_POPUP, 1.5, 0, 0, 1);     
    Animal.SetElvOffset(Meerkat, .1); 
    Animal.FaceEntity(Meerkat, entCamera); 
	Script.WaitSec(1);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path22", 0, 0, -1, 0, 1.2);	
	Meerkat = EntGame.SpawnAnimalOnPath(AID_MEERKAT_M, "LongerPath1", 1, ST_POPUP, 1.5, 0, 0, 1);     
    Animal.SetElvOffset(Meerkat, .2); 
    Animal.SetCoinMode(Meerkat, CM_SPAWNREL);
    Animal.FaceEntity(Meerkat, entCamera);
    Script.WaitSec(.5);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path22", 0, 0, 2, 0, 1.2);
    Script.WaitSec(.5);	
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path22", 0, 0, -1, 0, 1.2);    
    Script.WaitSec(1);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path22", 0, -1, -1.5, 2, 1.2);	
	Meerkat = EntGame.SpawnAnimalOnPath(AID_MEERKAT_M, "LongerPath1", 2, ST_POPUP, 1, 0, 0, 1);     
    Animal.SetElvOffset(Meerkat, .2);
    Animal.SetCoinMode(Meerkat, CM_SPAWNREL); 
    Animal.FaceEntity(Meerkat, entCamera);
    Script.WaitSec(.5);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path22", 0, 0, 2.5, 0, 1.2);
    Script.WaitSec(.5);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path22", 0, 0, 1, 0, 1.2);
    Script.WaitSec(.5);	
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path22", 0, 0, -1.5, 0, 1.2);	
    Script.WaitSec(1.5);
	Meerkat = EntGame.SpawnAnimalOnPath(AID_MEERKAT_M, "LongerPath1", 3, ST_POPUP, 1, 0, 0, 1);     
    Animal.SetElvOffset(Meerkat, .1); 
    Animal.FaceEntity(Meerkat, entCamera);
    Script.WaitSec(2);
	Meerkat = EntGame.SpawnAnimalOnPath(AID_MEERKAT_M, "LongerPath1", 4, ST_POPUP, 1, 0, 0, 1);     
    Animal.SetElvOffset(Meerkat, .1); 
    Animal.FaceEntity(Meerkat, entCamera);        
    
	Elephant1 = EntGame.SpawnAnimalOnPath(AID_ELEPHANT_M, "BunnyPath41", 0, ST_WPT_RUN, 0, 0, 0, 1.0);	
	Animal.SetChargeWhenShot(Elephant1, true);
	Animal.SetAttackType(Elephant1, ATK_STATIC);
	Animal.SetAttackRepeat(Elephant1, 1);
	Animal.SetPostAttackDir(Elephant1, 90);
	
	Script.WaitSec(1);
	
    end;      
    
-----------------------------------------------------------------------------

function Part4()

--[[
	Camera.JumpToWaypoint(entCamera, "CamWptYY");
	Camera.SetSpeed(entCamera, 0, 0.007);
	-- Detach the Jeep from the camera.    
    entJeep = Entity.FindName(entRoot, "CameraFollower1");  
	if (entJeep) then  
	-- This says, set the camera the jeep is following to "null", which will detach it.  
		Entity.SetVoid(entJeep, "entCamera", 0);  
		end;	
--]]
		
	EntGame.SpawnAnimalOnPath(AID_ELEPHANT_M, "BunnyPath40", 0, ST_WPT_RUN, 0, 0, 0, 1.0); 
	EntGame.SpawnAnimalOnPath(AID_ELEPHANT_M, "BunnyPath42", 0, ST_WPT_RUN, 0, 0, 0, 1.0);
	EntGame.SpawnAnimalOnPath(AID_ELEPHANT_M, "BunnyPath38", 0, ST_WPT_RUN, 0, 0, 0, 1.0);
	Script.WaitSec(2.5);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath43", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath43", 0, ST_WPT_RUN, 0, 0, .5, 1.2);
	Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath43", 0, ST_WPT_RUN, 0, 0, -.5, 1.2);
	
	--CHANGED FROM RHINO TO LION
	EntGame.SpawnAnimalOnPath(AID_LION_M, "BunnyPath40", 0, ST_WPT_RUN, 0, 0, 0, 1.0);
	
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "BunnyPath36", 0, 0, 0, 0, 1.2);
	Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "BunnyPath35", 0, 0, 0, 0, 1.2);		
	EntGame.SpawnAnimalOnPath(AID_ELEPHANT_M, "BunnyPath42", 0, ST_WPT_RUN, 0, 0, 0, 1.0); 
	Script.WaitSec(1.0);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "BunnyPath36", 0, 0, 0, 0, 1.2);	
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath43", 0, ST_WPT_RUN, 0, 0, .5, 1.2);	
	Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "BunnyPath35", 0, 0, 0, 0, 1.2);	
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath43", 0, ST_WPT_RUN, 0, 0, .5, 1.2);
	
	Elephant2 = EntGame.SpawnAnimalOnPath(AID_ELEPHANT_M, "BunnyPath39", 0, ST_WPT_RUN, 0, 0, 0, 1.0);
	Animal.SetAttackType(Elephant2, ATK_STRAFE);
	Animal.SetAutoChargeDist(Elephant2, 10);
	Animal.SetAttackRepeat(Elephant2, 1);
	Animal.SetPostAttackRand(Elephant2, false);
	Animal.SetPostAttackDir(Elephant2, -90); 	
	
    Script.WaitSec(.5);
 	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "BunnyPath36", 0, 0, 0, 0, 1.2);   
    Script.WaitSec(.5);	
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "BunnyPath37", 0, 0, 0, 0, 1.2);		
	Script.WaitSec(2.5);		
	EntGame.SpawnAnimalOnPath(AID_ELEPHANT_M, "BunnyPath43", 0, ST_WPT_RUN, 0, 0, 0, 1.0);
	Script.WaitSec(2.5);
		
	Elephant3 = EntGame.SpawnAnimalOnPath(AID_ELEPHANT_M, "BunnyPath41", 0, ST_WPT_RUN, 0, 0, 0, 1.0);
	Animal.SetChargeWhenShot(Elephant3, true);
	Animal.SetAttackType(Elephant3, ATK_STATIC);
	Animal.SetAttackRepeat(Elephant3, 1);
	Animal.SetPostAttackRand(Elephant3, false);
	Animal.SetPostAttackDir(Elephant3, -90);	
	
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "BunnyPath35", 0, 0, 0, 0, 1.2);
    Script.WaitSec(1.0);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "BunnyPath37", 0, 0, 0, 0, 1.2);		
	Script.WaitSec(1.0);
		
	Elephant4 = EntGame.SpawnAnimalOnPath(AID_ELEPHANT_M, "BunnyPath39", 0, ST_WPT_RUN, 0, 0, 0, 1.0);
	Animal.SetAttackType(Elephant4, ATK_STRAFE);
	Animal.SetAutoChargeDist(Elephant4, 10);
	Animal.SetAttackRepeat(Elephant4, 1);
	Animal.SetPostAttackRand(Elephant4, false);
	Animal.SetPostAttackDir(Elephant4, -90);	
	
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "BunnyPath35", 0, 0, 0, 0, 1.2);
    Script.WaitSec(.5);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "BunnyPath36", 0, 0, 0, 0, 1.2);
    Script.WaitSec(.5);	
    	
	Leopard = EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "LongerPath2", 0, ST_WPT_RUN, 0, 0, 0, 1.0);
	Animal.SetAttackType(Leopard, ATK_STRAFE);
	Animal.SetAutoChargeDist(Leopard, 15);	
	
	Script.WaitSec(1.5);
		
	Lion = EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "LongerPath3", 0, ST_WPT_RUN, 0, 0, 0, 1.0);
	Animal.SetAttackType(Lion, ATK_STRAFE);
	Animal.SetAutoChargeDist(Lion, 15);
	
	Script.WaitSec(1.5);
		
	EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "BunnyPath39", 0, ST_WPT_RUN, 0, 0, 0, 1.0);
	
	Script.WaitSec(2.0);	
		
	Leopard = EntGame.SpawnAnimalOnPath(AID_LION_M, "LongerPath4", 0, ST_WPT_RUN, 0, 0, 0, 1.0);
	Animal.SetAttackType(Leopard, ATK_STRAFE);
	Animal.SetAutoChargeDist(Leopard, 15);	
		
	EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "BunnyPath40", 0, ST_WPT_RUN, 0, 0, 0, 1.0);
	EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "BunnyPath42", 0, ST_WPT_RUN, 0, 0, 0, 1.0);
	Script.WaitSec(1.0);			
	Script.WaitSec(1.5);							
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "BunnyPath36", 0, 0, 0, 0, 1.2);
    Script.WaitSec(.5);	
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "BunnyPath37", 0, 0, 0, 0, 1.2);	
    Script.WaitSec(2.0);	
    EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "BunnyPath41", 0, ST_WPT_RUN, 0, 0, 0, .5);		
	Script.WaitSec(3);	
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath43", 0, ST_WPT_RUN, 0, 0, 0, 1.2);	
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "BunnyPath36", 0, 0, 0, 0, 1.2);	
	Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "BunnyPath36", 0, 0, 0, 0, 1.2);	
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath43", 0, ST_WPT_RUN, 0, 0, 0, 1.2);	
	Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath43", 0, ST_WPT_RUN, 0, 0, 0, 1.2);

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