-----------------------------------------------------------------------------
-- Stage 5-5
-----------------------------------------------------------------------------

function PostStage()
	
    EntGame.EnablePlayerControl(false);
    EntGame.ClearFlag(GF_READYTOSTART);
    EntGame.BindCameraToEntity("IntroCamera");
 
	end;
	
-----------------------------------------------------------------------------    
function Setup()
    -- turn on the "Game running" menu - may not be needed for this game
    EntGame.PushMenu("MenuGameRunning");

    -- Load world
    SetupWorld("Maps\\WorldSandDunes\\SandDunesCommon.ini", "Maps\\Stage5-5\\Stage5-5.ini","","");
    EntGame.CreatePlayerEntities();
	
    EntGame.SetGlobalDustColorInitial(1.0, 0.81, .75, .55);
    EntGame.SetGlobalDustColorFinal  (0.0, 0.81, .75, .55);   
    
    EntGame.SetStageTimer(150);
    
	EntGame.LoadAnimal(AID_VULTURE_M);
	EntGame.LoadAnimal(AID_BUFFALO_M);
	EntGame.LoadAnimal(AID_BUFFALO_F);	
	EntGame.LoadAnimal(AID_SABLE_M);
	EntGame.LoadAnimal(AID_SABLE_F);
	EntGame.LoadAnimal(AID_RHINO_M);

	-- grab the camera and its waypoints
    entCamera   = Entity.FindName(entRoot, "MainCamera");
	entCamWptAA = Entity.FindName(entCamera, "CamWptAA");
	entCamWptBB = Entity.FindName(entCamera, "CamWptBB");
	entCamWptCC = Entity.FindName(entCamera, "CamWptCC");
	entCamWptDD = Entity.FindName(entCamera, "CamWptDD");
	entCamWptEE = Entity.FindName(entCamera, "CamWptEE");
	entCamWptFF = Entity.FindName(entCamera, "CamWptFF");
	entCamWptGG = Entity.FindName(entCamera, "CamWptGG");
	entCamWptHH = Entity.FindName(entCamera, "CamWptHH");
	entCamWptII = Entity.FindName(entCamera, "CamWptII");
	entCamWptJJ = Entity.FindName(entCamera, "CamWptJJ");
	entCamWptKK = Entity.FindName(entCamera, "CamWptKK");
	entCamWptLL = Entity.FindName(entCamera, "CamWptLL");
	
	StartupSequence("Music\\Sahara Sunrise.ogg");
	
    end;

-----------------------------------------------------------------------------
function Part1()
	
	Camera.JumpToWaypoint(entCamera, "CamWptAA");
	Camera.SetSpeed(entCamera, 0.0, 0.1);
	
	entSable=EntGame.SpawnAnimalOnPath(AID_SABLE_M, "Path0", 0, ST_GRAZING, 2, 0, 0, 1.0);
	Animal.FaceEntity(entSable, entCamWptBB);
	a = EntGame.SpawnAnimalOnPath(AID_SABLE_F, "Path0", 0, ST_GRAZING, 2.5, 4, 2, 1.2);
	Animal.EnableFear(a, false);
	entSable=EntGame.SpawnAnimalOnPath(AID_SABLE_M, "Path3", 0, ST_GRAZING, 3, 0, 0, 1.0);
	Animal.FaceEntity(entSable, entCamWptLL);
	a = EntGame.SpawnAnimalOnPath(AID_SABLE_F, "Path3", 0, ST_GRAZING, 4, -6, -3, 1.0);
	Animal.EnableFear(a, false);
	EntGame.SpawnAnimalOnPath(AID_SABLE_M, "Path0", 1, ST_GRAZING, 2, 0, 0, 1.0);
	EntGame.SpawnAnimalOnPath(AID_SABLE_F, "Path0", 1, ST_GRAZING, 1.25, -2, -6, 1.0);
	entVulture=EntGame.SpawnAnimalOnPath(AID_VULTURE_M, "LongPath1", 0, ST_PERCH, 5, 0, 0, 1.0);
	Animal.FaceEntity(entVulture, entCamWptLL);
	entVulture=EntGame.SpawnAnimalOnPath(AID_VULTURE_M, "Path00", 0, ST_PERCH, 40, 0, 0, 1.0);
	Animal.FaceEntity(entVulture, entCamWptAA);
	Animal.EnableFear(entVulture, false);
	
	Script.WaitSec(4);
	
	entSable=EntGame.SpawnAnimalOnPath(AID_SABLE_M, "Path1", 0, ST_WPT_RUN, 0, 0.0, 0.0, 1.0);
	Animal.FaceEntity(entSable, entCamera);
	Script.WaitSec(.5);
	entSable=EntGame.SpawnAnimalOnPath(AID_SABLE_F, "Path1", 0, ST_WPT_RUN, 0, 0.0, -2.0, 1.0);
	Animal.FaceEntity(entSable, entCamera);
	Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_SABLE_M, "Path1", 0, ST_WPT_RUN, 0, 4, -4, 1.0);
	Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_SABLE_F, "Path1", 0, ST_WPT_RUN, 0, 1, -1, 1.0);
	Script.WaitSec(1.5);
	
	entSable=EntGame.SpawnAnimalOnPath(AID_SABLE_M, "Path2", 0, ST_WPT_RUN, 0, 0.0, 0.0, 1.0);
	Animal.FaceEntity(entSable, entCamera);
	Script.WaitSec(2);
	entSable=EntGame.SpawnAnimalOnPath(AID_SABLE_M, "Path5", 0, ST_WPT_RUN, 0, 0.0, 0.0, 1.0);
	Animal.FaceEntity(entSable, entCamera);
	Script.WaitSec(.25);
	entSable=EntGame.SpawnAnimalOnPath(AID_SABLE_F, "Path5", 0, ST_WPT_RUN, 0, -2.0, 0.0, 1.0);
	Animal.FaceEntity(entSable, entCamera);
	Script.WaitSec(.75);
	entSable=EntGame.SpawnAnimalOnPath(AID_SABLE_M, "Path4", 0, ST_WPT_RUN, 0, 0.0, 0.0, 1.0);
	Animal.FaceEntity(entSable, entCamera);
	Script.WaitSec(1);
	entSable=EntGame.SpawnAnimalOnPath(AID_SABLE_F, "Path15", 0, ST_WPT_RUN, 0, 0.0, 3.0, 1.0);
	Animal.FaceEntity(entSable, entCamera);
	Script.WaitSec(.5);
	entSable=EntGame.SpawnAnimalOnPath(AID_SABLE_M, "Path15", 0, ST_WPT_RUN, 0, -1.0, 4.5, 1.0);
	Animal.FaceEntity(entSable, entCamera);
	Script.WaitSec(.5);
	entSable=EntGame.SpawnAnimalOnPath(AID_SABLE_F, "Path15", 0, ST_WPT_RUN, 0, 2, -2.0, 1.0);
	Animal.FaceEntity(entSable, entCamera);
	Script.WaitSec(1);
	entSable=EntGame.SpawnAnimalOnPath(AID_SABLE_F, "Path15", 0, ST_WPT_RUN, 0, -2, 2.0, 1.0);
	Animal.FaceEntity(entSable, entCamera);
	Script.WaitSec(3.5);
	entSable=EntGame.SpawnAnimalOnPath(AID_SABLE_F, "Path1", 0, ST_WPT_RUN, 0, 0.0, 0.0, 1.0);
	Animal.FaceEntity(entSable, entCamera);
	Script.WaitSec(.5);
	entSable=EntGame.SpawnAnimalOnPath(AID_SABLE_M, "Path1", 0, ST_WPT_RUN, 0, 0.0, -2.0, 1.0);
	Animal.FaceEntity(entSable, entCamera);
	Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_SABLE_F, "Path1", 0, ST_WPT_RUN, 0, -4, 4, 1.0);
	Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_SABLE_M, "Path1", 0, ST_WPT_RUN, 0, -1, 1, 1.0);
	
	end;
-----------------------------------------------------------------------------
function Part2()

	Camera.SetSpeed(entCamera, 5.0, 0.1);
		
	entSable=EntGame.SpawnAnimalOnPath(AID_SABLE_M, "Path2", 0, ST_WPT_RUN, 0, -.5, .5, 1.3);
	Animal.FaceEntity(entSable, entCamera);
	Script.WaitSec(.25);
	entSable=EntGame.SpawnAnimalOnPath(AID_SABLE_F, "Path2", 0, ST_WPT_RUN, 0, 1.0, 0.0, 1.3);
	Animal.FaceEntity(entSable, entCamera);
	
	Script.WaitSec(2);
	
	EntGame.SpawnAnimalOnPath(AID_VULTURE_M, "BunnyPath1", 0, ST_WPT_FLY, 0, 0, 0, 1.2);
	Script.WaitSec(.75);
	EntGame.SpawnAnimalOnPath(AID_VULTURE_M, "BunnyPath2", 0, ST_WPT_FLY, 0, 0, 0, 1.1);
	Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_VULTURE_M, "BunnyPath3", 0, ST_WPT_FLY, 0, 0, 0, 1.0);
	Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_VULTURE_M, "BunnyPath4", 0, ST_WPT_FLY, 0, 0, 0, .9);
	Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_VULTURE_M, "BunnyPath3", 0, -2, -1.25, -3, .8);
	Script.WaitSec(1.0);	
		
	entRhino=EntGame.SpawnAnimalOnPath(AID_RHINO_M, "BunnyPath3", 0, ST_WPT_RUN, 0, 0.0, 0.0, 1.0);
	Animal.FaceEntity(entRhino, entCamera);
	Animal.SetAutoChargeDist(entRhino, 15);	
	Animal.SetAttackType(entRhino, ATK_STRAFE);
	Animal.SetStrafeAttackDist(entRhino, 9.5);
	Animal.SetPostAttackRand(entRhino, false);
	Animal.SetPostAttackDir(entRhino, 90);
	
	Script.WaitSec(1.5);
	entSable=EntGame.SpawnAnimalOnPath(AID_SABLE_M, "Path8", 0, ST_WPT_RUN, 0, 0.0, 0.0, 1.0);
	Animal.FaceEntity(entSable, entCamera);
	Script.WaitSec(.5);
	entSable=EntGame.SpawnAnimalOnPath(AID_SABLE_F, "Path8", 0, ST_WPT_RUN, 0, 0.0, .5, 1.0);
	Animal.FaceEntity(entSable, entCamera);
	Script.WaitSec(1.5);
	entSable=EntGame.SpawnAnimalOnPath(AID_SABLE_M, "Path8", 0, ST_WPT_RUN, 0, 0.0, 2.5, 1.5);
	Animal.FaceEntity(entSable, entCamera);
	entRhino=EntGame.SpawnAnimalOnPath(AID_RHINO_M, "LongPath2", 0, ST_WPT_RUN, 0, 2, -3, 1.0);
	Animal.FaceEntity(entRhino, entCamera);
	Script.WaitSec(2);
	entSable=EntGame.SpawnAnimalOnPath(AID_SABLE_F, "Path7", 0, ST_WPT_RUN, 0, 0.0, 0.0, 1.2);
	Animal.FaceEntity(entSable, entCamera);
	Script.WaitSec(1);
	entSable=EntGame.SpawnAnimalOnPath(AID_SABLE_M, "Path7", 0, ST_WPT_RUN, 0, 0.0, 0.0, 1.0);
	Animal.FaceEntity(entSable, entCamera);
	entRhino=EntGame.SpawnAnimalOnPath(AID_RHINO_M, "LongPath2", 0, ST_WPT_RUN, 0, 0.0, 0.0, 1.3);
	Animal.FaceEntity(entRhino, entCamera);
	Script.WaitSec(.25);
	entSable=EntGame.SpawnAnimalOnPath(AID_SABLE_F, "Path7", 0, ST_WPT_RUN, 0, 0.0, -1.5, 1.0);
	Animal.FaceEntity(entSable, entCamera);
	Script.WaitSec(.75);
	
	--Running around the bend.	
	entSable=EntGame.SpawnAnimalOnPath(AID_SABLE_M, "LongPath3", 0, ST_WPT_RUN, 0, 0.0, 0.0, .8);
	Animal.FaceEntity(entSable, entCamera);
	Script.WaitSec(.5);
	entSable=EntGame.SpawnAnimalOnPath(AID_SABLE_F, "LongPath3", 0, ST_WPT_RUN, 0, -2, 0.0, .5);
	Animal.FaceEntity(entSable, entCamera);
	Script.WaitSec(1);
	entSable=EntGame.SpawnAnimalOnPath(AID_SABLE_M, "Path7", 0, ST_WPT_RUN, 0, 0.0, 0.0, 1.0);
	Animal.FaceEntity(entSable, entCamera);
	Script.WaitSec(1);
	entSable=EntGame.SpawnAnimalOnPath(AID_SABLE_M, "LongPath3", 0, ST_WPT_RUN, 0, 3, 2, .7);
	Animal.FaceEntity(entSable, entCamera);
	Script.WaitSec(3);	
	EntGame.SpawnBirdOnPath(AID_VULTURE_M, "BunnyPath7", 0, 0, 0, 0, 1);
	Script.WaitSec(1);
	EntGame.SpawnBirdOnPath(AID_VULTURE_M, "BunnyPath5", 0, 0, 0, 0, 1);
	Script.WaitSec(1);
	EntGame.SpawnBirdOnPath(AID_VULTURE_M, "BunnyPath6", 0, 0, 0, 0, 1);
	Script.WaitSec(3);
	EntGame.SpawnBirdOnPath(AID_VULTURE_M, "BunnyPath6", 0, 0, 0, 0, 1);
	Script.WaitSec(1);
	EntGame.SpawnBirdOnPath(AID_VULTURE_M, "BunnyPath5", 0, 0, 0, 0, 1);
	Script.WaitSec(1);
	
	entSable=EntGame.SpawnAnimalOnPath(AID_SABLE_M, "Path11", 0, ST_GRAZING, 4, 0.0, 0.0, 1.0);
	Animal.FaceEntity(entSable, entCamWptBB);
	Animal.EnableFear(entSable, false);
	Script.WaitSec(1);
	entSable=EntGame.SpawnAnimalOnPath(AID_SABLE_M, "Path11", 0, ST_GRAZING, 3, -4, 8, 1.0);
	Animal.FaceEntity(entSable, entCamWptBB);
	Animal.EnableFear(entSable, false);
	entSable=EntGame.SpawnAnimalOnPath(AID_SABLE_M, "Path12", 0, ST_WPT_RUN, 0, 0, 0, 1.0);
	Animal.FaceEntity(entSable, entCamWptGG);
	entSable=EntGame.SpawnAnimalOnPath(AID_SABLE_M, "Path10", 0, ST_WPT_RUN, 0, 0, 0, 1.0);
	Animal.FaceEntity(entSable, entCamWptFF);
	
	--Tilt downward.
	Camera.SetTiltOffset(entCamera, -5, 1.0);
	Script.WaitSec(2);

	--Stop at hillside.
	Camera.SetSpeed(entCamera, 0.0, 0.1);
	
	Script.WaitSec(4);
	
	entSable=EntGame.SpawnAnimalOnPath(AID_SABLE_M, "Path10", 0, ST_WPT_RUN, 0, 0.0, 0.0, 1.0);
	Animal.FaceEntity(entSable, entCamera);
	Script.WaitSec(1);
	entSable=EntGame.SpawnAnimalOnPath(AID_SABLE_F, "Path10", 0, ST_WPT_RUN, 0, -1, -2, 1.0);
	Animal.FaceEntity(entSable, entCamera);
	EntGame.SpawnAnimalOnPath(AID_VULTURE_M, "Path10", 0, ST_WPT_FLY, 0, 0.0, 0.0, 1.0);
	Script.WaitSec(1);
	entVulture=EntGame.SpawnAnimalOnPath(AID_VULTURE_M, "LongPath4", 0, ST_WPT_FLY, 0, 0.0, -2, 1.0);
	Script.WaitSec(1);
	EntGame.SpawnAnimalOnPath(AID_VULTURE_M, "Path10", 0, ST_WPT_FLY, 0, -3, -5, 1.0);
	EntGame.SpawnAnimalOnPath(AID_VULTURE_M, "LongPath5", 0, ST_WPT_FLY, 0, 0.0, 0.0, 1.0);
	Script.WaitSec(1);
	EntGame.SpawnBirdOnPath(AID_VULTURE_M, "LongPath4", 0, 0, 2, 3, 1);
	Script.WaitSec(1);
	EntGame.SpawnBirdOnPath(AID_VULTURE_M, "LongPath5", 0, 0, 0, 1.2, 1);
	Script.WaitSec(1);
	EntGame.SpawnBirdOnPath(AID_VULTURE_M, "LongPath4", 0, 0, -2, -.5, 1);
	Script.WaitSec(1);
	EntGame.SpawnAnimalOnPath(AID_SABLE_M, "Path10", 0, ST_WPT_RUN, 0, -.5, -2.5, 1.4);
	Script.WaitSec(1);
	EntGame.SpawnBirdOnPath(AID_VULTURE_M, "LongPath5", 0, 0, -1.5, -.5, 1);
	
	--Camera Turn Right
	Camera.SetPanOffset(entCamera, 15, 1.0);
	Script.WaitSec(4);
	EntGame.SpawnBirdOnPath(AID_VULTURE_M, "Path10", 0, 2, .5, -1, 1);
		
	entRhino=EntGame.SpawnAnimalOnPath(AID_RHINO_M, "Path13", 0, ST_WPT_RUN, 0, 0.0, 0.0, .8);
	Animal.FaceEntity(entRhino, entCamera);
	Animal.SetAutoChargeDist(entRhino, 35);	
	Animal.SetAttackType(entRhino, ATK_STRAFE);
	Animal.SetStrafeAttackDist(entRhino, 7.0);
	Animal.SetPostAttackRand(entRhino, false);
	Animal.SetPostAttackDir(entRhino, 90);
	Entity.SetName(entRhino, "Animal8");
	
	
	entRhino=EntGame.SpawnAnimalOnPath(AID_RHINO_M, "Path13", 0, ST_WPT_RUN, 0, 4, 4, .8);
	Animal.FaceEntity(entRhino, entCamera);
	Entity.SetName(entRhino, "Animal9");
	entRhino=EntGame.SpawnAnimalOnPath(AID_RHINO_M, "Path13", 0, ST_WPT_RUN, 0, -6, 3, .8);
	Animal.FaceEntity(entRhino, entCamera);
	Entity.SetName(entRhino, "Animal10");
	
	Script.WaitSec(2);
	
	--Camera Turn Left
	Camera.SetPanOffset(entCamera, 0, 1.0);
	Script.WaitSec(8);

	--Start Moving
	Camera.SetTiltOffset(entCamera, 0, 1.0);
	Camera.SetSpeed(entCamera, 5.0, 0.1);

	Script.WaitSec(4);
	a = EntGame.SpawnAnimalOnPath(AID_SABLE_M, "BunnyPath9", 0, ST_WPT_RUN, 0, 0, 0, .8);
	Entity.SetName(a, "Animal1");
	Script.WaitSec(1);
	a = EntGame.SpawnAnimalOnPath(AID_SABLE_M, "BunnyPath8", 0, ST_WPT_RUN, 0, 0, 0, .8);
	Entity.SetName(a, "Animal2");
	Script.WaitSec(1.5);
	a = EntGame.SpawnAnimalOnPath(AID_SABLE_F, "BunnyPath8", 0, ST_WPT_RUN, 0, 0, -1, .8);
	Entity.SetName(a, "Animal3");
	Script.WaitSec(1);
	EntGame.SpawnBirdOnPath(AID_VULTURE_M, "BunnyPath13", 0, 0, 0, 0, 1);
	Script.WaitSec(1.5);
	
	Gone("Animal8");
	Gone("Animal9");
	Gone("Animal10");
	
	a = EntGame.SpawnAnimalOnPath(AID_SABLE_F, "BunnyPath10", 0, ST_WPT_RUN, 0, 0, 0, .8);
	Entity.SetName(a, "Animal4");
	EntGame.SpawnAnimalOnPath(AID_SABLE_F, "BunnyPath11", 0, ST_WPT_RUN, 0, 0, 0, .8);
	a = Entity.SetName(a, "Animal5");
	Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_VULTURE_M, "BunnyPath12", 0, 0, 0, 0, 1);
	Script.WaitSec(1.5);
	a = EntGame.SpawnAnimalOnPath(AID_SABLE_M, "BunnyPath10", 0, ST_WPT_RUN, 0, 0, 0, .8);
	Entity.SetName(a, "Animal6");
	a = EntGame.SpawnAnimalOnPath(AID_SABLE_M, "BunnyPath11", 0, ST_WPT_RUN, 0, 0, 0, .8);
	Entity.SetName(a, "Animal7");
	Script.WaitSec(3);
	
	end;
-----------------------------------------------------------------------------
function Part3()
		
	entBuffalo=EntGame.SpawnAnimalOnPath(AID_BUFFALO_M, "Path20", 0, ST_WPT_RUN, 0, 0.0, 0.0, 1.0);
	Animal.FaceEntity(entBuffalo, entCamera);
	Animal.SetAutoChargeDist(entBuffalo, 20);
	Animal.SetAttackType(entBuffalo, ATK_STRAFE);
	Animal.SetStrafeAttackDist(entBuffalo, 7.0);
	Animal.SetPostAttackRand(entBuffalo, false);
	Animal.SetPostAttackDir(entBuffalo, -90);	

	Script.WaitSec(2);
	
	entBuffalo=EntGame.SpawnAnimalOnPath(AID_BUFFALO_M, "Path21", 0, ST_WPT_RUN, 0, 0.0, 0.0, 1.0);
	Animal.FaceEntity(entBuffalo, entCamera);
	entBuffalo=EntGame.SpawnAnimalOnPath(AID_BUFFALO_M, "Path22", 0, ST_GRAZING, 2, 0.0, 0.0, 1.0);
	Animal.FaceEntity(entBuffalo, entCamera);
	Animal.EnableFear(entBuffalo, false);	
	entBuffalo=EntGame.SpawnAnimalOnPath(AID_BUFFALO_M, "Path25", 0, ST_GRAZING, 8, 2.0, 0.0, 1.0);
	Animal.FaceEntity(entBuffalo, entCamera);
	Animal.EnableFear(entBuffalo, false);
	entBuffalo=EntGame.SpawnAnimalOnPath(AID_BUFFALO_M, "Path26", 0, ST_GRAZING, 16, 2.0, 1.0, 1.0);
	Animal.FaceEntity(entBuffalo, entCamera);
	Animal.EnableFear(entBuffalo, false);

	Gone("Animal1");
	Gone("Animal2");
	Gone("Animal3");
	
	Script.WaitSec(3);
	
	Gone("Animal4");
	Gone("Animal5");
	Gone("Animal6");
	Gone("Animal7");
	
	entBuffalo=EntGame.SpawnAnimalOnPath(AID_BUFFALO_M, "Path27", 0, ST_GRAZING, 12, 2.0, 0.0, 1.0);
	Animal.FaceEntity(entBuffalo, entCamera);
	Animal.SetAutoChargeDist(entBuffalo, 15);
	Animal.SetAttackType(entBuffalo, ATK_STATIC);
	Animal.SetAttackRepeat(entBuffalo, 2);
	Animal.SetStaticAttackDist(entBuffalo, 3.5);
	Animal.SetPostAttackRand(entBuffalo, false);
	Animal.SetPostAttackDir(entBuffalo, -90);
	Animal.EnableFear(entBuffalo, false);
	
	entVulture=EntGame.SpawnAnimalOnPath(AID_VULTURE_M, "Path34", 0, ST_PERCH, 13, 0.0, 0.0, 1.0);
	Animal.FaceEntity(entVulture, entCamera);
	Animal.EnableFear(entVulture, false);
	
	Script.WaitSec(5);
	
	entVulture=EntGame.SpawnAnimalOnPath(AID_VULTURE_M, "Path35", 0, ST_PERCH, 9, 0.0, 0.0, 1.0);
	Animal.FaceEntity(entVulture, entCamera);
	Animal.EnableFear(entVulture, false);
	entVulture=EntGame.SpawnAnimalOnPath(AID_VULTURE_M, "Path36", 0, ST_PERCH, 10, 0.0, 0.0, 1.0);
	Animal.FaceEntity(entVulture, entCamera);
	Animal.EnableFear(entVulture, false);
	entVulture=EntGame.SpawnAnimalOnPath(AID_VULTURE_M, "Path37", 0, ST_PERCH, 7, 0.0, 0.0, 1.0);
	Animal.FaceEntity(entVulture, entCamera);	
	entVulture=EntGame.SpawnAnimalOnPath(AID_VULTURE_M, "Path38", 0, ST_PERCH, 8, 0.0, 0.0, 1.0);
	Animal.FaceEntity(entVulture, entCamera);
	Animal.EnableFear(entVulture, false);
	
	Script.WaitSec(7);
	
	end;
-----------------------------------------------------------------------------
function Part4()

	Camera.StopAtWaypoint(entCamera, "entCamWptGG");
	Camera.SetSpeed(entCamera, 0.0, 0.1);
	
	Script.WaitSec(4);
	entBuffalo=EntGame.SpawnAnimalOnPath(AID_BUFFALO_M, "Path28", 0, ST_WPT_RUN, 5, 0.0, 0.0, 1.0);
	Animal.FaceEntity(entBuffalo, entCamera);
	Script.WaitSec(3);
	entBuffalo=EntGame.SpawnAnimalOnPath(AID_BUFFALO_M, "Path28", 0, ST_WPT_RUN, 5, 0.0, 0.0, 1.0);
	Animal.FaceEntity(entBuffalo, entCamera);
	Script.WaitSec(3);
	entVulture=EntGame.SpawnAnimalOnPath(AID_VULTURE_M, "Path38", 0, ST_PERCH, 10, 0.0, 0.0, 1.0);
	Animal.FaceEntity(entVulture, entCamera);
	entBuffalo=EntGame.SpawnAnimalOnPath(AID_BUFFALO_M, "LongPath6", 0, ST_WPT_RUN, 5, 0.0, 0.0, 1.0);
	Animal.FaceEntity(entBuffalo, entCamera);
	Script.WaitSec(3);
	entBuffalo=EntGame.SpawnAnimalOnPath(AID_BUFFALO_M, "LongerPath3", 0, ST_WPT_RUN, 5, 0.0, 0.0, 1.2);
	Animal.FaceEntity(entBuffalo, entCamera);
	Script.WaitSec(3);
	entBuffalo=EntGame.SpawnAnimalOnPath(AID_BUFFALO_M, "LongerPath1", 0, ST_WPT_RUN, 5, 0.0, 0.0, 1.0);
	Animal.FaceEntity(entBuffalo, entCamera);
	Script.WaitSec(3);

	entBuffalo=EntGame.SpawnAnimalOnPath(AID_BUFFALO_M, "Path29", 0, ST_WPT_RUN, 5, 0.0, 0.0, 1.0);
	Animal.FaceEntity(entBuffalo, entCamera);
	Animal.SetAutoChargeDist(entBuffalo, 10);	
	Animal.SetAttackType(entBuffalo, ATK_STATIC);
	Animal.SetAttackRepeat(entBuffalo, 2);
	Animal.SetPostAttackRand(entBuffalo, false);
	Animal.SetPostAttackDir(entBuffalo, -90);	
	
	Script.WaitSec(3);
	entVulture=EntGame.SpawnAnimalOnPath(AID_VULTURE_M, "Path38", 0, ST_PERCH, 30, 0.0, 0.0, 1.0);
	Animal.FaceEntity(entVulture, entCamera);
	entBuffalo=EntGame.SpawnAnimalOnPath(AID_BUFFALO_M, "Path30", 0, ST_WPT_RUN, 5, 0.0, 0.0, 1.0);
	Animal.FaceEntity(entBuffalo, entCamera);
	Script.WaitSec(3);
	entBuffalo=EntGame.SpawnAnimalOnPath(AID_BUFFALO_M, "Path33", 0, ST_WPT_RUN, 5, 0.0, 0.0, 1.0);
	Animal.FaceEntity(entBuffalo, entCamera);
	Script.WaitSec(3);
	entVulture=EntGame.SpawnAnimalOnPath(AID_VULTURE_M, "Path35", 0, ST_PERCH, 30, 0.0, 0.0, 1.0);
	Animal.FaceEntity(entVulture, entCamera);
	Script.WaitSec(3);
	entBuffalo=EntGame.SpawnAnimalOnPath(AID_BUFFALO_M, "Path31", 0, ST_WPT_RUN, 5, 0.0, 0.0, 1.0);
	Animal.FaceEntity(entBuffalo, entCamera);
	Script.WaitSec(3);
	entVulture=EntGame.SpawnAnimalOnPath(AID_VULTURE_M, "Path36", 0, ST_PERCH, 30, 0.0, 0.0, 1.0);
	Animal.FaceEntity(entVulture, entCamera);
	entBuffalo=EntGame.SpawnAnimalOnPath(AID_BUFFALO_M, "Path32", 0, ST_WPT_RUN, 5, 0.0, 0.0, 1.0);
	Animal.FaceEntity(entBuffalo, entCamera);
	Script.WaitSec(3);	
	entBuffalo=EntGame.SpawnAnimalOnPath(AID_BUFFALO_M, "Path28", 0, ST_WPT_RUN, 5, 0.0, 0.0, 1.0);
	Animal.FaceEntity(entBuffalo, entCamera);
	Script.WaitSec(2);
	entBuffalo=EntGame.SpawnAnimalOnPath(AID_BUFFALO_M, "Path28", 0, ST_WPT_RUN, 5, 0.0, 0.0, 1.0);
	Animal.FaceEntity(entBuffalo, entCamera);
	entVulture=EntGame.SpawnAnimalOnPath(AID_VULTURE_M, "Path37", 0, ST_PERCH, 1, 0.0, 0.0, 1.0);
	Animal.FaceEntity(entVulture, entCamera);	
	entBuffalo=EntGame.SpawnAnimalOnPath(AID_BUFFALO_M, "LongerPath3", 0, ST_WPT_RUN, 5, 0.0, 0.0, 1.2);
	Animal.FaceEntity(entBuffalo, entCamera);	

	end;
	
-----------------------------------------------------------------------------
-- Main entry point

Setup();
Part1();
Part2();
Part3();
Part4();




