-----------------------------------------------------------------------------
-- Site 16
-----------------------------------------------------------------------------
-- PostStage

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\\Site16\\Site16.ini", "","","");
    EntGame.CreatePlayerEntities();
	
	-- do any setup that is specifically for testing.
	if (EntGame.TestingLevels()) then
		--Testing();
		end;	
    
	EntGame.SetGlobalDustColorInitial(0.0, 0.72, .58, .26);
    EntGame.SetGlobalDustColorFinal  (0.0, 0.72, .58, .26);

    EntGame.SetStageTimer(180);

    EntGame.LoadAnimal(AID_BLACK_TAIL_DEER_M);
	EntGame.LoadAnimal(AID_DALL_SHEEP_M);
	EntGame.LoadAnimal(AID_DALL_SHEEP_F);	
	EntGame.LoadAnimal(AID_MOOSE);
	EntGame.LoadAnimal(AID_COUGAR);
	EntGame.LoadAnimal(AID_GOOSE);
	
   -- 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\\SilverSurfer.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_3);	
	EntGame.SetPlayerWeapon(0, WS_AUTO_RIFLE, 	WID_AUTO_RIFLE_4);	
	EntGame.SetPlayerWeapon(0, WS_BOW, 		    WID_BOW_2);
	EntGame.ResetWeaponIcons();
	end;
	
-----------------------------------------------------------------------------

function Part1()
    
    EntGame.SpawnAnimalOnPath(AID_DALL_SHEEP_M, "MainPath1", 0, ST_WPT_RUN, 0, 0, 0, .6);
    EntGame.SpawnAnimalOnPath(AID_DALL_SHEEP_M, "Path1", 0, ST_WPT_RUN, 0, 0, 0, .5);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "LongerPath1", 0, 0, 0, 0, 1); 
    EntGame.SpawnBirdOnPath(AID_GOOSE, "LongerPath2", 0, 0, 0, 0, 1); 
    Script.WaitSec(1.5);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "LongerPath1", 0, 1, 1, 1, 1); 
    Script.WaitSec(1);
	EntGame.SpawnAnimalOnPath(AID_COUGAR, "MainPath1", 0, ST_WPT_RUN, 0, 0, 0, .5);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "LongerPath1", 0, 0, 0, 0, 1); 
    Script.WaitSec(1);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "LongerPath1", 0, -1, -1, -1, 1); 	
    EntGame.SpawnAnimalOnPath(AID_DALL_SHEEP_M, "MainPath2", 0, ST_WPT_RUN, 0, -.5, .5, .3);
    EntGame.SpawnAnimalOnPath(AID_DALL_SHEEP_F, "MainPath3", 0, ST_WPT_RUN, 0, -.5, .5, .3);
    Script.WaitSec(2.0);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "LongerPath1", 0, 0, 0, 0, 1); 
    EntGame.SpawnAnimalOnPath(AID_DALL_SHEEP_M, "MainPath2", 0, ST_WPT_RUN, 0, 0, 0, .3);
    Script.WaitSec(2.5);
    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "MainPath3", 0, ST_WPT_RUN, 0, 0, 0, .3);
    EntGame.SpawnAnimalOnPath(AID_DALL_SHEEP_M, "Path1", 0, ST_WPT_RUN, 0, 0, 0, .3);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "LongerPath2", 0, 0, 0, 0, 1);
    Script.WaitSec(2.5);
    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "MainPath2", 0, ST_WPT_RUN, 0, 1, 1, .3);
    Script.WaitSec(2.5);
	
	--POWERUP
    Sheep = EntGame.SpawnAnimalOnPath(AID_DALL_SHEEP_M, "MainPath3", 0, ST_WPT_RUN, 0, -1, -1, .3);
	EntGame.CreateAnimalPowerUp(Sheep, PID_WILEY_VISION_50);
	
    EntGame.SpawnAnimalOnPath(AID_COUGAR, "MainPath4", 0, ST_WPT_RUN, 0, 0, 0, .5);
    Script.WaitSec(2.5);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "LongerPath2", 0, .5, -2, .5, 1);	
    EntGame.SpawnAnimalOnPath(AID_DALL_SHEEP_M, "MainPath4", 0, ST_WPT_RUN, 0, 0, 0, .6);
    Script.WaitSec(1.0);
    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "MainPath1", 0, ST_WPT_RUN, 0, 0, 0, .3);
    Script.WaitSec(1.0);
    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "MainPath1", 0, ST_WPT_RUN, 0, 0, 0, .3);   
    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "MainPath2", 0, ST_WPT_RUN, 0, 0, 0, .3);  	
    Script.WaitSec(1.0);
    EntGame.SpawnAnimalOnPath(AID_DALL_SHEEP_F, "MainPath1", 0, ST_WPT_RUN, 0, 0, 0, .3);   	
    EntGame.SpawnAnimalOnPath(AID_DALL_SHEEP_M, "MainPath2", 0, ST_WPT_RUN, 0, 0, 0, .3);  	
	Script.WaitSec(8);		
    EntGame.SpawnBirdOnPath(AID_GOOSE, "MainPath7", 0, 0, 0, 0, 1);	
    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "MainPath5", 0, ST_WPT_RUN, 0, 0, 0, .3);
    	
    Script.WaitSec(1);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "MainPath7", 0, -1.5, .5, 1.5, 1);		
    Script.WaitSec(1);	
    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "MainPath5", 0, ST_WPT_RUN, 0, 0, 0, .3);
    EntGame.SpawnAnimalOnPath(AID_DALL_SHEEP_M, "MainPath6", 0, ST_WPT_RUN, 0, 0, 0, .3);	
    
    Camera.StopAtWaypoint(entCamera, "CamWptCC");
    Camera.SetSpeed(entCamera, 2.5, 0.001);
    
    Script.WaitSec(2);
    EntGame.SpawnAnimalOnPath(AID_DALL_SHEEP_M, "MainPath5", 0, ST_WPT_RUN, 0, 0, 0, .3);
    Script.WaitSec(.5);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "MainPath7", 0, 1.5, -1, -1.5, 1);		
    Script.WaitSec(.5);	
    EntGame.SpawnBirdOnPath(AID_GOOSE, "MainPath7", 0, -1.5, 0, 1.5, 1);		
    Script.WaitSec(3);
    EntGame.SpawnAnimalOnPath(AID_DALL_SHEEP_M, "MainPath5", 0, ST_WPT_RUN, 0, 0, 0, .3);
    Script.WaitSec(3);
    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "MainPath5", 0, ST_WPT_RUN, 0, 0, 0, .3);
	
    EntGame.SpawnAnimalOnPath(AID_COUGAR, "MainPath6", 0, ST_WPT_RUN, 0, 0, 0, .5); 
	
    Script.WaitSec(2);   
	
	--POWERUP
    Goose = EntGame.SpawnBirdOnPath(AID_GOOSE, "MainPath7", 0, -1.5, 0, 1.5, 1);
	EntGame.CreateAnimalPowerUp(Goose, PID_3X_SCORE);

    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "MainPath5", 0, ST_WPT_RUN, 0, 0, 0, .3);
    Script.WaitSec(1.5);
    EntGame.SpawnAnimalOnPath(AID_DALL_SHEEP_M, "MainPath5", 0, ST_WPT_RUN, 0, 0, 0, .3);	   		
    Script.WaitSec(3.5); --TRAVEL TIME
	
    --ARRIVED AT CC
    
    end;
    
-----------------------------------------------------------------------------

function Part2()

	--Camera.JumpToWaypoint(entCamera, "CamWptCC");
    --Camera.SetSpeed(entCamera, 0.0, 0.007); 
	
    EntGame.SpawnAnimalOnPath(AID_MOOSE, "MainPath12", 0, ST_WPT_RUN, 0, 0, 0, .5);
	
    EntGame.SpawnBirdOnPath(AID_GOOSE, "MainPath11", 0, -1.5, 0, 1.5, .8);
    Script.WaitSec(6);
    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "MainPath13", 0, ST_WPT_RUN, 0, 0, 0, .3);
    Script.WaitSec(1);
    EntGame.SpawnAnimalOnPath(AID_DALL_SHEEP_M, "MainPath13", 0, ST_WPT_RUN, 0, 0, 0, .3);	
    EntGame.SpawnBirdOnPath(AID_GOOSE, "MainPath11", 0, 0, .5, 0, .8);
    Script.WaitSec(1.5);
    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "MainPath14", 0, ST_WPT_RUN, 0, 0, 0, .3);	
    Script.WaitSec(1.5);
    EntGame.SpawnAnimalOnPath(AID_DALL_SHEEP_M, "MainPath12", 0, ST_WPT_RUN, 0, 0, 0, .3);
    Script.WaitSec(3);
	
	--POWERUP
	Sheep = EntGame.SpawnAnimalOnPath(AID_DALL_SHEEP_M, "MainPath12", 0, ST_WPT_RUN, 0, 0, 0, .3);
	EntGame.CreateAnimalPowerUp(Sheep, PID_3X_RELOAD_RATE);
	
	Script.WaitSec(1.5);	
	
    EntGame.SpawnBirdOnPath(AID_GOOSE, "MainPath11", 0, 0, .5, 0, .8);	
    Script.WaitSec(.5);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "MainPath11", 0, -1, -.5, -1, .8);		
    Script.WaitSec(.5);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "MainPath11", 0, 1, 1, 1, .8);
    Script.WaitSec(.5);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "MainPath11", 0, 0, .5, 0, .8);	
	
    EntGame.SpawnAnimalOnPath(AID_COUGAR, "MainPath12", 0, ST_WPT_RUN, 0, 0, 0, .5);
	
    Script.WaitSec(1.5);
    EntGame.SpawnAnimalOnPath(AID_DALL_SHEEP_M, "MainPath13", 0, ST_WPT_RUN, 0, 0, 0, .3);	
    EntGame.SpawnBirdOnPath(AID_GOOSE, "MainPath11", 0, 0, .5, 0, .8);
    Script.WaitSec(1.5);
    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "MainPath14", 0, ST_WPT_RUN, 0, 0, 0, .3);	
    Script.WaitSec(1.5);
    EntGame.SpawnAnimalOnPath(AID_DALL_SHEEP_M, "MainPath12", 0, ST_WPT_RUN, 0, 0, 0, .3);
    Script.WaitSec(1.5);
    EntGame.SpawnAnimalOnPath(AID_DALL_SHEEP_F, "MainPath13", 0, ST_WPT_RUN, 0, 0, 0, .3);	   
    
    EntGame.SpawnBirdOnPath(AID_GOOSE, "MainPath11", 0, -1, -.5, -1, .8);
    Script.WaitSec(.5);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "MainPath11", 0, 1, .5, 1, .8);
    Script.WaitSec(.5);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "MainPath11", 0, 0, 0, 0, .8);	
    Script.WaitSec(4);
    
    Camera.StopAtWaypoint(entCamera, "CamWptFF");
    Camera.SetSpeed(entCamera, 2.5, 0.001);
   
    EntGame.SpawnBirdOnPath(AID_GOOSE, "MainPath16", 0, 0, 0, 0, .8);	
	
	--POWERUP
    Moose = EntGame.SpawnAnimalOnPath(AID_MOOSE, "MainPath8", 0, ST_WPT_RUN, 0, 0, 0, .5);
	EntGame.CreateAnimalPowerUp(Moose, PID_WILEY_VISION_50);
	
    EntGame.SpawnAnimalOnPath(AID_MOOSE, "MainPath9", 0, ST_WPT_RUN, 0, 0, 0, .5);

    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "MainPath15", 0, ST_WPT_RUN, 0, 0, 0, .3);	
    Script.WaitSec(1.0);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "MainPath16", 0, 2, 2, 2, .8);		
    EntGame.SpawnAnimalOnPath(AID_DALL_SHEEP_F, "Path2", 0, ST_WPT_RUN, 0, 0, 0, .3);	
    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "Path4", 0, ST_WPT_RUN, 0, 0, 0, .3);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "MainPath16", 0, -2, -2, -2, .8);
    EntGame.SpawnAnimalOnPath(AID_DALL_SHEEP_M, "Path3", 0, ST_WPT_RUN, 0, 0, 0, .3); 
    Script.WaitSec(.5);  	
    EntGame.SpawnBirdOnPath(AID_GOOSE, "MainPath16", 0, 0, 0, 0, .8);	
    Script.WaitSec(1.0);   
    EntGame.SpawnAnimalOnPath(AID_DALL_SHEEP_M, "Path3", 0, ST_WPT_RUN, 0, 0, 0, .3);	
   	Script.WaitSec(1.5);
    EntGame.SpawnAnimalOnPath(AID_DALL_SHEEP_M, "Path2", 0, ST_WPT_RUN, 0, 0, 0, .3);	
    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "Path4", 0, ST_WPT_RUN, 0, 0, 0, .3);
	
    Script.WaitSec(1.5);  
    EntGame.SpawnBirdOnPath(AID_GOOSE, "MainPath16", 0, 0, 0, 0, .8);	 

    Script.WaitSec(1.5);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "MainPath16", 0, 0, 0, 0, .8);	
    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "Path4", 0, ST_WPT_RUN, 0, 0, 0, .3);
    Script.WaitSec(1.0);
    EntGame.SpawnAnimalOnPath(AID_DALL_SHEEP_M, "Path4", 0, ST_WPT_RUN, 0, 0, 0, .3);
    Script.WaitSec(11); --TRAVEL TIME
	EntGame.SpawnBirdOnPath(AID_GOOSE, "MainPath16", 0, 1, 1, 1, .8);	
	Script.WaitSec(1);	
		
    --ARRIVED AT FF
	
    end;
        
-----------------------------------------------------------------------------

function Part3()

	--Camera.JumpToWaypoint(entCamera, "CamWptFF");
    --Camera.SetSpeed(entCamera, 0.0, 0.007); 
    
	--PREDATOR #1
    a = EntGame.SpawnAnimalOnPath(AID_MOOSE, "MainPath17", 0, ST_WPT_RUN, 0, 0, 0, .5);
    Animal.SetChargeWhenShot(a, true);
	Animal.SetAttackType(a, ATK_STATIC);
	Animal.SetStaticAttackDist(a, 4.5);
	Animal.SetStaticAttackDelay(a, 1.0);	
	Animal.SetAttackRepeat(a, 2);
	Animal.SetPostAttackRand(a, false);
	Animal.SetPostAttackDir(a, -90);	
		
    EntGame.SpawnAnimalOnPath(AID_MOOSE, "Path5", 0, ST_WPT_RUN, 0, 0, 0, .8);
    Script.WaitSec(3);
	
    EntGame.SpawnAnimalOnPath(AID_MOOSE, "MainPath12", 0, ST_WPT_RUN, 0, -1, 2.0, .5);
    
    EntGame.SpawnBirdOnPath(AID_GOOSE, "Path7", 0, -1.5, 0, 1.5, .8);
    Script.WaitSec(.5);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "Path7", 0, 0, 0, 1.5, .8);
    Script.WaitSec(.5);
    EntGame.SpawnAnimalOnPath(AID_MOOSE, "Path5", 0, ST_WPT_RUN, 0, 0, -3, .7);	
    EntGame.SpawnBirdOnPath(AID_GOOSE, "Path7", 0, 1.5, 0, 1.5, .8);
    Script.WaitSec(2);
    EntGame.SpawnAnimalOnPath(AID_MOOSE, "Path5", 0, ST_WPT_RUN, 0, 0, 5, .6);
	
	--POWERUP
    Sheep = EntGame.SpawnAnimalOnPath(AID_DALL_SHEEP_M, "MainPath17", 0, ST_WPT_RUN, 0, 0, 0, 1);	
	EntGame.CreateAnimalPowerUp(Sheep, PID_4X_FIRE_RATE);
    Script.WaitSec(2);
    EntGame.SpawnAnimalOnPath(AID_MOOSE, "Path5", 0, ST_WPT_RUN, 0, 0, -1, .2);
    Script.WaitSec(3);
    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "MainPath18", 0, ST_WPT_RUN, 0, 0, 0, 1);
    Script.WaitSec(1);
    EntGame.SpawnAnimalOnPath(AID_DALL_SHEEP_M, "MainPath19", 0, ST_WPT_RUN, 0, 0, 0, 1);	
	
	--POWERUP
    Goose = EntGame.SpawnBirdOnPath(AID_GOOSE, "Path8", 0, 0, .5, 0, .8);
	EntGame.CreateAnimalPowerUp(Goose, PID_INFINITE_MAGAZINE);
	
    Script.WaitSec(1.5);
    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "MainPath17", 0, ST_WPT_RUN, 0, 0, 0, .8);	
    Script.WaitSec(1.5);
    EntGame.SpawnAnimalOnPath(AID_DALL_SHEEP_M, "MainPath18", 0, ST_WPT_RUN, 0, 0, 0, .8);
    Script.WaitSec(1.5);
    EntGame.SpawnAnimalOnPath(AID_DALL_SHEEP_F, "MainPath19", 0, ST_WPT_RUN, 0, 0, 0, .8);	
    Script.WaitSec(3);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "MainPath16", 0, 0, .5, 0, .8);	
    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "Path6", 0, ST_WPT_RUN, 0, 0, 1.5, .8);
    Script.WaitSec(1);
    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "Path6", 0, ST_WPT_RUN, 0, 0, -2, .8);
    Script.WaitSec(1);
    EntGame.SpawnAnimalOnPath(AID_DALL_SHEEP_M, "MainPath17", 0, ST_WPT_RUN, 0, 0, 0, 1);		
    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "Path6", 0, ST_WPT_RUN, 0, 1.5, 0, .8);
    Script.WaitSec(1);
    EntGame.SpawnAnimalOnPath(AID_DALL_SHEEP_F, "MainPath17", 0, ST_WPT_RUN, 0, 0, 0, 1);		
    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "MainPath18", 0, ST_WPT_RUN, 0, -1, 1, 1);
    Script.WaitSec(1.5);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "Path7", 0, -1, -.5, -1, .8);		
    Script.WaitSec(.5);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "Path8", 0, 1, 1, 1, .8);
    Script.WaitSec(.5);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "Path8", 0, 0, .5, 0, .8);	
    
	--PREDATOR #2
    Cougar1 = EntGame.SpawnAnimalOnPath(AID_COUGAR, "MainPath17", 0, ST_WPT_RUN, 0, 0, 0, .5);
    Animal.SetChargeWhenShot(Cougar1, true);
	Animal.SetAttackType(Cougar1, ATK_STRAFE);	
	Animal.SetStrafeAttackDist(Cougar1, 5.5);
	Animal.SetStrafeAttackDelay(Cougar1, .75);
	
    Script.WaitSec(1.5);
	
    EntGame.SpawnBirdOnPath(AID_GOOSE, "MainPath16", 0, 0, .5, 0, .8);
    Script.WaitSec(1.5);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "MainPath16", 0, 0, .5, 0, .8);	
    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "MainPath19", 0, ST_WPT_RUN, 0, 0, 0, 1);	
    Script.WaitSec(1.5);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "MainPath16", 0, 0, .5, 0, .8);    
    EntGame.SpawnAnimalOnPath(AID_DALL_SHEEP_M, "MainPath19", 0, ST_WPT_RUN, 0, 0, 0, 1);
    Script.WaitSec(1.5);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "MainPath16", 0, 0, .5, 0, .8);       
    EntGame.SpawnBirdOnPath(AID_GOOSE, "Path7", 0, -1, -.5, -1, .8);
    Script.WaitSec(.5);
	
	--POWERUP
    Goose = EntGame.SpawnBirdOnPath(AID_GOOSE, "Path7", 0, 1, .5, 1, .8);
	EntGame.CreateAnimalPowerUp(Goose, PID_WILEY_VISION_100);
	
    Script.WaitSec(.5);
    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "MainPath17", 0, ST_WPT_RUN, 0, 0, 0, 1);		
    EntGame.SpawnBirdOnPath(AID_GOOSE, "Path8", 0, 0, 0, 0, .8);	    
    Script.WaitSec(1);
    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "Path6", 0, ST_WPT_RUN, 0, 0, -2, .8);
    Script.WaitSec(1);
    EntGame.SpawnAnimalOnPath(AID_DALL_SHEEP_M, "MainPath17", 0, ST_WPT_RUN, 0, 0, 0, 1);		
    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "Path6", 0, ST_WPT_RUN, 0, 1.5, 0, .8);
    Script.WaitSec(1);
    EntGame.SpawnAnimalOnPath(AID_DALL_SHEEP_F, "MainPath17", 0, ST_WPT_RUN, 0, 0, 0, 1);		
    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "MainPath18", 0, ST_WPT_RUN, 0, -1, 1, 1);
    	
    Script.WaitSec(6); --SHOOT TIME

    EntGame.SpawnBirdOnPath(AID_GOOSE, "Path7", 0, 0, .5, 0, .8);
    Script.WaitSec(.5);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "Path7", 0, 1, -1, 0, .8);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "Path8", 0, 3, .5, 0, .8);
    Script.WaitSec(.5);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "Path8", 0, 1, 0, 0, .8);		
    EntGame.SpawnBirdOnPath(AID_GOOSE, "Path7", 0, -2, -.5, 0, .8);
    Script.WaitSec(.5);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "Path7", 0, 1.5, .5, 0, .8);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "Path8", 0, 0, 1.5, 0, .8);
    Script.WaitSec(.5);
    EntGame.SpawnBirdOnPath(AID_GOOSE, "Path8", 0, 4, 2, 0, .8);		
        
    Script.WaitSec(5);
    
    end;
       
-----------------------------------------------------------------------------

function Part4()

	--Camera.JumpToWaypoint(entCamera, "CamWptFF");
    --Camera.SetSpeed(entCamera, 0.0, 0.007); 
	
	Camera.StopAtWaypoint(entCamera, "CamWptJJ");
    Camera.SetSpeed(entCamera, 2.0, 0.001);
    
    EntGame.SpawnBirdOnPath(AID_GOOSE, "MainPath27", 0, 0, 0, 0, 1.0);
    
    a = EntGame.SpawnAnimalOnPath(AID_DALL_SHEEP_M, "MainPath26", 0, ST_WPT_RUN, 0, 0, -1, .9);
    Animal.FaceEntity(a, entCamera);
	Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "MainPath27", 0, 0, 1, 0, 1.0);
	Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "MainPath27", 0, 0, -1.5, 0, 1.0);
	Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "MainPath27", 0, 0, -.5, 0, 1.0);	
	a = EntGame.SpawnAnimalOnPath(AID_DALL_SHEEP_M, "MainPath26", 0, ST_WPT_RUN, 0, 0, 9, .6);
	Animal.FaceEntity(a, entCamera);	
	
	--PREDATOR #3
	Cougar1 = EntGame.SpawnAnimalOnPath(AID_COUGAR, "MainPath20", 0, ST_WPT_RUN, 0, 0, 0, .2); 
	Animal.SetAutoChargeDist(Cougar1, 10);	
	Animal.SetAttackType(Cougar1, ATK_STRAFE);	
	Animal.SetStrafeAttackDist(Cougar1, 7);
	Animal.SetStrafeAttackDelay(Cougar1, .75);
	
	EntGame.SpawnAnimalOnPath(AID_COUGAR, "MainPath21", 0, ST_WPT_RUN, 0, 0, 0, .2);
	Script.WaitSec(1.0); 
	
	a = EntGame.SpawnAnimalOnPath(AID_DALL_SHEEP_F, "MainPath26", 0, ST_WPT_RUN, 0, 0, 9, .6);  
	Animal.FaceEntity(a, entCamera); 
	a = EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "MainPath22", 0, ST_WPT_RUN, 0, 0, 0, .2);  
	Animal.FaceEntity(a, entCamera); 
	Script.WaitSec(1);
	
	--PREDATOR #4
	Cougar1 = EntGame.SpawnAnimalOnPath(AID_COUGAR, "MainPath20", 0, ST_WPT_RUN, 0, 0, 3, .2);
	Animal.SetAutoChargeDist(Cougar1, 10);	
	Animal.SetAttackType(Cougar1, ATK_STRAFE);
	Animal.SetStrafeAttackDist(Cougar1, 7);
	Animal.SetStrafeAttackDelay(Cougar1, .75);
	 
	Script.WaitSec(2);
	
	--POWERUP
	Goose = EntGame.SpawnBirdOnPath(AID_GOOSE, "MainPath28", 0, 0, 0, 0, 1.0);   
	EntGame.CreateAnimalPowerUp(Goose, PID_BODY_ARMOR_50);
	
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "MainPath23", 0, ST_WPT_RUN, 0, 0, 0, 1);   
 	Script.WaitSec(.5);
 	EntGame.SpawnBirdOnPath(AID_GOOSE, "MainPath28", 0, 0, -1, 0, 1.0);
 	Script.WaitSec(.5);
 	EntGame.SpawnBirdOnPath(AID_GOOSE, "MainPath28", 0, -1.5, 1.5, -1.5, 1.0);
 	Script.WaitSec(.5);	
 	EntGame.SpawnBirdOnPath(AID_GOOSE, "MainPath28", 0, 0, .5, -3.5, .8);	
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "MainPath23", 0, ST_WPT_RUN, 0, 0, 0, 1);  
 	Script.WaitSec(1.5);
 	EntGame.SpawnBirdOnPath(AID_GOOSE, "MainPath28", 0, 3, -2, 0, .7);	
 	a = EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "MainPath25", 0, ST_WPT_RUN, 0, 0, 0, 1); 
 	Animal.FaceEntity(a, entCamera); 	
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "MainPath23", 0, ST_WPT_RUN, 0, 0, 0, 1); 
	Script.WaitSec(1.0);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "MainPath28", 0, 0, -3, 0, .5);    
	a = EntGame.SpawnAnimalOnPath(AID_DALL_SHEEP_M, "MainPath25", 0, ST_WPT_RUN, 0, 0, 3.5, 1.3);  
	Animal.FaceEntity(a, entCamera);  
	Script.WaitSec(1.0);
	a = EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "MainPath25", 0, ST_WPT_RUN, 0, 0, -3.5, 1);	
	Animal.FaceEntity(a, entCamera);    
	Script.WaitSec(2.0);
	a = EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "MainPath25", 0, ST_WPT_RUN, 0, 0, 0, .6);
	Animal.FaceEntity(a, entCamera);
	a = EntGame.SpawnAnimalOnPath(AID_MOOSE, "MainPath24", 0, ST_WPT_RUN, 0, 0, 0, .2);
	Animal.FaceEntity(a, entCamera);
	Script.WaitSec(5.0);    
	a = EntGame.SpawnAnimalOnPath(AID_MOOSE, "MainPath24", 0, ST_WPT_RUN, 0, 0, 0, .2);	
	Animal.FaceEntity(a, entCamera);
	Script.WaitSec(3.0);
	
	--POWERUP
	Deer = EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "MainPath30", 0, ST_WPT_RUN, 0, 0, 0, .8);
	EntGame.CreateAnimalPowerUp(Deer, PID_5X_SCORE);
	Animal.FaceEntity(Deer, entCamera);
	
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "MainPath31", 0, ST_WPT_RUN, 0, 0, 0, .8);
	Script.WaitSec(1.0);
	EntGame.SpawnAnimalOnPath(AID_DALL_SHEEP_M, "MainPath32", 0, ST_WPT_RUN, 0, 0, 15, .8);	
	Script.WaitSec(1.0);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "MainPath31", 0, ST_WPT_RUN, 0, 0, -12, .8);
	Script.WaitSec(1.0);
	
	Deer = EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "MainPath33", 0, ST_WPT_RUN, 0, 0, 5, .8);	
	
	--PREDATOR #5
	a = EntGame.SpawnAnimalOnPath(AID_MOOSE, "MainPath29", 0, ST_WPT_RUN, 0, 0, 0, 1);	
	Animal.FaceEntity(a, entCamera);
	Animal.SetAutoChargeDist(a, 10);	
	Animal.SetAttackType(a, ATK_STRAFE);
	Animal.SetStrafeAttackDist(a, 7);
	Animal.SetStrafeAttackDelay(a, .5);
	
	EntGame.SpawnBirdOnPath(AID_GOOSE, "MainPath34", 0, 0, 0, 0, 1);
	Script.WaitSec(1);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "MainPath34", 0, 0, 1.5, 0, 1);
	Script.WaitSec(1);				
	EntGame.SpawnBirdOnPath(AID_GOOSE, "MainPath34", 0, -2, -4, -2, 1);
	Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "MainPath34", 0, 0, 1.5, 0, 1);
	Script.WaitSec(1);		
	EntGame.SpawnBirdOnPath(AID_GOOSE, "MainPath34", 0, 0, 1.5, 0, 1);
	Script.WaitSec(.5);		
	EntGame.SpawnBirdOnPath(AID_GOOSE, "MainPath34", 0, 2, 0, 2, 1);
	Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "MainPath34", 0, -2, -4, -2, 1);
	Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "MainPath34", 0, 0, 1.5, 0, 1);				
	
    end;
       
-----------------------------------------------------------------------------
-- Main entry point
   
Setup();   
Intro(); 
Part1();   
Part2();   
Part3();   
Part4(); 

