-----------------------------------------------------------------------------
-- Site15
-----------------------------------------------------------------------------
-- PostStage

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\\Site15\\Site15.ini", "","","");
    EntGame.CreatePlayerEntities();
	
	-- do any setup that is specifically for testing.
	if (EntGame.TestingLevels()) then
		Testing();
		end;
		
    EntGame.SetGlobalDustColorInitial(.5, 1, 1, 1);
    EntGame.SetGlobalDustColorFinal  (0.0, 1, 1, 1);  
    
	EntGame.SetStageTimer(180);
	
	EntGame.LoadAnimal(AID_GOOSE);
	EntGame.LoadAnimal(AID_BIGHORN_SHEEP_M);
	EntGame.LoadAnimal(AID_BIGHORN_SHEEP_F);
	EntGame.LoadAnimal(AID_BISON);
	EntGame.LoadAnimal(AID_WOLF);

	-- 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");
	
	-- setup tournament logic    
    EntGame.StagePrepare();           

    -- show the scene from the intro camera
    EntGame.BindCameraToEntity("IntroCamera");
    
    -- tell the game the world has loaded
    Entity.GameEventPre(Game.GetRootEntity(), GE_WORLDLOADED, 0);	

    -- wait until the intro dialog is dispatched
    while (EntGame.GetFlag(GF_READYTOSTART) == false) do
        Script.WaitFrame(1);
        end;

    -- do a fade out        
    FadeOut();
    Script.WaitSec(0.5);   
    
    end;
    
----------------------------------------------------------------------------------
function Intro()        

	EntGame.PlaySong("Music\\KnifeFight.ogg");

    -- set the camera to a cool spot, then fade in
    EntGame.BindCameraToEntity("CountdownCamera3");
    FadeIn();    
    Script.WaitSec(1.0); 
    
    -- "3"
    Entity.GameEventPre(Game.GetRootEntity(), SSK1_COUNTDOWN_3, 0);   
    Script.WaitSec(1.0);
    
    entBighorn=EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M, "Path0", 0, ST_GRAZING, 2+5, 0, 0, 1.0);
	Animal.FaceEntity(entBighorn, entCamWptBB);
	a = EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_F, "Path0", 0, ST_GRAZING, 2.5+5, 4, 2, 1.2);

	entBighorn=EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M, "Path3", 0, ST_GRAZING, 3+5, 0, 0, 1.0);
	Animal.FaceEntity(entBighorn, entCamWptLL);
	a = EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_F, "Path3", 0, ST_GRAZING, 4+5, -6, -3, 1.0);

	EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M, "Path0", 1, ST_GRAZING, 2+5, 0, 0, 1.0);
	EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_F, "Path0", 1, ST_GRAZING, 1.25+5, -2, -6, 1.0);
	entGoose=EntGame.SpawnAnimalOnPath(AID_GOOSE, "LongPath1", 0, ST_WPT_FLY, 5, 0, 0, gooseSpeed);
	Animal.FaceEntity(entGoose, entCamWptLL);
	entGoose=EntGame.SpawnAnimalOnPath(AID_GOOSE, "Path00", 0, ST_WPT_FLY, 40, 0, 0, gooseSpeed);
	Animal.FaceEntity(entGoose, entCamWptAA);

    -- "2"
    Entity.GameEventPre(Game.GetRootEntity(), SSK1_COUNTDOWN_2, 0); 
    EntGame.BindCameraToEntity("CountdownCamera2");  
    Script.WaitSec(1.0);
      
    -- "1"
    Entity.GameEventPre(Game.GetRootEntity(), SSK1_COUNTDOWN_1, 0);   
    EntGame.BindCameraToEntity("CountdownCamera1");
    Script.WaitSec(1.0);
    
    -- "HUNT!"  
    entCamera = Entity.FindName(entRoot, "MainCamera");
    EntGame.BindCameraToEntity(entCamera);    
    Camera.JumpToWaypoint(entCamera, "CamWptAA");
    Camera.SetSpeed(entCamera, 0.0, 0.01);    
    EntGame.BindInputToEntity("Player1");  
    Entity.GameEventPre(Game.GetRootEntity(), SSK1_COUNTDOWN_HUNT, 0);     
    Entity.GameEventPre(Game.GetRootEntity(), SSK1_START, 0);
 
    end;
	
-----------------------------------------------------------------------------
-- Use this function for overriding various game parameters (i.e. weapon availability, etc.)
function Testing()
    EntGame.SetPlayerWeapon(0, WS_PISTOL, 	    WID_PISTOL_4);
	EntGame.SetPlayerWeapon(0, WS_SINGLE_RIFLE, WID_SINGLE_RIFLE_4);
    EntGame.SetPlayerWeapon(0, WS_SHOTGUN,	    WID_SHOTGUN_3);	
	EntGame.SetPlayerWeapon(0, WS_AUTO_RIFLE, 	WID_AUTO_RIFLE_3);	
	EntGame.SetPlayerWeapon(0, WS_BOW, 		    WID_BOW_2);
	EntGame.ResetWeaponIcons();
	end;
	
-----------------------------------------------------------------------------
gooseSpeed = 0.5

function Part1()

	Script.WaitSec(4);
	
	--POWERUP
	entBighorn=EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M, "Path1", 0, ST_WPT_RUN, 0, 0.0, 0.0, 1.0);
	Animal.FaceEntity(entBighorn, entCamera);
	EntGame.CreateAnimalPowerUp(entBighorn, PID_WILEY_VISION_50);
	
	Script.WaitSec(.5);
	entBighorn=EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_F, "Path1", 0, ST_WPT_RUN, 0, 0.0, -2.0, 1.0);
	Animal.FaceEntity(entBighorn, entCamera);
	Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M, "Path1", 0, ST_WPT_RUN, 0, 4, -4, 1.0);
	Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_F, "Path1", 0, ST_WPT_RUN, 0, 1, -1, 1.0);
	Script.WaitSec(1.5);
	entBighorn=EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M, "Path2", 0, ST_WPT_RUN, 0, 0.0, 0.0, 1.0);
	Animal.FaceEntity(entBighorn, entCamera);
	Script.WaitSec(2);
	entBighorn=EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M, "Path5", 0, ST_WPT_RUN, 0, 0.0, 0.0, 1.0);
	Animal.FaceEntity(entBighorn, entCamera);
	Script.WaitSec(.25);
	entBighorn=EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_F, "Path5", 0, ST_WPT_RUN, 0, -2.0, 0.0, 1.0);
	Animal.FaceEntity(entBighorn, entCamera);
	Script.WaitSec(.75);
	entBighorn=EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M, "Path4", 0, ST_WPT_RUN, 0, 0.0, 0.0, 1.0);
	Animal.FaceEntity(entBighorn, entCamera);
	Script.WaitSec(1);
	entBighorn=EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_F, "Path15", 0, ST_WPT_RUN, 0, 0.0, 3.0, 1.0);
	Animal.FaceEntity(entBighorn, entCamera);
	Script.WaitSec(.5);
	entBighorn=EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M, "Path15", 0, ST_WPT_RUN, 0, -1.0, 4.5, 1.0);
	Animal.FaceEntity(entBighorn, entCamera);
	Script.WaitSec(.5);
	entBighorn=EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_F, "Path15", 0, ST_WPT_RUN, 0, 2, -2.0, 1.0);
	Animal.FaceEntity(entBighorn, entCamera);
	Script.WaitSec(1);
	entBighorn=EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_F, "Path15", 0, ST_WPT_RUN, 0, -2, 2.0, 1.0);
	Animal.FaceEntity(entBighorn, entCamera);
	Script.WaitSec(3.5);
	entBighorn=EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_F, "Path1", 0, ST_WPT_RUN, 0, 0.0, 0.0, 1.0);
	Animal.FaceEntity(entBighorn, entCamera);
	Script.WaitSec(.5);
	entBighorn=EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M, "Path1", 0, ST_WPT_RUN, 0, 0.0, -2.0, 1.0);
	Animal.FaceEntity(entBighorn, entCamera);
	Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_F, "Path1", 0, ST_WPT_RUN, 0, -4, 4, 1.0);
	Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M, "Path1", 0, ST_WPT_RUN, 0, -1, 1, 1.0);
	
	end;
-----------------------------------------------------------------------------
function Part2()

	--Camera.JumpToWaypoint(entCamera, "CamWptAA");
    --Camera.SetSpeed(entCamera, 0.0, 0.01); 
	
	Camera.SetSpeed(entCamera, 2.5, 0.1);
	
	Script.WaitSec(5);
	
	--POWERUP
	entBighorn=EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M, "Path2", 0, ST_WPT_RUN, 0, -.5, .5, 1.3);
	Animal.FaceEntity(entBighorn, entCamera);
	EntGame.CreateAnimalPowerUp(entBighorn, PID_3X_SCORE);
	
	Script.WaitSec(.25);
	entBighorn=EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_F, "Path2", 0, ST_WPT_RUN, 0, 1.0, 0.0, 1.3);
	Animal.FaceEntity(entBighorn, entCamera);
	
	Script.WaitSec(2);
	
	EntGame.SpawnAnimalOnPath(AID_GOOSE, "BunnyPath1", 0, ST_WPT_FLY, 0, 0, 0, gooseSpeed);
	Script.WaitSec(.75);
	EntGame.SpawnAnimalOnPath(AID_GOOSE, "BunnyPath2", 0, ST_WPT_FLY, 0, 0, 0, gooseSpeed);
	Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_GOOSE, "BunnyPath3", 0, ST_WPT_FLY, 0, 0, 0, gooseSpeed);
	Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_GOOSE, "BunnyPath4", 0, ST_WPT_FLY, 0, 0, 0, gooseSpeed);
	Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "BunnyPath3", 0, -2, -1.25, -3, gooseSpeed);
	Script.WaitSec(1.0);	
		
	--PREDATOR #1	
	entWolf=EntGame.SpawnAnimalOnPath(AID_WOLF, "BunnyPath3", 0, ST_WPT_RUN, 0, 0.0, 0.0, 1.0);
	Animal.FaceEntity(entWolf, entCamera);
	Animal.SetAutoChargeDist(entWolf, 30);	
	Animal.SetAttackType(entWolf, ATK_STRAFE);
	Animal.SetStrafeAttackDist(entWolf, 6);
	Animal.SetStrafeAttackDelay(entWolf, .5);
	Animal.SetPostAttackRand(entWolf, false);
	Animal.SetPostAttackDir(entWolf, 90);
	
	Script.WaitSec(1.0);
	
	EntGame.SpawnBirdOnPath(AID_GOOSE, "BunnyPath7", 0, 0, 0, 0, 0.6);
	Script.WaitSec(1);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "BunnyPath5", 0, 0, 0, 0, 0.6);
	Script.WaitSec(1);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "BunnyPath6", 0, 0, 0, 0, 0.6);
	Script.WaitSec(3);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "BunnyPath6", 0, 0, 0, 0, 0.6);
	Script.WaitSec(2.5);
	entBighorn=EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M, "Path8", 0, ST_WPT_RUN, 0, 0.0, 0.0, 1.0);
	Animal.FaceEntity(entBighorn, entCamera);
	Script.WaitSec(.5);
	entBighorn=EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_F, "Path8", 0, ST_WPT_RUN, 0, 0.0, .5, 1.0);
	Animal.FaceEntity(entBighorn, entCamera);
	Script.WaitSec(1.5);
	entBighorn=EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M, "Path8", 0, ST_WPT_RUN, 0, 0.0, 2.5, 1.5);
	Animal.FaceEntity(entBighorn, entCamera);
	entWolf=EntGame.SpawnAnimalOnPath(AID_WOLF, "LongPath2", 0, ST_WPT_RUN, 0, 2, -3, 1.0);
	Animal.FaceEntity(entWolf, entCamera);
	Script.WaitSec(4);
	entBighorn=EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_F, "Path7", 0, ST_WPT_RUN, 0, 0.0, 0.0, 1.2);
	Animal.FaceEntity(entBighorn, entCamera);
	Script.WaitSec(1);
	
	--POWERUP
	entBighorn=EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M, "Path7", 0, ST_WPT_RUN, 0, 0.0, 0.0, 1.0);
	Animal.FaceEntity(entBighorn, entCamera);
	EntGame.CreateAnimalPowerUp(entBighorn, PID_WILEY_VISION_50);
	
	entWolf=EntGame.SpawnAnimalOnPath(AID_WOLF, "LongPath2", 0, ST_WPT_RUN, 0, 0.0, 0.0, 1.3);
	Animal.FaceEntity(entWolf, entCamera);
	Script.WaitSec(.25);
	entBighorn=EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_F, "Path7", 0, ST_WPT_RUN, 0, 0.0, -1.5, 1.0);
	Animal.FaceEntity(entBighorn, entCamera);
	Script.WaitSec(1.75);

	entBighorn=EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M, "LongPath3", 0, ST_WPT_RUN, 0, 0.0, 0.0, .8);
	Animal.FaceEntity(entBighorn, entCamera);
	Script.WaitSec(.5);
	entBighorn=EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_F, "LongPath3", 0, ST_WPT_RUN, 0, -2, 0.0, .5);
	Animal.FaceEntity(entBighorn, entCamera);
	Script.WaitSec(3);
	
	entBighorn=EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M, "Path7", 0, ST_WPT_RUN, 0, 0.0, 0.0, 1.0);
	Animal.FaceEntity(entBighorn, entCamera);
	Entity.SetName(entBighorn, "A");
	Script.WaitSec(1);
	entBighorn=EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M, "LongPath3", 0, ST_WPT_RUN, 0, 3, 2, .7);
	Animal.FaceEntity(entBighorn, entCamera);
	Entity.SetName(entBighorn, "B");
	Script.WaitSec(3);	
	EntGame.SpawnBirdOnPath(AID_GOOSE, "BunnyPath7", 0, 0, 0, 0, 0.6);
	Script.WaitSec(1);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "BunnyPath5", 0, 0, 0, 0, 0.6);
	Script.WaitSec(1);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "BunnyPath6", 0, 0, 0, 0, 0.6);
	Script.WaitSec(3);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "BunnyPath6", 0, 0, 0, 0, 0.6);
	Script.WaitSec(1);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "BunnyPath7", 0, 0, 0, 0, 0.6);
	Script.WaitSec(1);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "BunnyPath5", 0, 0, 0, 0, 0.6);
	Script.WaitSec(1);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "BunnyPath6", 0, 0, 0, 0, 0.6);
	Script.WaitSec(3);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "BunnyPath6", 0, 0, 0, 0, 0.6);
	Script.WaitSec(5);

	EntGame.SpawnBirdOnPath(AID_GOOSE, "BunnyPath5", 0, 0, 0, 0, 0.6);
	Script.WaitSec(3);

	--POWERUP
	entBighorn=EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M, "Path11", 0, ST_GRAZING, 4, 0.0, 0.0, 1.0);
	Animal.FaceEntity(entBighorn, entCamWptBB);
	EntGame.CreateAnimalPowerUp(entBighorn, PID_BODY_ARMOR_50);
	Entity.SetName(entBighorn, "C");	

	entBighorn=EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M, "Path11", 0, ST_GRAZING, 3, -4, 8, 1.0);
	Animal.FaceEntity(entBighorn, entCamWptBB);
	Entity.SetName(entBighorn, "D");
	
	entBighorn=EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M, "Path10", 0, ST_WPT_RUN, 0, -3, 2.5, 1.0);
	Animal.FaceEntity(entBighorn, entCamWptFF);
	Entity.SetName(entBighorn, "EE");
	
	Script.WaitSec(1);
	entBighorn=EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M, "Path10", 0, ST_WPT_RUN, 0, 0, 0, 1.0);
	Animal.FaceEntity(entBighorn, entCamWptFF);
	Entity.SetName(entBighorn, "E");
	
	Script.WaitSec(2);

	Camera.SetTiltOffset(entCamera, -5, 1.0);
	
	Script.WaitSec(2);
	
	entBighorn=EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M, "Path10", 0, ST_WPT_RUN, 0, 2, 6, 1.0);
	Animal.FaceEntity(entBighorn, entCamWptFF);
	Entity.SetName(entBighorn, "EEE");
	
	Camera.SetSpeed(entCamera, 0.0, 0.1);
	
	entBighorn=EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M, "Path10", 0, ST_WPT_RUN, 0, 0.0, 0.0, 1.0);
	Animal.FaceEntity(entBighorn, entCamera);
	Entity.SetName(entBighorn, "G");
	Script.WaitSec(1);
	entBighorn=EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_F, "Path10", 0, ST_WPT_RUN, 0, -1, -2, 1.0);
	Animal.FaceEntity(entBighorn, entCamera);
	Entity.SetName(entBighorn, "H");
	EntGame.SpawnAnimalOnPath(AID_GOOSE, "Path10", 0, ST_WPT_FLY, 0, 0.0, 0.0, 1.0);
	Script.WaitSec(1);
	entGoose=EntGame.SpawnAnimalOnPath(AID_GOOSE, "LongPath4", 0, ST_WPT_FLY, 0, 0.0, -2, gooseSpeed);
	Script.WaitSec(1);
	EntGame.SpawnAnimalOnPath(AID_GOOSE, "Path10", 0, ST_WPT_FLY, 0, -3, -5, gooseSpeed);
	EntGame.SpawnAnimalOnPath(AID_GOOSE, "LongPath5", 0, ST_WPT_FLY, 0, 0.0, 0.0, gooseSpeed);
	Script.WaitSec(1);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "LongPath4", 0, 0, 2, 3, gooseSpeed);
	Script.WaitSec(1);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "LongPath5", 0, 0, 0, 1.2, gooseSpeed);
	Script.WaitSec(1);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "LongPath4", 0, 0, -2, -.5, gooseSpeed);
	Script.WaitSec(1);
	entBighorn = EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M, "Path10", 0, ST_WPT_RUN, 0, -.5, -2.5, 1.4);
	Entity.SetName(entBighorn, "I");
	Script.WaitSec(1);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "LongPath5", 0, 0, -1.5, -.5, gooseSpeed);
	
	--Camera Turn Right
	Camera.SetPanOffset(entCamera, 15, 1.0);
	Script.WaitSec(4);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "Path10", 0, 2, .5, -1, gooseSpeed);
	
	entWolf=EntGame.SpawnAnimalOnPath(AID_WOLF, "Path13", 0, ST_WPT_RUN, 0, 4, 4, .6);
	Animal.FaceEntity(entWolf, entCamera);
	Entity.SetName(entWolf, "Animal9");
	entWolf=EntGame.SpawnAnimalOnPath(AID_WOLF, "Path13", 0, ST_WPT_RUN, 0, -6, 3, .6);
	Animal.FaceEntity(entWolf, entCamera);
	Entity.SetName(entWolf, "Animal10");
	
	Script.WaitSec(2);	
	
	--Camera Turn Left
	Camera.SetPanOffset(entCamera, 0, 1.0);
	Script.WaitSec(4);

	--PREDATOR #2	
	entWolf=EntGame.SpawnAnimalOnPath(AID_WOLF, "Path13", 0, ST_WPT_RUN, 0, 0.0, 0.0, .5);
	Animal.FaceEntity(entWolf, entCamera);
	Animal.SetAutoChargeDist(entWolf, 35);	
	Animal.SetAttackType(entWolf, ATK_STRAFE);
	Animal.SetStrafeAttackDist(entWolf, 8);
	Animal.SetStrafeAttackDelay(entWolf, .5);
	Animal.SetPostAttackRand(entWolf, false);
	Animal.SetPostAttackDir(entWolf, 90);
	Entity.SetName(entWolf, "Animal8");	
	
	Script.WaitSec(4);
	
	--Start Moving
	Camera.SetTiltOffset(entCamera, 0, 1.0);
	Camera.SetSpeed(entCamera, 5.0, 0.1);

	Script.WaitSec(3);
	a = EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M, "BunnyPath8", 0, ST_WPT_RUN, 0, 0, 0, .8);
	Entity.SetName(a, "Animal2");
	Script.WaitSec(1);
	a = EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M, "BunnyPath9", 0, ST_WPT_RUN, 0, 0, 0, .8);
	Entity.SetName(a, "Animal1");
	Script.WaitSec(.5);
	a = EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_F, "BunnyPath8", 0, ST_WPT_RUN, 0, 0, -1, .8);
	Entity.SetName(a, "Animal3");
	Script.WaitSec(3);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "BunnyPath13", 0, 0, 0, 0, 1);
	Script.WaitSec(1.5);
	
	Gone("Animal8");
	Gone("Animal9");
	Gone("Animal10");
	
	a = EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_F, "BunnyPath10", 0, ST_WPT_RUN, 0, 0, 0, .8);
	Entity.SetName(a, "Animal4");
	EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_F, "BunnyPath11", 0, ST_WPT_RUN, 0, 0, 0, .8);
	a = Entity.SetName(a, "Animal5");
	Script.WaitSec(.5);
	
	--POWERUP
	a = EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M, "BunnyPath10", 0, ST_WPT_RUN, 0, 0, 0, .8);
	EntGame.CreateAnimalPowerUp(a, 	PID_3X_FIRE_RATE);
	Entity.SetName(a, "Animal6");

	EntGame.SpawnBirdOnPath(AID_GOOSE, "BunnyPath12", 0, 0, 0, 0, 1);
	Script.WaitSec(1.5);

	a = EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M, "BunnyPath11", 0, ST_WPT_RUN, 0, 0, 0, .8);
	Entity.SetName(a, "Animal7");
	Script.WaitSec(3);
	
	end;
-----------------------------------------------------------------------------
function Part3()
		
	--PREDATOR #3	
	entBison=EntGame.SpawnAnimalOnPath(AID_BISON, "Path20", 0, ST_WPT_RUN, 0, 0.0, 0.0, 1.0);
	Animal.FaceEntity(entBison, entCamera);
	Animal.SetAutoChargeDist(entBison, 20);
	Animal.SetAttackType(entBison, ATK_STRAFE);
	Animal.SetStrafeAttackDist(entBison, 9.5);
	Animal.SetStrafeAttackDelay(entBison, .5);	
	Animal.SetPostAttackRand(entBison, false);
	Animal.SetPostAttackDir(entBison, -90);	

	Script.WaitSec(2);
	
	entBison=EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M, "Path21", 0, ST_WPT_RUN, 0, 1.5, 0.0, .3);
	Animal.FaceEntity(entBison, entCamera);
	entBison=EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M, "Path22", 0, ST_GRAZING, 2, -1.5, 0.0, .3);
	Animal.FaceEntity(entBison, entCamera);
	entBison=EntGame.SpawnAnimalOnPath(AID_WOLF, "Path25", 0, ST_GRAZING, 8, 2.0, 0.0, 1.0);
	Animal.FaceEntity(entBison, entCamera);
	entBison=EntGame.SpawnAnimalOnPath(AID_WOLF, "Path26", 0, ST_GRAZING, 16, 2.0, 1.0, 1.0);
	Animal.FaceEntity(entBison, entCamera);

	Gone("Animal1");
	Gone("Animal2");
	Gone("Animal3");
	
	Script.WaitSec(1.5);
	entBison=EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_F, "Path21", 0, ST_WPT_RUN, 0, 2.5, 0.0, .2);
	Animal.FaceEntity(entBison, entCamera);	
	Script.WaitSec(1.5);
	entBison=EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M, "Path22", 0, ST_GRAZING, 2, 0, 0.0, .2);
	Animal.FaceEntity(entBison, entCamera);
	
	Gone("Animal4");
	Gone("Animal5");
	Gone("Animal6");
	Gone("Animal7");
	
	entBison=EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M, "Path27", 0, ST_GRAZING, 12, 2.0, 0.0, 1.0);
	
	entGoose=EntGame.SpawnAnimalOnPath(AID_GOOSE, "Path34", 0, ST_WPT_FLY, 13, 0.0, 0.0, gooseSpeed);
	Animal.FaceEntity(entGoose, entCamera);
	
	Script.WaitSec(5);
	
	--POWERUP
	Goose = EntGame.SpawnBirdOnPath(AID_GOOSE, "Path35", 0, 0, -2, 0, 0.5);
	EntGame.CreateAnimalPowerUp(Goose, PID_WILEY_VISION_100);
	
	EntGame.SpawnBirdOnPath(AID_GOOSE, "Path36", 0, 0, -2, 0, 0.5);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "Path37", 0, 0, -2, 0, 0.5);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "Path38", 0, 0, -2, 0, 0.5);
	
	Script.WaitSec(7);
	
	end;
-----------------------------------------------------------------------------
function Part4()

	--Camera.JumpToWaypoint(entCamera, "CamWptGG");
    --Camera.SetSpeed(entCamera, 0.0, 0.007); 
	
	Camera.StopAtWaypoint(entCamera, "entCamWptGG");
	Camera.SetSpeed(entCamera, 0.0, 0.1);
	
	entBison=EntGame.SpawnAnimalOnPath(AID_WOLF, "Path28", 0, ST_WPT_RUN, 5, -6, 0.0, .5);
	Animal.FaceEntity(entBison, entCamera);
	Script.WaitSec(1);
	entBison=EntGame.SpawnAnimalOnPath(AID_WOLF, "Path28", 0, ST_WPT_RUN, 5, -10, 0.0, .5);
	Animal.FaceEntity(entBison, entCamera);	
	Script.WaitSec(1);
	entBison=EntGame.SpawnAnimalOnPath(AID_WOLF, "Path28", 0, ST_WPT_RUN, 5, -8, 0.0, .5);
	Animal.FaceEntity(entBison, entCamera);
	Script.WaitSec(1);
	entBison=EntGame.SpawnAnimalOnPath(AID_WOLF, "Path28", 0, ST_WPT_RUN, 5, -10, 0.0, .5);
	Animal.FaceEntity(entBison, entCamera);	
	Script.WaitSec(1);
	entBison=EntGame.SpawnAnimalOnPath(AID_WOLF, "Path28", 0, ST_WPT_RUN, 5, -6, 0.0, .5);
	Animal.FaceEntity(entBison, entCamera);
	Script.WaitSec(2);
	entBison=EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_F, "Path28", 0, ST_WPT_RUN, 5, -10, 0.0, .5);
	Animal.FaceEntity(entBison, entCamera);	
	
	EntGame.SpawnBirdOnPath(AID_GOOSE, "Path38", 0, 0, -2, 0, 0.5);

	entBison=EntGame.SpawnAnimalOnPath(AID_BISON, "LongPath6", 0, ST_WPT_RUN, 5, 2, 0.0, 1.0);
	Animal.FaceEntity(entBison, entCamera);
	Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "Path38", 0, 0, 0, 0, 0.5);
	Script.WaitSec(1);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "Path38", 0, 0, 1, 0, 0.5);
	
	entBison=EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M, "Path28", 0, ST_WPT_RUN, 5, -8, 0.0, .5);
	Animal.FaceEntity(entBison, entCamera);	
	Script.WaitSec(1.5);
	
	entBison=EntGame.SpawnAnimalOnPath(AID_BISON, "LongerPath3", 0, ST_WPT_RUN, 5, 0.0, 0.0, 1.2);
	Animal.FaceEntity(entBison, entCamera);
	Script.WaitSec(3);
	entBison=EntGame.SpawnAnimalOnPath(AID_BISON, "LongerPath1", 0, ST_WPT_RUN, 5, 0.0, 0.0, 1.0);
	Animal.FaceEntity(entBison, entCamera);
	Script.WaitSec(3);

	--PREDATOR #4
	entBison=EntGame.SpawnAnimalOnPath(AID_BISON, "Path29", 0, ST_WPT_RUN, 5, 0.0, -5, 1.0);
	Animal.FaceEntity(entBison, entCamera);
	Animal.SetAutoChargeDist(entBison, 15);	
	Animal.SetAttackType(entBison, ATK_STRAFE);
	Animal.SetStrafeAttackDist(entBison, 7.5);
	Animal.SetStrafeAttackDelay(entBison, .5);
	Animal.SetPostAttackRand(entBison, false);
	Animal.SetPostAttackDir(entBison, 90);	
	
	Script.WaitSec(3);
	
	EntGame.SpawnBirdOnPath(AID_GOOSE, "Path38", 0, 0, -2, 0, 0.5);

	entBison=EntGame.SpawnAnimalOnPath(AID_BISON, "Path30", 0, ST_WPT_RUN, 5, -8, 0.0, 1.0);
	Animal.FaceEntity(entBison, entCamera);
	Script.WaitSec(1.5);
	
	EntGame.SpawnBirdOnPath(AID_GOOSE, "Path38", 0, 0, 0, 0, 0.5);	
	Script.WaitSec(1.5);
	
	--POWERUP
	entBison=EntGame.SpawnAnimalOnPath(AID_BISON, "Path33", 0, ST_WPT_RUN, 5, 0.0, 0.0, 1.0);
	EntGame.CreateAnimalPowerUp(entBison, PID_10X_MAGAZINE);
	Animal.FaceEntity(entBison, entCamera);
	
	Script.WaitSec(3);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "Path35", 0, 0, -2, 0, 0.5);
	Script.WaitSec(3);
	entBison=EntGame.SpawnAnimalOnPath(AID_BISON, "Path31", 0, ST_WPT_RUN, 5, 0.0, 0.0, 1.0);
	Animal.FaceEntity(entBison, entCamera);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "Path38", 0, 0, -2, 0, 0.5);
	Script.WaitSec(3);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "Path36", 0, 0, 0, 0, 0.5);
	entBison=EntGame.SpawnAnimalOnPath(AID_BISON, "Path32", 0, ST_WPT_RUN, 5, 0.0, 0.0, 1.0);
	Animal.FaceEntity(entBison, entCamera);
	Script.WaitSec(1.5);

	entBison=EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M, "Path28", 0, ST_WPT_RUN, 5, -6, 0.0, .5);
	Animal.FaceEntity(entBison, entCamera);
	Script.WaitSec(1.5);
	entBison=EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_F, "Path28", 0, ST_WPT_RUN, 5, -6, 0.0, .5);
	Animal.FaceEntity(entBison, entCamera);
	Script.WaitSec(1);
	
	--PREDATOR #5
	entBison=EntGame.SpawnAnimalOnPath(AID_BISON, "Path29", 0, ST_WPT_RUN, 5, 0.0, -5, 1.0);
	Animal.FaceEntity(entBison, entCamera);
	Animal.SetAutoChargeDist(entBison, 15);	
	Animal.SetAttackType(entBison, ATK_STRAFE);
	Animal.SetStrafeAttackDist(entBison, 7.5);
	Animal.SetStrafeAttackDelay(entBison, .5);
	Animal.SetPostAttackRand(entBison, false);
	Animal.SetPostAttackDir(entBison, 90);		
	
	Script.WaitSec(1);
	
	EntGame.SpawnBirdOnPath(AID_GOOSE, "Path36", 0, 0, 2, 0, 0.5);
	entBison=EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M, "Path28", 0, ST_WPT_RUN, 5, -5, 0.0, .5);
	Animal.FaceEntity(entBison, entCamera);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "Path37", 0, 0, 0, 0, 0.5);
	entBison=EntGame.SpawnAnimalOnPath(AID_BISON, "LongerPath3", 0, ST_WPT_RUN, 5, 0.0, 0.0, 1.2);
	Animal.FaceEntity(entBison, entCamera);	
    entBison=EntGame.SpawnAnimalOnPath(AID_BISON, "Path31", 0, ST_WPT_RUN, 5, 0.0, 0.0, 1.0);
	Animal.FaceEntity(entBison, entCamera);
	Script.WaitSec(2);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "Path36", 0, 0, 0, 0, 0.5);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "Path37", 0, 0, 0, 0, 0.5);
	Script.WaitSec(1.5);	
	EntGame.SpawnBirdOnPath(AID_GOOSE, "Path36", 0, 0, 0, 0, 0.5);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "Path37", 0, 0, 0, 0, 0.5);	
	Script.WaitSec(1);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "Path36", 0, 0, 0, 0, 0.5);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "Path37", 0, 0, 0, 0, 0.5);	
	
	end;
	
-----------------------------------------------------------------------------
-- Main entry point

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




