-----------------------------------------------------------------------------
-- Stage 3-1
-----------------------------------------------------------------------------

function PostStage()

    EntGame.EnablePlayerControl(false);
    EntGame.ClearFlag(GF_READYTOSTART);
    EntGame.BindCameraToEntity("IntroCamera");
  
    Sound.Release(smpRain);
    Sound.Release(smpBridge1);
    Sound.Release(smpBridge2);
    Sound.Release(smpBridge3);
        
    EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "LongerPath11", 0, ST_GRAZING, 20000, 0, 0, 1.5);
    EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "LongerPath11", 1, ST_GRAZING, 20000, 0, 0, 1.5);
    EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "LongerPath11", 2, ST_GRAZING, 20000, 0, 0, 1.5);
    EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "LongerPath11", 3, ST_GRAZING, 20000, 0, 0, 1.5);
           
    end;    
    
-----------------------------------------------------------------------------    
-- Setup

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

    -- load world
    SetupWorld("Maps\\WorldForestVillage\\ForestVillageCommon.ini", "Maps\\Stage3-1\\Stage3-1.ini","","");
    EntGame.CreatePlayerEntities();
    
    EntGame.SetGlobalDustColorInitial(1.0, 0.61, .58, .45);
    EntGame.SetGlobalDustColorFinal  (0.0, 0.61, .58, .45);

    EntGame.SetStageTimer(240);
    
    -- load sounds
    smpRain		 = Sound.Load("Sound\\Environment/MidAfternoonRainJO-E.wav");
    smpBridge1	 = Sound.Load("Sound\\Environment/CreakyDoor2-E.wav");
    smpBridge2	 = Sound.Load("Sound\\Environment/WoodBridge2.wav");
    smpBridge3	 = Sound.Load("Sound\\Environment/WoodBridge3.wav");
    
    EntGame.LoadAnimal(AID_HIPPO_M);
	EntGame.LoadAnimal(AID_LEOPARD_M);	
	EntGame.LoadAnimal(AID_KUDU_M);
	EntGame.LoadAnimal(AID_KUDU_F);
	EntGame.LoadAnimal(AID_MEERKAT_M);
	EntGame.LoadAnimal(AID_SPURWINGGOOSE_M);
	
    animala=EntGame.SpawnAnimalOnPath(AID_KUDU_M, "LongerPath11", 0, ST_GRAZING, 20000, 0, 0, 1.5);
    animalb=EntGame.SpawnAnimalOnPath(AID_KUDU_F, "LongerPath11", 1, ST_GRAZING, 20000, 0, 0, 1.5);
    animalc=EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "LongerPath11", 2, ST_GRAZING, 20000, 0, 0, 1.5);
    animald=EntGame.SpawnAnimalOnPath(AID_KUDU_M, "LongerPath11", 3, ST_GRAZING, 20000, 0, 0, 1.5);
    
 	StartupSequence("Music\\Moteff.ogg");

	EntGame.DestroyAllAnimals();
	

--S
--[[ S        
    Animal.SetState(animala, ST_GONE);
    Animal.SetState(animalb, ST_GONE);
    Animal.SetState(animalc, ST_GONE);
    Animal.SetState(animald, ST_GONE);
S ]]--    
    end;

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

	Camera.JumpToWaypoint(entCamera, "CamWptAA");
    Camera.SetSpeed(entCamera, 0.0, 0.1); 

    EntGame.SpawnAnimalOnPath(AID_MEERKAT_M, "Path1", 0, ST_WPT_RUN, 0, 0, 0, 1.5); 
    EntGame.SpawnAnimalOnPath(AID_MEERKAT_M, "Path2", 0, ST_WPT_RUN, 0, 0, 0, 3.5);
    a=EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "Path3", 0, ST_WPT_WALK, 20, 0, 0, 1);    
	Animal.EnableFear(a, false);		
	a=EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "Path1", 0, ST_WPT_WALK, 20, 0, 0, 1);    
	Animal.EnableFear(a, false);	
	      
	Script.WaitSec(1.5);
	EntGame.SpawnAnimalOnPath(AID_MEERKAT_M, "Path2", 0, ST_WPT_RUN, 0, 0, 0, 3.5);
    Script.WaitSec(3.5);
    	
    b=EntGame.SpawnAnimalOnPath(AID_MEERKAT_M, "Path10", 0, ST_POPUP, 4, 0, 0, 1);      
    Animal.FaceEntity(b, entCamera);
    Script.WaitSec(2);
    EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "Path2", 0, ST_WPT_RUN, 20, 0, 0, 1.4);
    Script.WaitSec(3); 	
    EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "Path2", 0, ST_WPT_RUN, 20, 0, 0, 1.4);

    Script.WaitSec(2);
    EntGame.SpawnAnimalOnPath(AID_MEERKAT_M, "Path2", 0, ST_WPT_RUN, 0, 0, 0, 3.5);
    EntGame.SpawnAnimalOnPath(AID_MEERKAT_M, "Path1", 0, ST_WPT_RUN, 0, 0, 0, 2.5); 
    Script.WaitSec(.5);
    EntGame.SpawnAnimalOnPath(AID_MEERKAT_M, "Path1", 0, ST_WPT_RUN, 0, 0, 0, 2.5); 
    Script.WaitSec(2.5);    
    b=EntGame.SpawnAnimalOnPath(AID_MEERKAT_M, "Path9", 0, ST_POPUP, 4, 0, 0, 1);      
    Animal.FaceEntity(b, entCamera);
    c=EntGame.SpawnAnimalOnPath(AID_KUDU_M, "Path4", 0, ST_WPT_WALK, 0, 0, 0, 1.4);
	Animal.EnableFear(c, false);
	Entity.SetName(c, "Kudu1");
    d=EntGame.SpawnAnimalOnPath(AID_KUDU_M, "Path5", 0, ST_WPT_WALK, 0, 0, 0, 1.0);
	Animal.EnableFear(d, false);
	Entity.SetName(d, "Kudu2");
    d=EntGame.SpawnAnimalOnPath(AID_KUDU_M, "Path6", 0, ST_GRAZING, 8, 0, 0, 1);
	Animal.EnableFear(d, false);		
	        	    	
    Camera.SetSpeed(entCamera, 3.0, 0.1); 
    Camera.StopAtWaypoint(entCamera, "CamWptCC");
    
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path19", 0, 0, 0, 0, 1.0);
    Script.WaitSec(1); 	
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path19", 0, 6, 2.5, 0, 1.3);
    
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path18", 0, .5, 1, 4, 1.2);  
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path18", 0, 0, 1.7, 0, .8);
	Script.WaitSec(2);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path18", 0, 0, 4.5, 0, 1.0);
    Script.WaitSec(2);	
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path18", 0, .5, 1, 4, 1.2);  
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path18", 0, 0, 1.7, 0, .8);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path19", 0, 0, 0, 0, 1.0);
	Script.WaitSec(2);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path18", 0, 0, 4.5, 0, 1.0);
    Script.WaitSec(1);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path19", 0, 0, 0, 0, 1.0);	
    Script.WaitSec(1.5);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path19", 0, 6, 2.5, 0, 1.3);	
    
    Script.WaitSec(3.5); --SHOOT TIME
    
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path18", 0, .5, 1, 4, 1.2);  
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path18", 0, 0, 1.7, 0, .8);
	             	    		  
    end;    

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

function Part2()

	Camera.SetSpeed(entCamera, 2.0, 0.1); 
	Camera.StopAtWaypoint(entCamera, "CamWptEE");
	
    b=EntGame.SpawnAnimalOnPath(AID_KUDU_F, "LongPath1", 0, ST_WPT_WALK, 0, 0, 0, 1.2);
 	Animal.EnableFear(b, false);	
 	    
    Script.WaitSec(4); --Travel Time to EE	
    
    --Bridge Sound    
	Sound.Play(smpBridge2, 1, 1, DS2_CENTER);	
    
	Script.WaitSec(1.5);

	--Bridge Sound    
	Sound.Play(smpBridge3, 1, 1, DS2_CENTER);
	
	Script.WaitSec(.5);
				
    -- pan left and shoot some more
    Camera.SetPanOffset(entCamera, -90, 1);
	Camera.SetTiltOffset(entCamera, -40, 1);
    a = EntGame.SpawnAnimalOnPath(AID_HIPPO_M, "Path7", 0, ST_WPT_WALK, 0, 0, 4, .8);
    Animal.SetCoinOffset(a, 1.5);
    a = EntGame.SpawnAnimalOnPath(AID_HIPPO_M, "Path7", 0, ST_WPT_WALK, 0, 2, 2, 1);
    Animal.SetCoinOffset(a, 1.5);
    a = EntGame.SpawnAnimalOnPath(AID_HIPPO_M, "Path7", 0, ST_WPT_WALK, 0, -3, -3, .7); 
    Animal.SetCoinOffset(a, 1.5);           
    b=EntGame.SpawnAnimalOnPath(AID_KUDU_M, "LongPath1", 0, ST_WPT_WALK, 0, 0, 0, 1.0);
 	Animal.EnableFear(b, false);
    c=EntGame.SpawnAnimalOnPath(AID_KUDU_M, "LongPath1", 0, ST_WPT_WALK, 0, 4, 4, 1.0);
 	Animal.EnableFear(c, false); 		    
    	
 	Script.WaitSec(2);
    	
    --Bridge Sound    
	Sound.Play(smpBridge2, 1, 1, DS2_CENTER);	
    	
	Script.WaitSec(4);
	
	Camera.SetTiltOffset(entCamera, 0, 1.5);
	Gone("Kudu1");
	Gone("Kudu2");
	
	Script.WaitSec(4.5);	
		
    Camera.SetSpeed(entCamera, 3.0, 0.1); 
    Camera.StopAtWaypoint(entCamera, "CamWptGG");
    Camera.SetPanOffset(entCamera, 0, 1.5);
    Camera.SetTiltOffset(entCamera, -15, 1.5);
    
    EntGame.SpawnAnimalOnPath(AID_KUDU_M, "Path4", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
    EntGame.SpawnAnimalOnPath(AID_KUDU_M, "Path5", 0, ST_WPT_RUN, 0, 0, 0, .8); 
          
    Script.WaitSec(1.5);
    
    --Bridge Sound    
	Sound.Play(smpBridge1, 1, .8, DS2_CENTER);
	
	Script.WaitSec(1.5);
	
	--Bridge Sound    
	Sound.Play(smpBridge2, 1, 1, DS2_CENTER);
		
    EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "Path4", 0, ST_WPT_RUN, 0, 0, 0, 1.0);
    EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "Path5", 0, ST_WPT_RUN, 0, 0, 0, .6);
 
    a=EntGame.SpawnAnimalOnPath(AID_KUDU_M, "LongerPath1", 0, ST_WPT_WALK, 0, 0, 0, 1);
    Animal.EnableFear(a, false);
    Entity.SetName(a, "Kudu3"); 
    
    Script.WaitSec(1.5);
    EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "Path4", 0, ST_WPT_RUN, 0, 2, 0, 1.0);
    
    --EXTRA ADDED
    EntGame.SpawnAnimalOnPath(AID_KUDU_F, "LongerPath1", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
    EntGame.SpawnAnimalOnPath(AID_KUDU_M, "Path12", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
       
    Script.WaitSec(3.5);
     
    --EXTRA ADDED
    a = EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "Path6", 0, ST_WPT_RUN, 0, 2, 0, 1.0);
    Animal.FaceEntity(a, entCamera);
           
	Camera.SetTiltOffset(entCamera, 0, 1.5);         
    EntGame.SpawnAnimalOnPath(AID_KUDU_M, "LongerPath1", 0, ST_WPT_RUN, 0, 0, 0, 1.7);
    a=EntGame.SpawnAnimalOnPath(AID_KUDU_M, "Path12", 0, ST_WPT_WALK, 0, 0, 0, 1);
    Animal.EnableFear(a, false);
    Entity.SetName(a, "Kudu4");
    
    --EXTRA ADDED
    EntGame.SpawnAnimalOnPath(AID_KUDU_M, "LongerPath1", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
    EntGame.SpawnAnimalOnPath(AID_KUDU_F, "Path12", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
    
    Script.WaitSec(4.0) 
    EntGame.SpawnAnimalOnPath(AID_KUDU_M, "LongPath2", 0, ST_WPT_RUN, 0, 0, 0, 1.2);              	

    --EXTRA ADDED
    EntGame.SpawnAnimalOnPath(AID_KUDU_F, "LongerPath1", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
    EntGame.SpawnAnimalOnPath(AID_KUDU_M, "Path12", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
    
    Script.WaitSec(3);
    EntGame.SpawnAnimalOnPath(AID_KUDU_M, "Path6", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
    Script.WaitSec(4);
    EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "LongerPath1", 0, ST_WPT_RUN, 0, 0, 0, 1.8); 	
	EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "LongPath2", 0, ST_WPT_RUN, 0, 0, 0, 1.5);
    Script.WaitSec(3);
    
    Run("Kudu4");
    Script.WaitSec(2);
    a=EntGame.SpawnAnimalOnPath(AID_KUDU_M, "Path14", 0, ST_WPT_WALK, 0, 0, 0, 1.2);
    Animal.EnableFear(a, false);
    EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "LongerPath1", 0, ST_WPT_RUN, 0, 0, 0, 1.8); 	
    EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "LongPath2", 0, ST_WPT_RUN, 0, 0, 0, 1.5);
    EntGame.SpawnAnimalOnPath(AID_MEERKAT_M, "LongPath2", 0, ST_WPT_RUN, 0, 0, 0, 1.2);   
    Script.WaitSec(3);
    Run("Kudu3");	    
    Camera.SetSpeed(entCamera, 1.5, 0.1); 
	Camera.StopAtWaypoint(entCamera, "CamWptHH");
      
    Script.WaitSec(5); --Travel Time to HH (15 seconds)
    	
	a=EntGame.SpawnAnimalOnPath(AID_KUDU_M, "Path13", 0, ST_WPT_WALK, 0, 0, 0, 1.8);
	Animal.EnableFear(a, false);
	Entity.SetName(a, "Kudu6");
    a=EntGame.SpawnAnimalOnPath(AID_KUDU_F, "Path17", 0, ST_WPT_WALK, 0, 0, 0, 1.8);
    Animal.EnableFear(a, false);
    Entity.SetName(a, "Kudu5");
    a=EntGame.SpawnAnimalOnPath(AID_KUDU_M, "Path17", 0, ST_WPT_WALK, 0, -2, 3, 1.8);
    Animal.EnableFear(a, false);
    Entity.SetName(a, "KuduA1");
    a=EntGame.SpawnAnimalOnPath(AID_KUDU_F, "Path13", 0, ST_WPT_WALK, 0, 4, 4, 1.8);
    Animal.EnableFear(a, false);
    Entity.SetName(a, "KuduA2");
    
    Script.WaitSec(2);
    
    -- PAN RIGHT
    Camera.SetPanOffset(entCamera, 95, 1.5);     	
    Script.WaitSec(6);
    
    -- PAN LEFT 
    Camera.SetPanOffset(entCamera, 0, 1.5);   
      	
    Script.WaitSec(2);
    EntGame.SpawnAnimalOnPath(AID_KUDU_M, "LongPath3", 0, ST_WPT_RUN, 0, 0, 0, 1.8);
    Script.WaitSec(1.5);
    EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "LongPath3", 0, ST_WPT_RUN, 0, -2, 0, 1.2);
    Script.WaitSec(1.5);
    
    Gone("Kudu6");
    Gone("Kudu5");  
    Gone("KuduA1"); 
    Gone("KuduA2");  	
    
 	EntGame.SpawnAnimalOnPath(AID_KUDU_F, "LongPath3", 0, ST_WPT_RUN, 0, -1.5, 0, 1.8);
 	Script.WaitSec(1.5);
 	EntGame.SpawnAnimalOnPath(AID_KUDU_M, "LongPath3", 0, ST_WPT_RUN, 0, 0, 0, 1.3);
	a=EntGame.SpawnAnimalOnPath(AID_KUDU_M, "Path15", 0, ST_WPT_WALK, 0, 0, 0, 1.2);
	Animal.EnableFear(a, false);
	Entity.SetName(a, "Kudu7"); 	
 	Script.WaitSec(1.0);
 	EntGame.SpawnAnimalOnPath(AID_KUDU_F, "LongPath3", 0, ST_WPT_RUN, 0, 0, 0, 1.5);   
    Script.WaitSec(2.5); --SHOOT TIME   
                 	    		  
    end;    

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

function Part3()
  
	Camera.SetSpeed(entCamera, 1.5, 0.1); 
	Camera.StopAtWaypoint(entCamera, "CamWptII");

	a=EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "Path16", 0, ST_WPT_WALK, 0, 0, 0, 1.5);
	Animal.EnableFear(a, false);
	Entity.SetName(a, "Kudu8");
	   
    Script.WaitSec(5); --Travel Time to II (14 seconds)
    Run("Kudu7");	
	EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "Path13", 0, ST_WPT_RUN, 0, 0, 0, 2.0);
	Script.WaitSec(2);
	EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "Path13", 0, ST_WPT_RUN, 0, 0, 0, 2.0);
	Script.WaitSec(2);
	a=EntGame.SpawnAnimalOnPath(AID_KUDU_M, "Path22", 0, ST_WPT_WALK, 0, 0, 0, 1.8);
	Animal.EnableFear(a, false);
	a=EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "Path23", 0, ST_WPT_WALK, 0, 0, 0, 1.2);
	Animal.EnableFear(a, false);	
	EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "Path16", 0, ST_WPT_RUN, 0, 0, 0, 2.3);
	Script.WaitSec(3);
	EntGame.SpawnAnimalOnPath(AID_KUDU_F, "Path13", 0, ST_WPT_RUN, 0, 0, .5, 2.0);
	Script.WaitSec(1.5);
	EntGame.SpawnAnimalOnPath(AID_KUDU_M, "Path13", 0, ST_WPT_RUN, 0, 0, -.5, 2.0);
	Script.WaitSec(2);	
	EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "Path13", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	Script.WaitSec(1.5);
			    	
    Run("Kudu8");
    Script.WaitSec(5); --SHOOT TIME
    
    --Tilt Upward
    Camera.SetTiltOffset(entCamera, 45, 1.5);
    
    Script.WaitSec(1);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path20", 0, 0, 3, 0, .1);
    Script.WaitSec(1.5);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path20", 0, 4.5, 4, 4.5, .2);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path20", 0, -4.5, 3.5, -4.5, .1);
    Script.WaitSec(1.0);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path20", 0, 0, 3, 0, .1);
    Script.WaitSec(1.5);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path20", 0, 3.5, 3, 3.5, .2);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path20", 0, -3.5, 3, -3.5, .1);
    Script.WaitSec(2);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path20", 0, 0, 3, 0, .1);
    Script.WaitSec(1.5);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path20", 0, 4.5, 4, 4.5, .2);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path20", 0, -4.5, 3, -4.5, .1);
    Script.WaitSec(2.0);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path20", 0, 0, 4, 0, .1);  
    Script.WaitSec(1.5);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path20", 0, 3.5, 3, 3.5, .2);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path20", 0, -3.5, 3, -3.5, .1);      
    Script.WaitSec(4);
    	
    Camera.SetTiltOffset(entCamera, 0, 1.0);	
    Camera.SetSpeed(entCamera, 2.0, 0.1); 
    Camera.StopAtWaypoint(entCamera, "CamWptLL");
    
	Script.WaitSec(4); --Travel Time to LL (27 seconds

	Voice.PlayVox(VOX_BEWARE_PREDATORS, 5);
	
	Script.WaitSec(3);
	EntGame.SpawnAnimalOnPath(AID_MEERKAT_M, "Path23", 0, ST_WPT_RUN, 0, 0, 0, 1.5);
	Script.WaitSec(1.5);
	EntGame.SpawnAnimalOnPath(AID_MEERKAT_M, "Path23", 0, ST_WPT_RUN, 0, 0, 0, 1.5);
	Script.WaitSec(1.5);	
    a=EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "Path21", 0, ST_WPT_WALK, 0, 0, 0, 2.3);
    Animal.EnableFear(a, false);
    EntGame.SpawnAnimalOnPath(AID_MEERKAT_M, "Path23", 0, ST_WPT_RUN, 0, 0, 0, 1.5);
    Script.WaitSec(2);
    EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "Path23", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
    Script.WaitSec(1);
    a=EntGame.SpawnAnimalOnPath(AID_KUDU_M, "LongPath5", 1, ST_WPT_WALK, 0, 0, 0, 1.5);
    Animal.EnableFear(a, false);
    Entity.SetName(a, "Kudu10"); 
    Script.WaitSec(1);
    EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "Path23", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
    Script.WaitSec(3);
    
    --EXTRA ADDED
    EntGame.SpawnAnimalOnPath(AID_KUDU_M, "Path26", 0, ST_WPT_RUN, 0, 0, 0, 1.1);
    
    a=EntGame.SpawnAnimalOnPath(AID_KUDU_M, "Path28", 0, ST_WPT_WALK, 0, 0, 0, .5); 
    Animal.EnableFear(a, false);
    Entity.SetName(a, "Kudu12");  
    Script.WaitSec(3);

    EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "Path24", 0, ST_WPT_RUN, 0, 0, 0, 1.5);

    a=EntGame.SpawnAnimalOnPath(AID_KUDU_F, "LongPath5", 0, ST_WPT_WALK, 0, 0, 0, 1.5);
    Animal.EnableFear(a, false);
    Entity.SetName(a, "Kudu9");
    a=EntGame.SpawnAnimalOnPath(AID_KUDU_M, "LongPath5", 0, ST_WPT_WALK, 0, 0, 0, 1.5);
    Animal.EnableFear(a, false);
    Entity.SetName(a, "Kudu11");
    
    Script.WaitSec(2);
    EntGame.SpawnAnimalOnPath(AID_KUDU_F, "Path26", 0, ST_WPT_RUN, 0, 0, 0, 1.1);
    Script.WaitSec(1.5);
    EntGame.SpawnAnimalOnPath(AID_KUDU_M, "Path26", 0, ST_WPT_RUN, 0, 0, 0, 1.1);
    Script.WaitSec(1.5);
    EntGame.SpawnAnimalOnPath(AID_KUDU_F, "Path26", 0, ST_WPT_RUN, 0, 0, 0, 1.1);
    Script.WaitSec(1);
    Run("Kudu10");
    Script.WaitSec(3);
    a=EntGame.SpawnAnimalOnPath(AID_KUDU_F, "Path28", 0, ST_WPT_WALK, 0, 0, 0, .5);
    Animal.EnableFear(a, false);
    Entity.SetName(a, "Kudu13");	
    EntGame.SpawnAnimalOnPath(AID_MEERKAT_M, "Path24", 0, ST_WPT_RUN, 0, 0, 0, 1.5);	
    Run("Kudu9");	
    Script.WaitSec(4);
    Run("Kudu12");
    
    EntGame.SpawnAnimalOnPath(AID_KUDU_M, "Path26", 0, ST_WPT_RUN, 0, 0, 0, 1.1);
    
	Attack1 = EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "LongerPath2", 0, ST_WPT_RUN, 0, 0, 0, 1.5);
	Animal.SetAttackType(Attack1, ATK_STATIC);
	Animal.SetAutoChargeDist(Attack1, 12);
	Animal.SetAttackRepeat(Attack1, 1);	
		
    Run("Kudu11");	

    Script.WaitSec(2); --SHOOT TIME
    EntGame.SpawnAnimalOnPath(AID_KUDU_M, "Path26", 0, ST_WPT_RUN, 0, 0, 0, 1.1);
    Script.WaitSec(4);
    EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "Path26", 0, ST_WPT_RUN, 0, 0, 0, 1.1);
    Script.WaitSec(2);
    EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "Path26", 0, ST_WPT_RUN, 0, 0, 0, 1.1);
    Script.WaitSec(2);
    Run("Kudu13");
    Script.WaitSec(3);
                     	    		  
    end;    

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

function Part4()

	--DEBUG (1 LINE)
	--Camera.JumpToWaypoint(entCamera, "CamWptLL");
   
	Camera.SetSpeed(entCamera, 2.0, 0.1); 
    Camera.StopAtWaypoint(entCamera, "CamWptRR");
    
    EntGame.SpawnAnimalOnPath(AID_KUDU_F, "Path26", 0, ST_WPT_RUN, 0, 0, 0, 1.1);
    
    EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "Path28", 0, ST_WPT_RUN, 20, 0, 0, .9);
    Script.WaitSec(5);
    EntGame.SpawnAnimalOnPath(AID_KUDU_M, "LongerPath2", 0, ST_WPT_RUN, 20, 0, 0, 1.5);
    
    a=EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "LongerPath10", 0, ST_GRAZING, 20, 2, 2, 1.0);
	Animal.EnableFear(a, false);
	Entity.SetName(a, "Leopard1");
	Script.WaitSec(1.5);
	EntGame.SpawnAnimalOnPath(AID_KUDU_M, "LongerPath2", 0, ST_WPT_RUN, 0, 0, 0, 1.5);
    Script.WaitSec(1.5);
    EntGame.SpawnAnimalOnPath(AID_KUDU_F, "LongerPath2", 0, ST_WPT_RUN, 0, 0, 0, 1.5);
    
	a=EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "LongPath6", 0, ST_WPT_RUN, 0, 0, 0, 2.5);
	Animal.FaceEntity(a, entCamera);
	Animal.SetAutoChargeDist(a, 15);
	Animal.SetAttackType(a, ATK_STRAFE);
	Animal.SetStrafeAttackDist(a, 6.5);
		
	a=EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "LongerPath10", 1, ST_GRAZING, 20, 0, 0, 1.0);
	Animal.EnableFear(a, false);
	Entity.SetName(a, "Leopard2");
	
	a=EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "Path29", 0, ST_WPT_WALK, 20, 0, 0, 1.5);
	Animal.EnableFear(a, false);
	Animal.SetAttackType(a, ATK_STRAFE);
	Animal.SetAutoChargeDist(a, 12);	
	Animal.SetStrafeAttackDist(a, 6.5);
	Entity.SetName(a, "Leopard3");
	
	a=EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "Path30", 0, ST_WPT_WALK, 20, 0, 0, 1.5);
	Animal.EnableFear(a, false);
	Animal.SetAttackType(a, ATK_STRAFE);
	Animal.SetAutoChargeDist(a, 12);	
	Animal.SetStrafeAttackDist(a, 6.5);
	Entity.SetName(a, "Leopard4");
	
	Script.WaitSec(2);	
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path27", 0, 0, 0, 0, 1.0);
	Script.WaitSec(1.0);
	Run("Leopard1"); 
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path27", 0, 0, 1.5, 0, .8);
	Script.WaitSec(2);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path27", 0, 0, -2, 0, .7);
	Script.WaitSec(1);
	Run("Leopard2"); 
	Script.WaitSec(2);
	Run("Leopard3");
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path27", 0, 0, 0, 0, 1.0);
	Script.WaitSec(1.5);
	Run("Leopard4");
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path27", 0, 0, 1.5, 0, .8);	
	Script.WaitSec(1.5);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path27", 0, 0, -2, 0, .7); 	
	EntGame.SpawnAnimalOnPath(AID_MEERKAT_M, "LongerPath3", 0, ST_WPT_RUN, 20, 0, 0, 1.0);
	Script.WaitSec(3);
	EntGame.SpawnAnimalOnPath(AID_KUDU_M, "LongerPath5", 0, ST_WPT_RUN, 20, 0, 0, .7);
	Script.WaitSec(1.5);
	EntGame.SpawnAnimalOnPath(AID_KUDU_M, "LongerPath5", 0, ST_WPT_RUN, 20, 0, 0, .7);
	Script.WaitSec(3.5);	
	EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "LongerPath4", 0, ST_WPT_RUN, 20, 0, 0, 1.5);	
	Script.WaitSec(2.0);
	EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "LongerPath4", 0, ST_WPT_RUN, 20, 0, 0, 1.5);
	EntGame.SpawnAnimalOnPath(AID_KUDU_F, "LongerPath6", 0, ST_WPT_RUN, 20, 0, 0, .6);
	Script.WaitSec(2.5);
	EntGame.SpawnAnimalOnPath(AID_KUDU_M, "LongerPath6", 0, ST_WPT_RUN, 20, 0, 0, .6);
	Script.WaitSec(4);
	EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "LongerPath6", 0, ST_WPT_RUN, 20, 0, 0, 1.6);
	Script.WaitSec(1.5);
	EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "LongerPath6", 0, ST_WPT_RUN, 20, 0, -1, 1.6);
	Script.WaitSec(1.0);
	EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "LongerPath6", 0, ST_WPT_RUN, 20, 0, -1, 1.6);	
	Script.WaitSec(1.0);
	
	--UNDER THE ROOF	
	a=EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "LongerPath4", 2, ST_GRAZING, 20, 0, 0, 1.6);
	Entity.SetName(a, "Leopard5");		
	Animal.EnableFear(a, false);
	entityToFace = Entity.FindName(entRoot, "Acacia48");
	if (entityToFace) then
	    Animal.FaceEntity(a, entityToFace);
	    end;
        Script.WaitSec(2); 
    b=EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "LongerPath7", 0, ST_WPT_RUN, 20, 0, 0, 1.0);
    Animal.FaceEntity(b, entCamera);
    Animal.SetAttackType(b, ATK_STATIC);
    Animal.SetAttackRepeat(b, 1);	
	Animal.SetAutoChargeDist(b, 10);
    Script.WaitSec(2.5);
    Run("Leopard5"); 
    c=EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "LongerPath8", 0, ST_WPT_RUN, 20, 0, 0, 1.6);
    Animal.FaceEntity(c, entCamera); 
    Script.WaitSec(3.5); 
    d=EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "LongerPath9", 0, ST_WPT_RUN, 20, 0, 0, 1.5);
    Animal.FaceEntity(d, entCamera);
    Animal.SetAttackType(d, ATK_STATIC);
    Animal.SetAttackRepeat(d, 1);	
	Animal.SetAutoChargeDist(d, 10);        
    Script.WaitSec(3.0); 
    e=EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "LongerPath8", 0, ST_WPT_RUN, 20, 0, 0, .9); 
    Animal.FaceEntity(e, entCamera);
    Script.WaitSec(2.5);
    EntGame.SpawnAnimalOnPath(AID_KUDU_F, "Path21", 0, ST_WPT_RUN, 20, 0, 0, 1.6);
    Script.WaitSec(1.0);
    f=EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "LongerPath7", 0, ST_WPT_RUN, 20, 0, 0, 1.0);
    Animal.FaceEntity(f, entCamera);
    Animal.SetAttackType(f, ATK_STRAFE);
	Animal.SetAutoChargeDist(f, 10);  
	Animal.SetStrafeAttackDist(f, 6.5);    
    Script.WaitSec(1.0);
    EntGame.SpawnAnimalOnPath(AID_MEERKAT_M, "Path21", 0, ST_WPT_RUN, 20, 0, 0, 1.5);     
    h=EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "LongerPath8", 0, ST_WPT_RUN, 20, 0, 0, .7);
    Animal.FaceEntity(h, entCamera);    

    end;    

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