-----------------------------------------------------------------------------
-- Site 17
-----------------------------------------------------------------------------

function PostStage()
    
    EntGame.EnablePlayerControl(false);
    EntGame.ClearFlag(GF_READYTOSTART);
    EntGame.BindCameraToEntity("IntroCamera");
      
    end;    
    
-----------------------------------------------------------------------------    
-- Setup

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

    -- load world
    SetupWorld("Maps\\Site17\\Site17.ini", "","","");
    EntGame.CreatePlayerEntities();
    
    EntGame.SetGlobalDustColorInitial(.8, 0.65, .55, .45);
    EntGame.SetGlobalDustColorFinal  (0.0, 0.65, .55, .45);

    EntGame.SetStageTimer(200);
    
    EntGame.LoadAnimal(AID_ELK_F);
    EntGame.LoadAnimal(AID_ELK_M);
    EntGame.LoadAnimal(AID_BIGHORN_SHEEP_M);
    EntGame.LoadAnimal(AID_BIGHORN_SHEEP_F);
    EntGame.LoadAnimal(AID_BLACK_BEAR);	
    EntGame.LoadAnimal(AID_GOOSE);
    EntGame.LoadAnimal(AID_HARLEQUINN);
    EntGame.LoadAnimal(AID_SALMON);
	
      -- 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\\TheMovement.ogg");	        

    -- while the scene is black, change the view
    -- grab the camera
    entCamera = Entity.FindName(entRoot, "MainCamera");
    -- show the scene from the camera view
    EntGame.BindCameraToEntity(entCamera);    
    
    -- set up initial player position and animals
	Camera.JumpToWaypoint(entCamera, "CamWptAA");
    Camera.SetSpeed(entCamera, 0.0, 0.01);    
	
    -- 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);
    
    -- "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.1);    
    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_4);	
	EntGame.SetPlayerWeapon(0, WS_AUTO_RIFLE, 	WID_AUTO_RIFLE_4);	
	EntGame.SetPlayerWeapon(0, WS_BOW, 		    WID_BOW_2);
	EntGame.ResetWeaponIcons();
	end;
	
-----------------------------------------------------------------------------

function Part1()

	-- Get pointer to camera that boat is following.
	entBoatCamera = Entity.FindName(entRoot, "BoatCamera");
	if (entBoatCamera) then
	    Camera.JumpToWaypoint(entBoatCamera, "BoatWptEE");
	    end;

	--[[ Second object
	-- Get pointer to camera that boat is following.
	entBoatCamera2 = Entity.FindName(entRoot, "BoatCamera2");
	if (entBoatCamera2) then
	    Camera.JumpToWaypoint(entBoatCamera2, "BoatWptBB");
	    end;
	--]]
	
	EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M, "BunnyPath1", 0, ST_WPT_RUN, 0, 1.5, 0, 1);
	Script.WaitSec(1);
	EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_F, "BunnyPath1", 0, ST_WPT_RUN, 0, 0, 0, 1);
	Script.WaitSec(1);
	EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M, "BunnyPath1", 0, ST_WPT_RUN, 0, 1.5, 0, 1);
	Script.WaitSec(.5);
    Script.WaitSec(1);
    EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M, "BunnyPath1", 0, ST_WPT_RUN, 0, -1, 0, 1); 
    Script.WaitSec(3);
    a2=EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M, "BunnyPath3", 0, ST_WPT_RUN, 0, -1, -1, .8);
    Animal.FaceEntity(a2, entCamera);
    Script.WaitSec(1.5);
    EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M, "BunnyPath2", 0, ST_WPT_RUN, 0, 1, -2, 1);
    Script.WaitSec(2);
    EntGame.SpawnAnimalOnPath(AID_ELK_M, "BunnyPath4", 0, ST_WPT_RUN, 0, 2.5, 2, 1);
    EntGame.SpawnAnimalOnPath(AID_ELK_F, "BunnyPath4", 0, ST_WPT_RUN, 0, -2, -2, .8);
    Script.WaitSec(2.5);
    EntGame.SpawnAnimalOnPath(AID_ELK_M, "BunnyPath4", 0, ST_WPT_RUN, 0, 3, 3, 1);
	
    Script.WaitSec(.5);
    EntGame.SpawnAnimalOnPath(AID_ELK_F, "BunnyPath4", 0, ST_WPT_RUN, 0, 0, 0, 1);
    Script.WaitSec(.5);
	
	--POWERUP
    Elk = EntGame.SpawnAnimalOnPath(AID_ELK_M, "BunnyPath5", 0, ST_WPT_RUN, 0, 1.5, 0, 1);
	EntGame.CreateAnimalPowerUp(Elk, PID_4X_MAGAZINE);
	
    Script.WaitSec(1.5);
    EntGame.SpawnAnimalOnPath(AID_BLACK_BEAR,  "BunnyPath6", 0, ST_WPT_RUN, 0, -1, 0, .3);
    Script.WaitSec(2);
	
	--PREDATOR #1
    Rhino2=EntGame.SpawnAnimalOnPath(AID_BLACK_BEAR,  "BunnyPath6", 0, ST_WPT_RUN, 0, 4.5, 0, .5);
    Animal.SetChargeWhenShot(Rhino2, true); 	
    Animal.SetAttackType(Rhino2, ATK_STATIC);
	Animal.SetStaticAttackDist(Rhino2, 3.75);
	Animal.SetStaticAttackDelay(Rhino2, 1.75);	
	Animal.SetAttackRepeat(Rhino2, 2);    
	Animal.SetPostAttackRand(Rhino2, false);
	Animal.SetPostAttackDir(Rhino2, 90);	
	
    Script.WaitSec(2.5);
    EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M,  "BunnyPath3", 0, ST_WPT_RUN, 0, 0, 0, 1);
    EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_F,  "BunnyPath2", 0, ST_WPT_RUN, 0, 2, 0, 1);
    Script.WaitSec(3);
    EntGame.SpawnAnimalOnPath(AID_ELK_M, "BunnyPath1", 0, ST_WPT_RUN, 0, -1, 0, 1); 
    EntGame.SpawnAnimalOnPath(AID_ELK_M, "BunnyPath2", 0, ST_WPT_RUN, 0, 2, 0, 1);
    EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M,  "BunnyPath3", 0, ST_WPT_RUN, 0, 1.5, 0, 1);
    Script.WaitSec(2.5);
    a3=EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M,  "BunnyPath3", 0, ST_WPT_RUN, 0, -1, 0, 1);
    Animal.FaceEntity(a3, entCamera);
    EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_F,  "BunnyPath3", 0, ST_WPT_RUN, 0, 2, 1.5, 1);
    EntGame.SpawnAnimalOnPath(AID_ELK_F,  "BunnyPath6", 0, ST_WPT_RUN, 0, 0, -1, 1);
    Script.WaitSec(.5);
    EntGame.SpawnAnimalOnPath(AID_ELK_M,  "BunnyPath6", 0, ST_WPT_RUN, 0, 2, 0, 1);
    Script.WaitSec(2.5);
    EntGame.SpawnAnimalOnPath(AID_ELK_M,  "BunnyPath5", 0, ST_WPT_RUN, 0, 1.5, 0, 1);
    Script.WaitSec(.5);
    EntGame.SpawnAnimalOnPath(AID_ELK_F,  "BunnyPath5", 0, ST_WPT_RUN, 0, 1, 0, .9);
    Script.WaitSec(3);
	
	--POWERUP
    Elk = EntGame.SpawnAnimalOnPath(AID_ELK_M,  "BunnyPath4", 0, ST_WPT_RUN, 0, 2, -1, 1);
	EntGame.CreateAnimalPowerUp(Elk, PID_WILEY_VISION_100);
	
    Script.WaitSec(1);
    
    EntGame.SpawnBirdOnPath(AID_GOOSE, "BunnyPath7", 0, 0, -1, 0, 1.2);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "BunnyPath7", 0, -3.5, -.5, -3, 1.2);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "BunnyPath7", 0, 2, 0, 0, 1.2);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "BunnyPath7", 0, 4, .5, -4, 1.2);
    Script.WaitSec(1.5);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "BunnyPath7", 0, 1.5, -2, 0, 1.2);
    Script.WaitSec(1);
    EntGame.SpawnAnimalOnPath(AID_ELK_M,  "BunnyPath6", 0, ST_WPT_RUN, 0, 0, 0, 1);
    Script.WaitSec(.5);
    EntGame.SpawnAnimalOnPath(AID_ELK_M,  "BunnyPath6", 0, ST_WPT_RUN, 0, 1.5, 0, 1);
    Script.WaitSec(.5);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "BunnyPath7", 0, 0, -1, 0, 1.2);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "BunnyPath7", 0, -3.5, -.5, -3, 1.2);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "BunnyPath7", 0, 2, 0, 0, 1.2);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "BunnyPath7", 0, 4, .5, -4, 1.2);
    EntGame.SpawnAnimalOnPath(AID_ELK_M,  "BunnyPath6", 0, ST_WPT_RUN, 0, 2, 0, 1);
    Script.WaitSec(2.5);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "BunnyPath7", 0, 1.5, -2, 0, 1.2);
    
    Script.WaitSec(3.0); --TIME TO BLAST WHATEVER LIVES.
    
    Camera.StopAtWaypoint(entCamera, "CamWptEE");
    Camera.SetSpeed(entCamera, 3.0, 0.001); 
    
    Script.WaitSec(2.5);
    EntGame.SpawnAnimalOnPath(AID_ELK_M, "BunnyPath8", 0, ST_WPT_RUN, 0, 0, 0, 1);
    EntGame.SpawnAnimalOnPath(AID_ELK_F, "BunnyPath8", 0, ST_WPT_RUN, 0, -2, -2, 1);
    EntGame.SpawnAnimalOnPath(AID_ELK_M, "BunnyPath8", 0, ST_WPT_RUN, 0, 2.5, 2, .7);
    Script.WaitSec(3);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "BunnyPath11", 0, 0, 0, 0, 1.2);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "BunnyPath11", 0, 3.5, 2, -2, 1.2);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "BunnyPath11", 0, 2, -2, 2, 1.2);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "BunnyPath11", 0, -4, -1, 0, 1.3);
    Script.WaitSec(.5);
    EntGame.SpawnAnimalOnPath(AID_ELK_F, "BunnyPath14", 0, ST_WPT_RUN, 0, 0, 0, 1);
    EntGame.SpawnAnimalOnPath(AID_ELK_M, "BunnyPath14", 0, ST_WPT_RUN, 0, 2.5, 2.5, 1);
    EntGame.SpawnAnimalOnPath(AID_ELK_M, "BunnyPath14", 0, ST_WPT_RUN, 0, -2.5, -3, 1);
    Script.WaitSec(1.5);
    
	--POWERUP
    Goose = EntGame.SpawnBirdOnPath(AID_GOOSE, "LongerPath12", 0, 0, -1, 0, 1.0);
	EntGame.CreateAnimalPowerUp(Goose, PID_2X_SCORE);
	
    EntGame.SpawnBirdOnPath(AID_GOOSE, "LongerPath12", 0, 4, .5, -4, 1.0);
    
    
    EntGame.SpawnAnimalOnPath(AID_ELK_M, "BunnyPath8", 0, ST_WPT_RUN, 0, 1.5, 1.5, 1);
    EntGame.SpawnAnimalOnPath(AID_ELK_M, "BunnyPath8", 0, ST_WPT_RUN, 0, -2, -2, 1);
    Script.WaitSec(2);
    
    EntGame.SpawnBirdOnPath(AID_GOOSE, "LongerPath12", 0, -3.5, -.5, -3, 1.0);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "LongerPath12", 0, 2, 0, 0, 1.0);
    
    Script.WaitSec(1.5);
    
    EntGame.SpawnBirdOnPath(AID_GOOSE, "LongerPath12", 0, 0, -1, 0, 1.0);
    Script.WaitSec(1);
    
    EntGame.SpawnBirdOnPath(AID_GOOSE, "LongerPath12", 0, 0, 0, 0, 1.2);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "LongerPath12", 0, 3.5, 2, -2, 1.2);
    
    EntGame.SpawnAnimalOnPath(AID_ELK_M, "BunnyPath13", 0, ST_WPT_RUN, 0, 1, 0, 1);
    EntGame.SpawnAnimalOnPath(AID_ELK_M, "BunnyPath13", 0, ST_WPT_RUN, 0, 2.5, -2, 1);
    EntGame.SpawnAnimalOnPath(AID_ELK_F, "BunnyPath13", 0, ST_WPT_RUN, 0, -2.5, -3, 1);
    Script.WaitSec(2.5);
     
    EntGame.SpawnBirdOnPath(AID_GOOSE, "LongerPath12", 0, 2, 4, 2, 1.2);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "LongerPath12", 0, -4, 0, 0, 1.3);
     
    Script.WaitSec(3.0);
    EntGame.SpawnAnimalOnPath(AID_ELK_F, "BunnyPath12", 0, ST_WPT_RUN, 0, 0, 0, 1);
    EntGame.SpawnAnimalOnPath(AID_ELK_M, "BunnyPath12", 0, ST_WPT_RUN, 0, 1.5, 1.5, 1);
    Script.WaitSec(1.5);
    EntGame.SpawnAnimalOnPath(AID_ELK_M, "BunnyPath12", 0, ST_WPT_RUN, 0, -3, -3, 1);
    EntGame.SpawnAnimalOnPath(AID_ELK_F, "BunnyPath12", 0, ST_WPT_RUN, 0, 2.5, 2, 1);
    EntGame.SpawnAnimalOnPath(AID_ELK_M, "BunnyPath12", 0, ST_WPT_RUN, 0, -1, 0, .9);
    
    Script.WaitSec(7.5); --Travel Time 
          	    		  
    end;    

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

function Part2()
	
	Script.WaitSec(1.5);
	EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_F,  "BunnyPath15", 0, ST_WPT_RUN, 0, 0, 1, .8);
	
	--POWERUP
    Sheep = EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M,  "BunnyPath15", 0, ST_WPT_RUN, 0, 0, 2, .7);
	EntGame.CreateAnimalPowerUp(Sheep, PID_4X_FIRE_RATE);
	
    EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M,  "BunnyPath15", 0, ST_WPT_RUN, 0, 0, -2, 1);
    Script.WaitSec(3);
    EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M,  "BunnyPath15", 0, ST_WPT_RUN, 0, 0, 0, 1);
	Script.WaitSec(1.5);
	EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_F,  "BunnyPath16", 0, ST_WPT_RUN, 0, 0, -2, .8);
    EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M,  "BunnyPath16", 0, ST_WPT_RUN, 0, 1, 1, 1);
    Script.WaitSec(2.5);
    EntGame.SpawnAnimalOnPath(AID_HARLEQUINN, "BunnyPath17", 0, ST_WPT_FLY, 0,0,0,1.0);
    Script.WaitSec(1.5);
    EntGame.SpawnAnimalOnPath(AID_HARLEQUINN, "BunnyPath18", 0, ST_WPT_FLY, 0,0,0,1.0);
    Script.WaitSec(.5);
    EntGame.SpawnAnimalOnPath(AID_HARLEQUINN, "BunnyPath18", 0, ST_WPT_FLY, 0,-1.3,4,1.0);
    Script.WaitSec(1);
	
	--POWERUP
    Duck = EntGame.SpawnAnimalOnPath(AID_HARLEQUINN, "BunnyPath17", 0, ST_WPT_FLY, 0,0,0,1.0);
	EntGame.CreateAnimalPowerUp(Duck, PID_WILEY_VISION_100);
	
    Script.WaitSec(1);
    EntGame.SpawnAnimalOnPath(AID_HARLEQUINN, "BunnyPath18", 0, ST_WPT_FLY, 0,-1.3,4,1.0);
    Script.WaitSec(1);
    EntGame.SpawnAnimalOnPath(AID_HARLEQUINN, "BunnyPath17", 0, ST_WPT_FLY, 0,0,0,1.0);
    Script.WaitSec(1);
    EntGame.SpawnAnimalOnPath(AID_HARLEQUINN, "BunnyPath17", 0, ST_WPT_FLY, 0,0,0,1.0);
    Script.WaitSec(5); --Travel Time   
	
    end;    

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

function Part3()

	Camera.StopAtWaypoint(entCamera, "CamWptHH");
    Camera.SetSpeed(entCamera, 3.0, 0.1);
    
    Script.WaitSec(2);
	EntGame.SpawnAnimalOnPath(AID_HARLEQUINN, "BunnyPath19", 0, ST_WPT_FLY, 0,0,0,1.0);
	Script.WaitSec(1);
	EntGame.SpawnAnimalOnPath(AID_HARLEQUINN, "BunnyPath19", 0, ST_WPT_FLY, 0,0,0,1.0);
	Script.WaitSec(2);
	EntGame.SpawnAnimalOnPath(AID_HARLEQUINN, "BunnyPath19", 0, ST_WPT_FLY, 0,0,0,1.0);
	Script.WaitSec(1);
    EntGame.SpawnAnimalOnPath(AID_ELK_M,   "BunnyPath20", 0, ST_WPT_RUN, 0, 0, 0, 1);
    Script.WaitSec(.5);
    EntGame.SpawnAnimalOnPath(AID_ELK_F,   "BunnyPath20", 0, ST_WPT_RUN, 0, 1, 2, .7);
    EntGame.SpawnAnimalOnPath(AID_ELK_M,   "BunnyPath20", 0, ST_WPT_RUN, 0, 0, 1, 1);
    Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_HARLEQUINN, "BunnyPath19", 0, ST_WPT_FLY, 0,0,0,1.0);
	Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_HARLEQUINN, "BunnyPath19", 0, ST_WPT_FLY, 0,0,0,1.0);
	Script.WaitSec(1.5);
	EntGame.SpawnAnimalOnPath(AID_HARLEQUINN, "BunnyPath19", 0, ST_WPT_FLY, 0,0,0,1.0);
    Script.WaitSec(4.5);
    b = EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M,  "BunnyPath21", 0, ST_WPT_RUN, 0, 0, 1, 1);
    Animal.FaceEntity(b, entCamera);
    a = EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_F,  "BunnyPath21", 0, ST_WPT_RUN, 0, 0, 2, .7);
	Animal.FaceEntity(a, entCamera);
    Script.WaitSec(2); --Travel Time 
    c = EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M,  "BunnyPath21", 0, ST_WPT_RUN, 0, 0, 1, 1);
    Animal.FaceEntity(c, entCamera);
	Script.WaitSec(3);
	
    end;    

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

function Part4()

	--Camera.JumpToWaypoint(entCamera, "CamWptHH");
    --Camera.SetSpeed(entCamera, 0.0, 0.007);  
	
    Camera.StopAtWaypoint(entCamera, "CamWptJJ");
    Camera.SetSpeed(entCamera, 3.0, 0.1);
    
    EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M,  "BunnyPath22", 0, ST_WPT_RUN, 0, 0, 2, .7);	
    Script.WaitSec(1.5);
    EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_F,  "BunnyPath22", 0, ST_WPT_RUN, 0, 0, -1, 1);

    EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M,  "BunnyPath22", 0, ST_WPT_RUN, 0, 1.5, -2, 1);
    Script.WaitSec(2.5);
	
	--POWERUP
    Sheep = EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M,  "BunnyPath23", 0, ST_WPT_RUN, 0, 0, -1, 1);
	EntGame.CreateAnimalPowerUp(Sheep, PID_3X_SCORE);
	
    EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_F,  "BunnyPath23", 0, ST_WPT_RUN, 0, 0, 2, .9);
    Script.WaitSec(1.5);
    EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M,  "BunnyPath23", 0, ST_WPT_RUN, 0, 0, -2, .9);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "BunnyPath24", 0, 0, 0, 0, 1.2);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "BunnyPath24", 0, 3.5, 2, -2, 1.2);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "BunnyPath24", 0, -4, -1, 0, 1.3);
    Script.WaitSec(1);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "BunnyPath24", 0, 0, 0, 0, 1.2);
    Script.WaitSec(8.5);
    EntGame.SpawnAnimalOnPath(AID_HARLEQUINN, "BunnyPath25", 0, ST_WPT_FLY, 0,0,0,1.0);
    Script.WaitSec(.5);
    EntGame.SpawnAnimalOnPath(AID_HARLEQUINN, "BunnyPath26", 0, ST_WPT_FLY, 0,0,0,1.0);
    Script.WaitSec(2);          

	  
    end;    

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

function Part5()

	--Camera.JumpToWaypoint(entCamera, "CamWptJJ");
    --Camera.SetSpeed(entCamera, 0.0, 0.007);  
	
	Script.WaitSec(.5);
    EntGame.SpawnAnimalOnPath(AID_HARLEQUINN, "BunnyPath25", 0, ST_WPT_FLY, 0,0,0,1.0);
    Script.WaitSec(.5);
    EntGame.SpawnAnimalOnPath(AID_HARLEQUINN, "BunnyPath26", 0, ST_WPT_FLY, 0,0,0,1.0);
    Script.WaitSec(1);
    EntGame.SpawnAnimalOnPath(AID_HARLEQUINN, "BunnyPath25", 0, ST_WPT_FLY, 0,0,0,1.0);
    Script.WaitSec(.5);
    EntGame.SpawnAnimalOnPath(AID_HARLEQUINN, "BunnyPath26", 0, ST_WPT_FLY, 0,0,0,1.0);
    
    Script.WaitSec(5); 
    
    Camera.StopAtWaypoint(entCamera, "CamWptLL");
    Camera.SetSpeed(entCamera, 3.0, 0.1);
    
	Script.WaitSec(1);
	
	Camera.SetTiltOffset(entCamera, -50, 2);
	
    Script.WaitSec(1);
    EntGame.SpawnAnimalOnPath(AID_ELK_M,   "BunnyPath27", 0, ST_WPT_RUN, 0, 0, 1, 1);
    Script.WaitSec(1.5);
    EntGame.SpawnAnimalOnPath(AID_ELK_F,   "BunnyPath27", 0, ST_WPT_RUN, 0, -2, 1, .9);
	Camera.SetTiltOffset(entCamera, 0, 2);
    Script.WaitSec(.5);
	
    EntGame.SpawnAnimalOnPath(AID_ELK_M,   "BunnyPath27", 0, ST_WPT_RUN, 0, 1, 2, .7);
    Script.WaitSec(1.5);
    EntGame.SpawnAnimalOnPath(AID_ELK_M,  "BunnyPath28", 0, ST_WPT_RUN, 0, 1, 0, 1);
    Script.WaitSec(.5);
    EntGame.SpawnAnimalOnPath(AID_ELK_F,  "BunnyPath28", 0, ST_WPT_RUN, 0, -2.5, -3, 1);
    Script.WaitSec(1.5);
    EntGame.SpawnAnimalOnPath(AID_ELK_M,  "BunnyPath28", 0, ST_WPT_RUN, 0, -2, -2, 1);
    Script.WaitSec(1.5);
    EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_F,   "BunnyPath29", 0, ST_WPT_RUN, 0, -1, 1, .9);
	
	--POWERUP
    Sheep = EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M,   "BunnyPath29", 0, ST_WPT_RUN, 0, 0, -1, 1);
	EntGame.CreateAnimalPowerUp(Sheep, PID_4X_RELOAD_RATE);
	
    Script.WaitSec(.5);
    EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M,   "BunnyPath29", 0, ST_WPT_RUN, 0, 0, 2, .7);
    Script.WaitSec(2);
    EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M,   "BunnyPath29", 0, ST_WPT_RUN, 0, -1, 1, .7);
    EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M,   "BunnyPath29", 0, ST_WPT_RUN, 0, 0, -1, 1);
    Script.WaitSec(.5);
    EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M,   "BunnyPath30", 0, ST_WPT_RUN, 0, 1, 1, 1);
    Script.WaitSec(1.5);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "BunnyPath31", 0, 0, 0, 0, 1.2);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "BunnyPath31", 0, 3.5, 2, -2, 1.2);
    Script.WaitSec(.5);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "BunnyPath31", 0, 2, -2, 2, 1.2);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "BunnyPath31", 0, -4, -1, 0, 1.3);
    Script.WaitSec(1);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "BunnyPath31", 0, 0, 0, 0, 1.2);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "BunnyPath32", 0, 0, 0, 0, 1.2);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "BunnyPath32", 0, 3.5, 2, -2, 1.2);
    Script.WaitSec(.5);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "BunnyPath32", 0, 2, -2, 2, 1.2);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "BunnyPath32", 0, -4, -1, 0, 1.3);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "BunnyPath32", 0, 3.5, 2, -2, 1.2);
    Script.WaitSec(1);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "BunnyPath32", 0, 0, 0, 0, 1.2);
    EntGame.SpawnAnimalOnPath(AID_ELK_M,   "BunnyPath33", 0, ST_WPT_RUN, 0, 0, 0, 1);
    Script.WaitSec(.5);
    EntGame.SpawnAnimalOnPath(AID_ELK_F,   "BunnyPath33", 0, ST_WPT_RUN, 0, 1.5, 1.5, 1);
    Script.WaitSec(1.5);
    EntGame.SpawnAnimalOnPath(AID_ELK_M,   "BunnyPath33", 0, ST_WPT_RUN, 0, 2, 2, .7);
    EntGame.SpawnAnimalOnPath(AID_ELK_F,   "BunnyPath33", 0, ST_WPT_RUN, 0, 0, 0, 1);
    Script.WaitSec(1);
    EntGame.SpawnAnimalOnPath(AID_ELK_M,   "BunnyPath33", 0, ST_WPT_RUN, 0, -1, -2, .8);
    Script.WaitSec(3);
	
	--PREDATOR #2
    Bear = EntGame.SpawnAnimalOnPath(AID_BLACK_BEAR,   "BunnyPath34", 0, ST_WPT_RUN, 0, 2, 0, 1);
	Animal.SetAutoChargeDist(Bear, 6);
    Animal.SetAttackType(Bear, ATK_STATIC);
	Animal.SetStaticAttackDist(Bear, 3.75);
	Animal.SetStaticAttackDelay(Bear, 1.75);		
    Animal.SetPostAttackRand(Bear, false);
    Animal.SetPostAttackDir(Bear, 90);	
	
    Script.WaitSec(2);
    EntGame.SpawnAnimalOnPath(AID_BLACK_BEAR,   "BunnyPath35", 0, ST_WPT_RUN, 0, 4.5, 0, 1);
    Script.WaitSec(2);
    EntGame.SpawnAnimalOnPath(AID_ELK_M,  "BunnyPath36", 0, ST_WPT_RUN, 0, 1, 0, 1);
    EntGame.SpawnAnimalOnPath(AID_ELK_F,  "BunnyPath36", 0, ST_WPT_RUN, 0, 0, 0, .9);
    Script.WaitSec(.5);
    EntGame.SpawnAnimalOnPath(AID_ELK_M,  "BunnyPath36", 0, ST_WPT_RUN, 0, -2.5, -3, 1);
    Script.WaitSec(1.5);
    EntGame.SpawnAnimalOnPath(AID_ELK_M,  "BunnyPath36", 0, ST_WPT_RUN, 0, -2, -2, 1);
    Script.WaitSec(4.5);
    EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_F,   "BunnyPath37", 0, ST_WPT_RUN, 0, -1, 1, .9);
    EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M,   "BunnyPath37", 0, ST_WPT_RUN, 0, 0, -1, 1);
    Script.WaitSec(.5);
    EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M,   "BunnyPath37", 0, ST_WPT_RUN, 0, 0, 2, .7);
    Script.WaitSec(2);
    EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_M,   "BunnyPath37", 0, ST_WPT_RUN, 0, 0, -1, 1);
    Script.WaitSec(.5);
    EntGame.SpawnAnimalOnPath(AID_BIGHORN_SHEEP_F,   "BunnyPath37", 0, ST_WPT_RUN, 0, 0, 2, .9);
    Script.WaitSec(3.5);
    EntGame.SpawnAnimalOnPath(AID_ELK_F,   "BunnyPath38", 0, ST_WPT_RUN, 0, 1.5, 1.5, 1);
    Script.WaitSec(1.5);
    EntGame.SpawnAnimalOnPath(AID_ELK_M,   "BunnyPath38", 0, ST_WPT_RUN, 0, -2, -2, 1);
    EntGame.SpawnAnimalOnPath(AID_ELK_M,   "BunnyPath38", 0, ST_WPT_RUN, 0, 2.5, 2, .7);
    Script.WaitSec(.5);
    EntGame.SpawnAnimalOnPath(AID_ELK_F,   "BunnyPath38", 0, ST_WPT_RUN, 0, 0, 0, 1);
    Script.WaitSec(1);
	
	--POWERUP
    Elk = EntGame.SpawnAnimalOnPath(AID_ELK_M,   "BunnyPath38", 0, ST_WPT_RUN, 0, -1, -2, .8);
	EntGame.CreateAnimalPowerUp(Elk, PID_3X_FIRE_RATE);
	
    Script.WaitSec(1);
    EntGame.SpawnAnimalOnPath(AID_ELK_M,   "BunnyPath38", 0, ST_WPT_RUN, 0, 2.5, 2, .7);
    Script.WaitSec(1);
    EntGame.SpawnAnimalOnPath(AID_ELK_F,   "BunnyPath38", 0, ST_WPT_RUN, 0, -1, -2, .7);
  
    Script.WaitSec(3); --Travel Time 
      		  
    end;    

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

function Part6()
	
	--Camera.JumpToWaypoint(entCamera, "CamWptLL");
    --Camera.SetSpeed(entCamera, 0.0, 0.1);
    
	Script.WaitSec(1);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "BunnyPath31", 0, 0, 0, 0, 1.2);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "BunnyPath31", 0, 3.5, 2, -2, 1.2);
    Script.WaitSec(.5);
	
	--POWERUP
    Goose = EntGame.SpawnBirdOnPath(AID_GOOSE, "BunnyPath31", 0, 2, -2, 2, 1.2);
	EntGame.CreateAnimalPowerUp(Goose, PID_WILEY_VISION_100);
	
    EntGame.SpawnBirdOnPath(AID_GOOSE, "BunnyPath31", 0, -4, -1, 0, 1.3);
    Script.WaitSec(.5);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "BunnyPath31", 0, 0, 0, 0, 1.2);
	
    Camera.SetSpeed(entCamera, 3.0, 0.1); 
	Camera.StopAtWaypoint(entCamera, "CamWptMM");
	
	Script.WaitSec(1);
    EntGame.SpawnAnimalOnPath(AID_ELK_M,  "BunnyPath39", 0, ST_WPT_RUN, 0, 1, 0, 1);
    EntGame.SpawnAnimalOnPath(AID_ELK_F,  "BunnyPath39", 0, ST_WPT_RUN, 0, 3, 3, .7);
    Script.WaitSec(.5);
    EntGame.SpawnAnimalOnPath(AID_ELK_M,  "BunnyPath39", 0, ST_WPT_RUN, 0, -2.5, -3, .7);
    Script.WaitSec(1);
    EntGame.SpawnAnimalOnPath(AID_ELK_M,  "BunnyPath39", 0, ST_WPT_RUN, 0, 1.5, 1.5, 1);
    Script.WaitSec(.5);
	
	--POWERUP
    Elk = EntGame.SpawnAnimalOnPath(AID_ELK_M,  "BunnyPath39", 0, ST_WPT_RUN, 0, -2, -2, .7);
	EntGame.CreateAnimalPowerUp(Elk, PID_10X_MAGAZINE);
	
    EntGame.SpawnAnimalOnPath(AID_HARLEQUINN, "BunnyPath40", 0, ST_WPT_FLY, 0,0,0,1.0);
    Script.WaitSec(.5);
    EntGame.SpawnAnimalOnPath(AID_HARLEQUINN, "BunnyPath40", 0, ST_WPT_FLY, 0,-1.3,4,1.0);
    Script.WaitSec(1);
    EntGame.SpawnAnimalOnPath(AID_HARLEQUINN, "BunnyPath40", 0, ST_WPT_FLY, 0,0,0,1.0);
    Script.WaitSec(1);
    EntGame.SpawnAnimalOnPath(AID_GOOSE, "BunnyPath42", 0, ST_WPT_FLY, 0,-1.3,4,1.0);
    Script.WaitSec(.5);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "BunnyPath42", 0, 0, 3, 0, 1.0);
    EntGame.SpawnAnimalOnPath(AID_GOOSE, "BunnyPath42", 0, ST_WPT_FLY, 0,0,0,1.0);
    Script.WaitSec(.5);
    EntGame.SpawnAnimalOnPath(AID_GOOSE, "BunnyPath42", 0, ST_WPT_FLY, 0,-1.3,2,1.0);
    EntGame.SpawnAnimalOnPath(AID_HARLEQUINN, "BunnyPath40", 0, ST_WPT_FLY, 0,0,0,1.0);
	
    Script.WaitSec(1);
    EntGame.SpawnAnimalOnPath(AID_GOOSE, "BunnyPath42", 0, ST_WPT_FLY, 0,-1.3,4,1.0);
    EntGame.SpawnAnimalOnPath(AID_GOOSE, "BunnyPath42", 0, ST_WPT_FLY, 0,0,0,1);
    
    Script.WaitSec(1);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "BunnyPath42", 0, 0, -1.5, 0, 1.0);
    
    Script.WaitSec(1);
    
    EntGame.SpawnAnimalOnPath(AID_GOOSE, "BunnyPath42", 0, ST_WPT_FLY, 0,-1.3,4,1.0);
    EntGame.SpawnAnimalOnPath(AID_GOOSE, "BunnyPath42", 0, ST_WPT_FLY, 0,0,0,1);
    
    Script.WaitSec(1);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "BunnyPath42", 0, 0, -3, 0, 1.0);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "BunnyPath42", 0, 2, 0, 2, 1.0);
    
    Script.WaitSec(1);
    
    EntGame.SpawnBirdOnPath(AID_GOOSE, "BunnyPath42", 0, 0, -3, 0, 1.0);
    
    Script.WaitSec(1.5);
    
    EntGame.SpawnBirdOnPath(AID_GOOSE, "BunnyPath42", 0, 0, -2, 0, 1.0);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "BunnyPath42", 0, 2, -1.5, 2, 1.0);
    
    end;   
     
-----------------------------------------------------------------------------
-- Main entry point
   
Setup(); 
Intro();  
Part1();
Part2();
Part3();
Part4();
Part5(); 
Part6();