-----------------------------------------------------------------------------
-- Stage 4-5
-----------------------------------------------------------------------------
-- GLOBALS
   
function Graze2(name)    
    local animal3;
	animal3 = Entity.FindName(entRoot, name);
	if (animal3) then
    	Animal.SetState(animal3, ST_GRAZING);
    	Animal.EnableFear(animal3, false);	
    	end;
    end;  
  
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");
     
    Sound.Release(smpRaven);
       
    end;    
    
-----------------------------------------------------------------------------    
-- Setup

function Setup()

    EntGame.PushMenu("MenuGameRunning");

    SetupWorld("Maps\\WorldForestVillage\\ForestVillageCommon2.ini", "Maps\\Stage4-5\\Stage4-5.ini","","");
    EntGame.CreatePlayerEntities();
    
    EntGame.SetGlobalDustColorInitial(1.0, 0.61, .58, .45);
    EntGame.SetGlobalDustColorFinal  (0.0, 0.61, .58, .45);

    EntGame.SetStageTimer(180);
    
    smpRaven = Sound.Load("Sound\\Environment\\Raven.wav");
	        
    EntGame.LoadAnimal(AID_BUFFALO_M);
	EntGame.LoadAnimal(AID_LEOPARD_M);	
	EntGame.LoadAnimal(AID_GEMSBOK_M);
	EntGame.LoadAnimal(AID_GEMSBOK_F);
	EntGame.LoadAnimal(AID_HARE_M);
	EntGame.LoadAnimal(AID_RHINO_M);
	EntGame.LoadAnimal(AID_ELAND_M);
	EntGame.LoadAnimal(AID_SPURWINGGOOSE_M);
	
	StartupSequence("Music\\Visibly Shaken Underscore.ogg");
    
    end;

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

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

	Rhino1=EntGame.SpawnAnimalOnPath(AID_RHINO_M, "Path3", 0, ST_WPT_WALK, 0, 0, 0, 1.0);
	Animal.EnableFear(Rhino1, false);
	Entity.SetName(Rhino1, "Rhino1");
	Buffalo1=EntGame.SpawnAnimalOnPath(AID_BUFFALO_M, "Path1", 0, ST_GRAZING, 20, 0, 0, 1.2);
	Animal.EnableFear(Buffalo1, false);
	Entity.SetName(Buffalo1, "Buffalo1");
	Animal.SetCoinOffset(Buffalo1, 1.5);
	Buffalo2=EntGame.SpawnAnimalOnPath(AID_BUFFALO_M, "Path2", 0, ST_GRAZING, 20, 0, 0, 1.2);
	Animal.EnableFear(Buffalo2, false);
	Entity.SetName(Buffalo2, "Buffalo2");	
	Animal.SetCoinOffset(Buffalo2, 1.5);
	Buffalo3=EntGame.SpawnAnimalOnPath(AID_BUFFALO_M, "LongPath1", 0, ST_WPT_WALK, 0, 0, 0, 1.2);
	Animal.EnableFear(Buffalo3, false);
	Entity.SetName(Buffalo3, "Buffalo3");
	Animal.SetCoinOffset(Buffalo3, 1.5);
		
	EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "BunnyPath1", 0, ST_WPT_RUN, 20, 0, 0, 1.5);	
	Leopard1=EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "BunnyPath2", 0, ST_WPT_RUN, 20, 0, 0, .5);
	Animal.EnableFear(Leopard1, false);
	Animal.FaceEntity(Leopard1, entCamera);  	
	Entity.SetName(Leopard1, "Leopard1");	
	Leopard2=EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "BunnyPath3", 0, ST_WPT_RUN, 20, 0, 0, .5);
	Animal.EnableFear(Leopard2, false);
	Animal.FaceEntity(Leopard2, entCamera);  
	Entity.SetName(Leopard2, "Leopard2");
	Script.WaitSec(1.0);
	Walk("Buffalo1");	
	Script.WaitSec(.5);
	Walk("Buffalo2");
	EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "BunnyPath1", 0, ST_WPT_RUN, 20, 0, 0, 1.5);	
	a = EntGame.SpawnAnimalOnPath(AID_BUFFALO_M, "LongPath1", 0, ST_WPT_RUN, 0, -3, 2, 1.2);
	Animal.SetCoinOffset(a, 1.5);		
	Script.WaitSec(1.0);
	Run("Buffalo1");
	Script.WaitSec(1.0);	
	Walk("Leopard1");
	Run("Buffalo2");
	Run("Buffalo3");	
	Script.WaitSec(.5);	
	Walk("Leopard2");
	EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "BunnyPath1", 0, ST_WPT_RUN, 20, 0, 0, 1.5);
	a = EntGame.SpawnAnimalOnPath(AID_BUFFALO_M, "LongPath1", 0, ST_WPT_RUN, 0, -3, 2, 1.2);
	Animal.SetCoinOffset(a, 1.5);	
	Script.WaitSec(1.0);
	Run("Leopard1");
	a = EntGame.SpawnAnimalOnPath(AID_BUFFALO_M, "LongPath1", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	Animal.SetCoinOffset(a, 1.5);
	Script.WaitSec(1.5);
	EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "BunnyPath1", 0, ST_WPT_RUN, 20, 0, 0, 1.5);		
	Run("Leopard2");
	a = EntGame.SpawnAnimalOnPath(AID_BUFFALO_M, "LongPath1", 0, ST_WPT_RUN, 0, -3, 0, 1.2);
	Animal.SetCoinOffset(a, 1.5);
	Script.WaitSec(2);
	a = EntGame.SpawnAnimalOnPath(AID_BUFFALO_M, "LongPath1", 0, ST_WPT_RUN, 0, -2, 0, 1.2);
	Animal.SetCoinOffset(a, 1.5);		
	Run("Rhino1");	
	a = EntGame.SpawnAnimalOnPath(AID_BUFFALO_M, "LongPath4", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	Animal.SetCoinOffset(a, 1.5);
	Script.WaitSec(3);
	a = EntGame.SpawnAnimalOnPath(AID_BUFFALO_M, "LongPath1", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	Animal.SetCoinOffset(a, 1.5);
	a = EntGame.SpawnAnimalOnPath(AID_BUFFALO_M, "LongPath4", 0, ST_WPT_RUN, 0, 0, 0, 1.2);		
	Animal.SetCoinOffset(a, 1.5);
	
	--ACCELERATION
    Camera.SetSpeed(entCamera, 1.0, .1); 
  	Script.WaitSec(.25);
    Camera.SetSpeed(entCamera, 2.0, .1); 
    Script.WaitSec(3);

	EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "LongPath2", 0, ST_WPT_RUN, 0, 0, 0, 1.2);	
	EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "LongPath3", 0, ST_WPT_RUN, 0, 0, 0, 1.2);	
			
    Camera.StopAtWaypoint(entCamera, "CamWptTT");

	Script.WaitSec(1.5);

	EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "LongPath2", 0, ST_WPT_RUN, 0, 0, 0, 1.2);	
	EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "LongPath3", 0, ST_WPT_RUN, 0, 0, 0, 1.2);	
	Script.WaitSec(1.5);
	EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "LongPath3", 0, ST_WPT_RUN, 0, -.5, 0, 1.2);		
	Script.WaitSec(0.5);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath4", 0, ST_WPT_RUN, 0, 0, 0, .8);	
	Script.WaitSec(1.0);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath4", 0, ST_WPT_RUN, 0, 0, 0, .8);	
	Script.WaitSec(0.5);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath4", 0, ST_WPT_RUN, 0, -1.5, 0, .8);	
	Script.WaitSec(1.0);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath4", 0, ST_WPT_RUN, 0, -.5, 0, .8);	
	Script.WaitSec(1.0);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath4", 0, ST_WPT_RUN, 0, 0, 0, .8);	
	Script.WaitSec(0.5);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath4", 0, ST_WPT_RUN, 0, -1.5, 0, .8);	
	Script.WaitSec(1.0);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath4", 0, ST_WPT_RUN, 0, -.5, 0, .8);	
	Script.WaitSec(4.5);
	a1=EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "LongPath6", 0, ST_WPT_RUN, 0, 0, 0, 1.2);	
	Animal.FaceEntity(a1, entCamera);
	Script.WaitSec(1.0);
	a2=EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "LongPath6", 0, ST_WPT_RUN, 0, 0, 0, 1.2);	
	Animal.FaceEntity(a2, entCamera);	
	a3=EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "LongPath5", 0, ST_WPT_RUN, 0, 0, 0, 1.2);	
	Animal.FaceEntity(a3, entCamera);
	Script.WaitSec(1.0);
	a4=EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "LongPath5", 0, ST_WPT_RUN, 0, -1.5, 0, 1.5);	
	Animal.FaceEntity(a4, entCamera);	
	
	Rhino1=EntGame.SpawnAnimalOnPath(AID_RHINO_M, "BunnyPath5", 0, ST_WPT_WALK, 0, 0, 0, 1.2);	
	Animal.FaceEntity(Rhino1, entCamera);
	Animal.EnableFear(Rhino1, false);
	Animal.SetAutoChargeDist(Rhino1, 10);	
	Animal.SetAttackType(Rhino1, ATK_STRAFE);
	Animal.SetStrafeAttackDist(Rhino1, 6.5);
	Animal.SetPostAttackRand(Rhino1, false);
	Animal.SetPostAttackDir(Rhino1, -90);
	Entity.SetName(Rhino1, "Rhino1");
	
	Rhino4=EntGame.SpawnAnimalOnPath(AID_RHINO_M, "BunnyPath6", 0, ST_WPT_WALK, 0, 0, 0, 1.2);	
	Animal.FaceEntity(Rhino4, entCamera);
	Animal.EnableFear(Rhino4, false);
	Entity.SetName(Rhino4, "Rhino4");
	Script.WaitSec(6.0);
	Run("Rhino1");		
	Script.WaitSec(2.5);
	Run("Rhino4");	 
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath7", 0, ST_WPT_RUN, 0, 0, 0, 1);	
	Script.WaitSec(1.0);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath8", 0, ST_WPT_RUN, 0, 0, 0, 1);	
	Script.WaitSec(0.5);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath7", 0, ST_WPT_RUN, 0, -1.5, 0, 1);	
	Script.WaitSec(2.0);
	Buffalo1=EntGame.SpawnAnimalOnPath(AID_BUFFALO_M, "BunnyPath12", 0, ST_WPT_WALK, 0, 0, 0, .6);	
	Animal.EnableFear(Buffalo1, false);
	Entity.SetName(Buffalo1, "Buffalo1");					
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath9", 0, ST_WPT_RUN, 0, -.5, 0, 1);
	Script.WaitSec(2.0);
	Rhino3=EntGame.SpawnAnimalOnPath(AID_RHINO_M, "BunnyPath11", 0, ST_WPT_WALK, 0, 0, 0, .6);	
	Animal.EnableFear(Rhino3, false);
	Entity.SetName(Rhino3, "Rhino3");  		
	Script.WaitSec(2.0);
	
	--Jungle Bird Call 
	Sound.Play(smpRaven, 1, .5, DS2_CENTER); 
	
	a5=EntGame.SpawnAnimalOnPath(AID_GEMSBOK_F, "Path4", 0, ST_WPT_RUN, 0, 0, 0, .7);
	Animal.FaceEntity(a5, entCamera);
	Script.WaitSec(.5);
	
	a6=EntGame.SpawnAnimalOnPath(AID_ELAND_M, "Path4", 0, ST_WPT_RUN, 0, 1.5, 0, 1.0);
	Animal.FaceEntity(a6, entCamera);	
	Script.WaitSec(1.5);	
	
	--Jungle Bird Call 
	Sound.Play(smpRaven, 1, .5, DS2_CENTER); 
	
	Script.WaitSec(1.5);
	
	EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "Path5", 0, ST_WPT_RUN, 0, 0, 0, 1.0);
	
	Script.WaitSec(1.0);	
	a = EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "BunnyPath10", 0, ST_WPT_RUN, 0, 0, 0, .6);
	Animal.SetAutoChargeDist(a, 5);	
	Animal.SetAttackType(a, ATK_STRAFE);	
	Script.WaitSec(.5);		
	Run("Buffalo1");		
	EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "Path5", 0, ST_WPT_RUN, 0, 0, 0, 1.0);	
	Script.WaitSec(5);
			
	Run("Rhino3");
	Script.WaitSec(1.0);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath13", 0, ST_WPT_RUN, 0, 0, 0, 1);	
	Script.WaitSec(1.0);	
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath14", 0, ST_WPT_RUN, 0, -1.5, 0, 1);	
	Script.WaitSec(1.0);				
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "Path6", 0, ST_WPT_RUN, 0, -.5, 0, 1);	
	Script.WaitSec(.5);
	R1=EntGame.SpawnAnimalOnPath(AID_RHINO_M, "Path27", 0, ST_WPT_WALK, 0, 0, 0, .8);	
	Animal.EnableFear(R1, false);
	Animal.FaceEntity(R1, entCamera);		
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath13", 0, ST_WPT_RUN, 0, 0, 0, 1);
	Script.WaitSec(5.0);
	Eland1=EntGame.SpawnAnimalOnPath(AID_ELAND_M, "Path8", 0, ST_WPT_RUN, 0, 0, 0, 1);	
	Animal.FaceEntity(Eland1, entCamera);		
	Eland2=EntGame.SpawnAnimalOnPath(AID_ELAND_M, "Path7", 0, ST_WPT_RUN, 0, 0, 0, 1);	
	Animal.FaceEntity(Eland2, entCamera);	
	Script.WaitSec(1.5);
	Eland3=EntGame.SpawnAnimalOnPath(AID_GEMSBOK_F, "Path8", 0, ST_WPT_RUN, 0, 0, 0, .7);	
	Animal.FaceEntity(Eland3, entCamera);
	Script.WaitSec(1.0);
	Eland4=EntGame.SpawnAnimalOnPath(AID_ELAND_M, "Path7", 0, ST_WPT_RUN, 0, 0, 0, 1);
	Animal.FaceEntity(Eland4, entCamera);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath22", 0, ST_WPT_RUN, 0, 0, 0, 1);		
	Script.WaitSec(1.0);
		 
	a1=EntGame.SpawnAnimalOnPath(AID_GEMSBOK_M, "Path10", 0, ST_GRAZING, 30, -2, 0, 1.0);
    Animal.EnableFear(a1, false);
    Entity.SetName(a1, "Gemsbok1");	
	a2=EntGame.SpawnAnimalOnPath(AID_GEMSBOK_M, "Path9", 0, ST_GRAZING, 20, 0, 0, 1.0);
    Animal.EnableFear(a2, false);
    Entity.SetName(a2, "Gemsbok2");	
	a3=EntGame.SpawnAnimalOnPath(AID_GEMSBOK_F, "Path12", 0, ST_GRAZING, 25, 0, 0, .7);
    Animal.EnableFear(a3, false);
    Entity.SetName(a3, "Gemsbok3");	 
	a4=EntGame.SpawnAnimalOnPath(AID_GEMSBOK_M, "BunnyPath15", 0, ST_GRAZING, 30, 0, 0, 1.0);
    Animal.EnableFear(a4, false);
    Entity.SetName(a4, "Gemsbok4");	  
	a41=EntGame.SpawnAnimalOnPath(AID_GEMSBOK_M, "Path11", 0, ST_GRAZING, 45, 0, 0, 1.0);
    Animal.EnableFear(a41, false);
    Entity.SetName(a41, "Gemsbok5");  
    
    --LEOPARDS ATTACK	    
	Script.WaitSec(4);
	l1=EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "BunnyPath21", 0, ST_WPT_RUN, 0, 0, 0, 1.7);
	Animal.FaceEntity(l1, entCamera);
	Animal.SetAutoChargeDist(l1, 8);	
	Animal.SetAttackType(l1, ATK_STRAFE);
	Script.WaitSec(1.5);
	l1=EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "BunnyPath21", 0, ST_WPT_RUN, 0, .5, .5, 1.7);
	Animal.FaceEntity(l1, entCamera);
	Animal.SetAutoChargeDist(l1, 5);	
	Animal.SetAttackType(l1, ATK_STRAFE);	
	
	--INTO THE MIST
	Script.WaitSec(3.5);
	Walk("Gemsbok1");
	Script.WaitSec(2);
	Walk("Gemsbok2");
	
	--Jungle Bird Call 
	Sound.Play(smpRaven, 1, .5, DS2_CENTER); 
	
	Script.WaitSec(1);	
	Run("Gemsbok1");	

	--Jungle Bird Call 
	Sound.Play(smpRaven, 1, .5, DS2_CENTER); 
	
	Gemsbok1=EntGame.SpawnAnimalOnPath(AID_GEMSBOK_F, "Path9", 0, ST_WPT_RUN, 20, -3.5, -.5, .7);
	Animal.FaceEntity(Gemsbok1, entCamera);		
	Script.WaitSec(2);
	Run("Gemsbok2");
	
	--RUN DOWN CENTER
	EntGame.SpawnAnimalOnPath(AID_GEMSBOK_M, "BunnyPath16", 0, ST_WPT_RUN, 25, 0, 0, .4);
		
	Script.WaitSec(4);
	Walk("Gemsbok3");
	Script.WaitSec(1);
	Walk("Gemsbok4");
		
	Script.WaitSec(1);	
	EntGame.SpawnAnimalOnPath(AID_GEMSBOK_F, "BunnyPath15", 0, ST_WPT_RUN, 30, -3, 0, .7);		
	Script.WaitSec(1);	
	Run("Gemsbok3");
	Walk("Gemsbok5");

	Script.WaitSec(1.0);
		
	--RUN DOWN CENTER
	EntGame.SpawnAnimalOnPath(AID_GEMSBOK_F, "BunnyPath17", 0, ST_WPT_RUN, 25, 0, 0, .4);
	
	Script.WaitSec(2.0);	
	Run("Gemsbok4");
	Script.WaitSec(2);
	Run("Gemsbok5");	
	Script.WaitSec(6);
	EntGame.DestroyAllAnimals();
	Script.WaitSec(1);
	Bunny1=EntGame.SpawnAnimalOnPath(AID_HARE_M, "Path13", 0, ST_WPT_RUN, 25, 0, 0, 1.0);
	Animal.FaceEntity(Bunny1, entCamera);
	Script.WaitSec(1.5);
	Bunny2=EntGame.SpawnAnimalOnPath(AID_HARE_M, "Path13", 0, ST_WPT_RUN, 25, 0, 0, 1.0);
	Animal.FaceEntity(Bunny2, entCamera);	
	Script.WaitSec(.5);	
	Bunny3=EntGame.SpawnAnimalOnPath(AID_HARE_M, "Path13", 0, ST_WPT_RUN, 25, 0, 0, 1.0);
	Animal.FaceEntity(Bunny3, entCamera);	
	Script.WaitSec(1.0);				
	Bunny4=EntGame.SpawnAnimalOnPath(AID_HARE_M, "Path13", 0, ST_WPT_RUN, 25, 0, 0, 1.0);
	Animal.FaceEntity(Bunny4, entCamera);
	Script.WaitSec(2.5);
	Bunny5=EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath20", 0, ST_WPT_RUN, 25, -1, -1, 1.0);
	Animal.FaceEntity(Bunny5, entCamera);			
	Script.WaitSec(1.0);		
		
	Leopard1=EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "BunnyPath18", 0, ST_WPT_RUN, 25, 0, 0, 1.0);
	Animal.FaceEntity(Leopard1, entCamera);		
	Bunny6=EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath20", 0, ST_WPT_RUN, 25, 0, 0, 1.0);	
	Animal.FaceEntity(Bunny6, entCamera);	
	Script.WaitSec(1);
	Leopard2=EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "BunnyPath19", 0, ST_WPT_RUN, 25, 0, 0, 1.0);	
	Animal.FaceEntity(Leopard2, entCamera);	
	Animal.SetAutoChargeDist(Leopard2, 10);	
	Animal.SetAttackType(Leopard2, ATK_STRAFE);		
	Bunny7=EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath20", 0, ST_WPT_RUN, 25, 1, 1, 1.0);	
	Animal.FaceEntity(Bunny7, entCamera);
	Script.WaitSec(2);
	EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "Path14", 0, ST_WPT_RUN, 0, 0, 0, 1.0);	
	AB1=EntGame.SpawnAnimalOnPath(AID_ELAND_M, "Path15", 0, ST_WPT_WALK, 25, 0, 0, 1.0);	
	Animal.EnableFear(AB1, false);
    Entity.SetName(AB1, "AB1"); 	
	AB2=EntGame.SpawnAnimalOnPath(AID_GEMSBOK_F, "Path16", 0, ST_WPT_WALK, 25, 0, 0, .7);	
	Animal.EnableFear(AB2, false);
	Entity.SetName(AB2, "AB2");		
	AB3=EntGame.SpawnAnimalOnPath(AID_GEMSBOK_F, "Path17", 0, ST_WPT_WALK, 25, 0, 0, .7);	
	Animal.EnableFear(AB3, false);
	Entity.SetName(AB3, "AB3");
	AB4=EntGame.SpawnAnimalOnPath(AID_ELAND_M, "Path18", 0, ST_WPT_WALK, 25, 0, 0, 1.0);	
	Animal.EnableFear(AB4, false);
	Entity.SetName(AB4, "AB4");	
	
	Script.WaitSec(9);
	Run("AB1");
	ac5=EntGame.SpawnAnimalOnPath(AID_RHINO_M, "Path23", 0, ST_GRAZING, 25, 0, 0, 1.0);
    Animal.EnableFear(ac5, false);
    Entity.SetName(ac5, "RHINOA5"); 
	
	Script.WaitSec(1.0);
	Run("AB4");	
	Script.WaitSec(2.0);
	Run("AB2");	
	Script.WaitSec(1.0);
		
	ac1=EntGame.SpawnAnimalOnPath(AID_RHINO_M, "Path19", 0, ST_GRAZING, 20, 0, 0, 1.2);
    Animal.EnableFear(ac1, false);
    Entity.SetName(ac1, "RHINOA1");	
    
    --2nd Rhino to attack
	ac2=EntGame.SpawnAnimalOnPath(AID_RHINO_M, "Path20", 0, ST_GRAZING, 20, 0, 0, 1.1);
    Animal.EnableFear(ac2, false);
    Animal.FaceEntity(ac2, entCamera);
    Animal.SetAttackType(ac2, ATK_STATIC);
	Animal.SetAttackRepeat(ac2, 1);
	Animal.SetStaticAttackDist(ac2, 6);
	Animal.SetAutoChargeDist(ac2, 6); 
	Animal.SetPostAttackRand(ac2, false);
	Animal.SetPostAttackDir(ac2, 90);	    
    Entity.SetName(ac2, "RHINOA2");	
    
    --1st Rhino to attack
	ac3=EntGame.SpawnAnimalOnPath(AID_RHINO_M, "Path21", 0, ST_GRAZING, 20, 0, 0, .6);
    Animal.EnableFear(ac3, false);
    Animal.FaceEntity(ac3, entCamera);
    Animal.SetAttackType(ac3, ATK_STATIC);
	Animal.SetAttackRepeat(ac3, 1);
	Animal.SetStaticAttackDist(ac3, 6);
	Animal.SetAutoChargeDist(ac3, 6); 
	Animal.SetPostAttackRand(ac3, false);
	Animal.SetPostAttackDir(ac3, -90);	
    Entity.SetName(ac3, "RHINOA3");	 
    
	ac4=EntGame.SpawnAnimalOnPath(AID_RHINO_M, "Path22", 0, ST_GRAZING, 20, 0, 0, 1.0);
    Animal.EnableFear(ac4, false);
    Entity.SetName(ac4, "RHINOA4");	  

 	ac6=EntGame.SpawnAnimalOnPath(AID_RHINO_M, "Path24", 0, ST_GRAZING, 20, 0, 0, .8);
    Animal.EnableFear(ac6, false);
    Entity.SetName(ac6, "RHINOA6");	
    
    --3rd Rhino to attack 
	ac7 = EntGame.SpawnAnimalOnPath(AID_RHINO_M, "Path25", 0, ST_GRAZING, 23, 0, 0, .7);
    Animal.EnableFear(ac7, false);
    Animal.FaceEntity(ac7, entCamera);
    Animal.SetAutoChargeDist(ac7, 10); 
    Animal.SetAttackType(ac7, ATK_STRAFE);
    Animal.SetStrafeAttackDist(ac7, 6);
    Entity.SetName(ac7, "RHINOA7");	 
     
	ac8=EntGame.SpawnAnimalOnPath(AID_RHINO_M, "Path26", 0, ST_GRAZING, 20, 0, 0, .6);
    Animal.EnableFear(ac8, false);
    Entity.SetName(ac8, "RHINOA8"); 
 	Script.WaitSec(3.0);
 	Walk("RHINOA5");	
 	Script.WaitSec(2.0);
 	Walk("RHINOA6");	
 	Script.WaitSec(2.0);
	Run("AB3");	 
	Script.WaitSec(1.0);  
	Walk("RHINOA3");	
	Script.WaitSec(1.0);
	Walk("RHINOA1");
	Walk("RHINOA2");
	Walk("RHINOA8");
	Script.WaitSec(5.0);
	Graze2("RHINOA1");
	Script.WaitSec(13.0);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath23", 0, ST_WPT_RUN, 0, 0, 0, 1);	
	Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath24", 0, ST_WPT_RUN, 0, 0, 0, 1);	
	Script.WaitSec(1.0);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath25", 0, ST_WPT_RUN, 0, 0, 0, 1);
	Script.WaitSec(1.0);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath23", 0, ST_WPT_RUN, 0, 0, 0, 1);		
	Script.WaitSec(1.0);	
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath25", 0, ST_WPT_RUN, 0, -1.0, -.5, 1);
	Script.WaitSec(1.5);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath23", 0, ST_WPT_RUN, 0, 0, 0, 1);	
	Script.WaitSec(3.0);	
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath26", 0, ST_WPT_RUN, 0, -1.5, -1.5, 1);
	Script.WaitSec(1.0);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath26", 0, ST_WPT_RUN, 0, -.75, -.75, 1);
	Script.WaitSec(1.0);
	EntGame.SpawnAnimalOnPath(AID_HARE_M, "BunnyPath26", 0, ST_WPT_RUN, 0, 1, 1, 1);	
	Script.WaitSec(6.0);
	EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "BunnyPath26", 0, ST_WPT_RUN, 0, 0, 0, 1);	
  	Script.WaitSec(4.5);	
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path29", 0, 0, -.5, 0, 1.2);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path30", 0, -3.6, 0, 6, 1.0);
    Script.WaitSec(.5);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path29", 0, 0, -1.5, 0, 1.2);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path30", 0, 5, 4, -5, 1.0);    	
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path29", 0, 1.5, 0, -.5, .5);	   
    Script.WaitSec(1.0);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path30", 0, 0, 0, 0, 1.2);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path30", 0, 4, 0, -4, 1.0);    	
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path29", 0, .5, 0, 2, 1.1);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path29", 0, 0, -2, 0, 1.2);  	
    Script.WaitSec(1.0);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path30", 0, 0, 1.5, 0, 1.2);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path30", 0, -3.6, 0, 6, 1.0);      
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path30", 0, -.5, -1, -.5, 1.2);    
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path29", 0, 1.5, -1.0, -1.5, 1.2);	
    Script.WaitSec(.5);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path29", 0, 0, -.5, 0, 1.2);  	
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path30", 0, 1.5, 1.0, -1.5, 1.2);		
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "Path30", 0, .5, 0, -.5, 1.2);

    end;  

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

 