-----------------------------------------------------------------------------
-- Site 2
-----------------------------------------------------------------------------
    
-- 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\\Site2\\Site2.ini", "","","");
    EntGame.CreatePlayerEntities();

	-- Do any setup that is specifically for testing.
	if(EntGame.TestingLevels()) then
		Testing();
		end;  
		    
    EntGame.SetGlobalDustColorInitial(1.0, 0.81, .75, .55);
    EntGame.SetGlobalDustColorFinal  (0.0, 0.81, .75, .55);
    
    EntGame.SetStageTimer(180);

    EntGame.LoadAnimal(AID_BLACK_TAIL_DEER_M);
	EntGame.LoadAnimal(AID_BLACK_TAIL_DEER_F);
	EntGame.LoadAnimal(AID_GOOSE);
	EntGame.LoadAnimal(AID_WOLVERINE);
	EntGame.LoadAnimal(AID_GROUSE);
	
	-- 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;
    
    
-----------------------------------------------------------------------------    
-- Intro

function Intro()  
  
    -- start the music while the scene is black
    EntGame.PlaySong("Music\\SilverSurfer.ogg");  

    -- some initial animals to look at    
	a = EntGame.SpawnAnimalOnPath(AID_WOLVERINE, "MEDIUMPATH33", 0, ST_GRAZING, 6, 0, 0, 1);    	
	Animal.FaceEntity(a, "CountdownCamera3");
	a = EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "DecorativePath3", 0, ST_GRAZING, 6, 0, 0, 1);    
	Animal.FaceEntity(a, "CountdownCamera2");
	a = EntGame.SpawnAnimalOnPath(AID_GROUSE, "DecorativePath4", 0, ST_GRAZING, 6, 0, 0, 1);    
	Animal.FaceEntity(a, "Pine802");
	
    -- now, fade in, give the player control and turn the HUD on        
    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);    
    
	EntGame.BindInputToEntity("Player1");
	Camera.JumpToWaypoint(entCamera, "CamWptAA");
    Camera.SetSpeed(entCamera, 0.0, 0.01);          
    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_1);
	EntGame.SetPlayerWeapon(0, WS_SINGLE_RIFLE, WID_SINGLE_RIFLE_1);
	EntGame.SetPlayerWeapon(0, WS_AUTO_RIFLE, 	WID_AUTO_RIFLE_1);	

	EntGame.ResetWeaponIcons();
	end; 
    
-----------------------------------------------------------------------------

function Part1()
	
	EntGame.SpawnAnimal2(AID_BLACK_TAIL_DEER_M, "DecorativePath1", 0, ST_GRAZING, 6);
	EntGame.SpawnAnimal2(AID_BLACK_TAIL_DEER_M, "DecorativePath2", 0, ST_GRAZING, 8);
	EntGame.SpawnAnimal2(AID_BLACK_TAIL_DEER_F, "DecorativePath3", 0, ST_GRAZING, 9);
	EntGame.SpawnAnimal2(AID_BLACK_TAIL_DEER_M, "DecorativePath4", 0, ST_GRAZING, 10.5);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "SHORTPATH01", 0, ST_WPT_WALK, 4, 0, 0, .5);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "SHORTPATH02", 0, ST_WPT_WALK, 5, 0, 0, .5);
	EntGame.SpawnAnimal2(AID_BLACK_TAIL_DEER_M, "FollowPath1", 0, ST_WPT_WALK, 15);
	EntGame.SpawnAnimal2(AID_BLACK_TAIL_DEER_F, "FollowPath2", 1, ST_WPT_WALK, 14);
	EntGame.SpawnAnimal2(AID_BLACK_TAIL_DEER_M, "FollowPath3", 2, ST_WPT_WALK, 14);
	EntGame.SpawnAnimal2(AID_BLACK_TAIL_DEER_M, "FollowPath5", 1, ST_WPT_WALK, 14.0);
	EntGame.SpawnAnimal2(AID_BLACK_TAIL_DEER_M, "FollowPath6", 0, ST_WPT_WALK, 12);

	Camera.SetSpeed(entCamera, 2.0, 0.1);
	Camera.StopAtWaypoint(entCamera, "CamWptCC");

	Camera.SetTiltOffset(entCamera, -20, 4.0);
		
	Script.WaitSec(5); 
	Camera.SetTiltOffset(entCamera, 0, 3.0);
	Script.WaitSec(5);
	
	--POWERUP
	Deer = EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "FollowPath1", 0, ST_WPT_RUN, 0, 1.5, 2.5, 1);
	EntGame.CreateAnimalPowerUp(Deer, PID_2X_RELOAD_RATE);
		
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_F, "FollowPath2", 0, ST_WPT_RUN, 0, 2, 3, .3);
	Script.WaitSec(3.5);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "FollowPath3", 0, ST_WPT_RUN, 0, -7, -5, .8);
	EntGame.SpawnAnimal(AID_BLACK_TAIL_DEER_M, "FollowPath7");
	Script.WaitSec(1);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "FollowPath7", 0, ST_WPT_RUN, 0, 0, -1, .4);
	Script.WaitSec(2.0);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_F, "FollowPath7", 0, ST_WPT_RUN, 0, 0, 2, .3);
	Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_F, "FollowPath4", 0, ST_WPT_RUN, 0, 1.25, -6.5, .4);
	
	--PREDATOR ATTACK
	wolverine1 = EntGame.SpawnAnimalOnPath(AID_WOLVERINE, "MEDIUMPATH01", 0, ST_WPT_RUN, 0, 0, 0, 1);
	Entity.SetName(wolverine1, "Predator1");
	Animal.SetAutoChargeDist(wolverine1, 8);	
	Animal.SetStrafeAttackDist(wolverine1, 5);
	Animal.SetPostAttackRand(wolverine1, false);
	Animal.SetPostAttackDir(wolverine1, 90);
		
	Script.WaitSec(1);
	
	EntGame.SpawnBirdOnPath(AID_GOOSE, "SHORTPATH04", 0, 0, 2.5, 0, 1);
	Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "SHORTPATH04", 0, -4, 0, -3, .5);
	
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "FollowPath5", 0, ST_WPT_RUN, 0, 4, -5, .5);
	Script.WaitSec(2.5);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "FollowPath1", 0, ST_WPT_RUN, 0, -2.5, .5, 1);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_F, "FollowPath2", 0, ST_WPT_RUN, 0, 0, 0, .3);
	Script.WaitSec(2);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "FollowPath1", 0, ST_WPT_RUN, 0, 0, 4, 1);
	
	EntGame.SpawnBirdOnPath(AID_GOOSE, "SHORTPATH04", 0, 0, 0, 0, 1);
	Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "SHORTPATH04", 0, 0, 1.5, 0, .8);
	Script.WaitSec(1);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "SHORTPATH04", 0, 0, -3, 0, .7);
	Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "SHORTPATH04", 0, 0, 0, 0, .4);
	
	--POWERUP
	Deer = EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "FollowPath3", 0, ST_WPT_RUN, 0, 2.7, .6, .8);
	EntGame.CreateAnimalPowerUp(Deer, PID_WILEY_VISION_50);
		
	Script.WaitSec(1);
	wolverine2 = EntGame.SpawnAnimalOnPath(AID_WOLVERINE, "SHORTPATH03", 0, ST_WPT_RUN, 0, 0, 0, .3);
	Script.WaitSec(2.5);
	Deer = EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_F, "FollowPath4", 0, ST_WPT_RUN, 0, .25, -1.5, .4);
	Animal.FaceEntity(Deer, entCamera);
	Deer = EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "FollowPath5", 0, ST_WPT_RUN, 0, 2, -.5, .5);
	Animal.FaceEntity(Deer, entCamera);
	Script.WaitSec(3.5);
	Deer = EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "FollowPath7", 0, ST_WPT_RUN, 0, 0, -.5, .8);
	Animal.FaceEntity(Deer, entCamera);
	Deer = EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "FollowPath7", 0, ST_WPT_RUN, 0, 2, -2, .3);
	Animal.FaceEntity(Deer, entCamera);
	Script.WaitSec(1.5);
	Deer = EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "FollowPath7", 0, ST_WPT_RUN, 0, -3, 2, .5);
	Animal.FaceEntity(Deer, entCamera);
	
    Script.WaitSec(2); --Shooting Time
	Deer = EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "FollowPath4", 0, ST_WPT_RUN, 0, 0, 0, 1);
	Animal.FaceEntity(Deer, entCamera);
    Script.WaitSec(1.5);
	Deer = EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "FollowPath4", 0, ST_WPT_RUN, 0, 5, 0, 1);
	Animal.FaceEntity(Deer, entCamera);
	Script.WaitSec(1.5);
	
	end;
    
-----------------------------------------------------------------------------

function Part2()

	--Camera.JumpToWaypoint(entCamera, "CamWptCC");
    --Camera.SetSpeed(entCamera, 0.0, 0.007); 
	
	Camera.SetSpeed(entCamera, 1.0, 0.1);
	Camera.StopAtWaypoint(entCamera, "CamWptDD");

	Deer = EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_F, "FollowPath4", 0, ST_WPT_RUN, 0, 0, 0, 1);
	Animal.FaceEntity(Deer, entCamera);
	Script.WaitSec(1.5);
	Deer = EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "FollowPath4", 0, ST_WPT_RUN, 0, 5, 0, 1);
	Script.WaitSec(2.0);
	Deer = EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_F, "FollowPath4", 0, ST_WPT_RUN, 0, 2, 0, 1.2);
	Animal.FaceEntity(Deer, entCamera);
	
	--POWERUP
	Powerup = EntGame.SpawnBirdOnPath(AID_GOOSE, "SHORTPATH05", 0, 0, 0, 0, .3);
	EntGame.CreateAnimalPowerUp(Powerup, PID_2X_MAGAZINE);
	
	Script.WaitSec(1);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "SHORTPATH06", 0, 0, 0, 0, .4);
	
	wolverine3 = EntGame.SpawnAnimalOnPath(AID_WOLVERINE, "MEDIUMPATH02", 0, ST_WPT_RUN, 0, 0, 0, .2);
	
	Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "SHORTPATH05", 0, 0, -.5, 0, .3);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "SHORTPATH06", 0, 0, 1.5, 0, .4);
	Script.WaitSec(1);
	
	--POWERUP
	Deer = EntGame.SpawnBirdOnPath(AID_GOOSE, "SHORTPATH06", 0, 0, .5, 0, .4);
	EntGame.CreateAnimalPowerUp(Deer, PID_WILEY_VISION_50);
		
	Script.WaitSec(.5);
	
	--PREDATOR ATTACK
	wolverine4 = EntGame.SpawnAnimalOnPath(AID_WOLVERINE, "MEDIUMPATH02", 0, ST_WPT_RUN, 0, 2.5, 0, .2);
		Animal.SetChargeWhenShot(wolverine4, true);
		Animal.SetPostAttackRand(wolverine4, false);
		Animal.SetPostAttackDir(wolverine4, 90);
	
	Script.WaitSec(1.5);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "FollowPath8", 0, ST_WPT_RUN, 0, 0, 0, 1);
	Script.WaitSec(1.5);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "FollowPath9", 0, ST_WPT_RUN, 0, 0, 0, 1);
	Script.WaitSec(1.5);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_F, "FollowPath9", 0, ST_WPT_RUN, 0, 1.5, -1.5, .8);
	Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "FollowPath9", 0, ST_WPT_RUN, 0, -3, 0, 1);
	Script.WaitSec(1.0);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "FollowPath9", 0, ST_WPT_RUN, 0, 3, 0, 1);
	Script.WaitSec(1.5);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_F, "FollowPath10", 0, ST_WPT_RUN, 0, 0, 0, .3);
	
	--POWERUP
	Deer = EntGame.SpawnAnimal(AID_BLACK_TAIL_DEER_M, "FollowPath2");
	EntGame.CreateAnimalPowerUp(Deer, PID_2X_FIRE_RATE);
	
	EntGame.SpawnAnimal(AID_BLACK_TAIL_DEER_F, "FollowPath5");
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "FollowPath5", 0, ST_WPT_RUN, 0, 1.5, -6.5, .3);
	EntGame.SpawnAnimal(AID_BLACK_TAIL_DEER_M, "FollowPath4");
	
	Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "FollowPath10", 0, ST_WPT_RUN, 0, 2, 0, .3);
	Script.WaitSec(1);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "FollowPath10", 0, ST_WPT_RUN, 0, -1.5, 0, .3);
	Script.WaitSec(4);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "SHORTPATH04", 0, 0, -6, 0, 1);
	Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "SHORTPATH04", 0, 6, -8, -3, .5);
	Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "SHORTPATH04", 0, 0, -5, 0, .8);
	Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "SHORTPATH04", 0, 0, -9, 0, .7);
	Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "SHORTPATH04", 0, 0, -6, 0, .4);
	
	Script.WaitSec(3.5);

	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "FollowPath10", 0, ST_WPT_RUN, 0, 0, 0, 1);
    Script.WaitSec(1);    
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "FollowPath10", 0, ST_WPT_RUN, 0, 1.5, 0, 1);
    Script.WaitSec(1.5); 
	
	--Gone State No Longer Works (Changes to Grazing state)
	Deer1 = EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "FollowPath10", 0, ST_WPT_RUN, 0, 2.5, 0, 1);
	Entity.SetName(Deer1, "Deer1");
	Script.WaitSec(1);
	--Gone State No Longer Works (Changes to Grazing state)
	Deer2 = EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_F, "FollowPath10", 0, ST_WPT_RUN, 0, 0, 0, 1);
	Entity.SetName(Deer2, "Deer2");
	Script.WaitSec(2.5);
	
    end;
        
-----------------------------------------------------------------------------

function Part3()
	
	--Camera.JumpToWaypoint(entCamera, "CamWptDD");
    --Camera.SetSpeed(entCamera, 0.0, 0.007); 
	
	Camera.SetSpeed(entCamera, 1.0, 0.1);
	Camera.StopAtWaypoint(entCamera, "CamWptFF");
	
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_F, "FollowPath11", 0, ST_WPT_RUN, 0, 1.5, 2, .5);
	Script.WaitSec(1);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "FollowPath11", 0, ST_WPT_RUN, 0, 2, 3, .1);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "FollowPath11", 0, ST_WPT_RUN, 0, -2, -3, .5);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_F, "FollowPath11", 0, ST_WPT_RUN, 0, -5.5, 4.5, .3);
	Script.WaitSec(2);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_F, "FollowPath11", 0, ST_WPT_RUN, 0, -6.2, -5.5, .1);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "FollowPath11", 0, ST_WPT_RUN, 0, 3.5, -1, .2);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_F, "FollowPath11", 0, ST_WPT_RUN, 0, 4.8, 3.7, .1);
	Script.WaitSec(1);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "FollowPath11", 0, ST_WPT_RUN, 0, 1.3, -3.3, .2);
	
	--POWERUP
	Deer = EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "FollowPath11", 0, ST_WPT_RUN, 0, 0, -8.4, .1);	
	EntGame.CreateAnimalPowerUp(Deer, PID_1_5X_SCORE);		
	
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_F, "FollowPath11", 0, ST_WPT_RUN, 0, 4, -7.3, .2);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "FollowPath11", 0, ST_WPT_RUN, 0, -3, -10, .5);
	
	Gone("Deer1");
	Gone("Deer2");
	
    -- pan left and shoot some more
    Camera.SetPanOffset(entCamera, -40, .5);
    Script.WaitSec(4);

    -- pan back to the center
    Camera.SetPanOffset(entCamera, 0, 5);
    
    Script.WaitSec(6);
    EntGame.SpawnAnimalOnPath(AID_GROUSE, "DecorativePath5", 0, ST_WPT_RUN, 10, -2, -2, .7);
	Script.WaitSec(1);
	EntGame.SpawnAnimalOnPath(AID_GROUSE, "DecorativePath5", 0, ST_WPT_RUN, 10, 0, 0, 1);	
	EntGame.SpawnAnimalOnPath(AID_GROUSE, "DecorativePath6", 0, ST_WPT_WALK, 5, 0, 0, .5);	
	Script.WaitSec(2);
	EntGame.SpawnAnimalOnPath(AID_GROUSE, "DecorativePath9", 0, ST_WPT_WALK, 4, -3, 0, .5);	
	Script.WaitSec(2);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "DecorativePath10", 0, ST_GRAZING, 4, 0, 0, .5);
	EntGame.SpawnAnimalOnPath(AID_GROUSE, "DecorativePath6", 0, ST_WPT_WALK, 5, -5, 0, .4);
	EntGame.SpawnAnimalOnPath(AID_GROUSE, "DecorativePath9", 0, ST_WPT_WALK, 4, -5, 0, .5);	
	Script.WaitSec(1);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_F, "DecorativePath8", 0, ST_WPT_WALK, 6, 0, 0, .5);
	Script.WaitSec(1.5);
	EntGame.SpawnAnimalOnPath(AID_GROUSE, "DecorativePath9", 0, ST_WPT_WALK, 4, -3, 0, .5);	
	Script.WaitSec(1.5);
	EntGame.SpawnAnimalOnPath(AID_GROUSE, "DecorativePath7", 0, ST_WPT_WALK, 4, 0, 0, .5);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "MEDIUMPATH05", 0, ST_WPT_WALK, 6, 0, 0, 1);	
	Script.WaitSec(2);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "MEDIUMPATH05", 0, ST_WPT_WALK, 6, 0, 0, .8);
	
	--POWERUP
	Deer = EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "DecorativePath7", 0, ST_WPT_RUN, 0, 0, 0, .8);
	EntGame.CreateAnimalPowerUp(Deer, PID_2X_RELOAD_RATE);
	
	Script.WaitSec(1.0);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_F, "DecorativePath7", 0, ST_WPT_RUN, 0, 2, 0, .8);
	Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "DecorativePath7", 0, ST_WPT_RUN, 0, 3, 0, .8);
	Script.WaitSec(2);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "DecorativePath7", 0, ST_WPT_RUN, 0, 4, 0, .8);
	EntGame.SpawnAnimalOnPath(AID_GROUSE, "MEDIUMPATH04", 0, ST_WPT_WALK, 4, 0, 0, .5);
	Script.WaitSec(1.5);
	EntGame.SpawnAnimal(AID_BLACK_TAIL_DEER_M, "FollowPath12");
	EntGame.SpawnAnimalOnPath(AID_GROUSE, "MEDIUMPATH05", 0, ST_WPT_WALK, 4, 0, 0, .5);
	Script.WaitSec(4.5); 
	EntGame.SpawnAnimalOnPath(AID_GROUSE, "MEDIUMPATH04", 0, ST_WPT_WALK, 4, 3, -2, .5);
	Script.WaitSec(.5);
    EntGame.SpawnAnimal(AID_BLACK_TAIL_DEER_M, "FollowPath12");
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "FollowPath12", 0, ST_WPT_RUN, 0, -3, -10, .3);	
 
    -- pan left and shoot some more
    Camera.SetPanOffset(entCamera, -60, 1); 
  	
	EntGame.SpawnAnimalOnPath(AID_GROUSE, "MEDIUMPATH04", 0, ST_WPT_WALK, 4, 0, 0, .5);
    Script.WaitSec(5.0);
    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "FollowPath12", 0, ST_WPT_RUN, 0, 0, 0, 1);	
    
    -- pan right and shoot some more
    Camera.SetPanOffset(entCamera, 30, 1.5); 
	
	Script.WaitSec(1);
	EntGame.SpawnAnimalOnPath(AID_GROUSE, "DecorativePath9", 0, ST_WPT_RUN, 1, -1, 0, .5);	
	Script.WaitSec(1);
	EntGame.SpawnAnimalOnPath(AID_GROUSE, "DecorativePath9", 0, ST_WPT_WALK, 2, -3, 0, .5);	
	Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_GROUSE, "DecorativePath9", 0, ST_WPT_WALK, 3, -2, 0, .5);	
	Script.WaitSec(2.5);
    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_F, "FollowPath12", 0, ST_WPT_RUN, 0, -5, 0, .8);	
	
    -- pan back to the center
    Camera.SetPanOffset(entCamera, 0, 1);
	    
    end;
        
-----------------------------------------------------------------------------

function Part4() 
	  
	--Camera.JumpToWaypoint(entCamera, "CamWptFF");
    --Camera.SetSpeed(entCamera, 0.0, 0.007); 
	
	Camera.SetSpeed(entCamera, .8, 0.1);
	Camera.StopAtWaypoint(entCamera, "CamWptII");
		
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "FollowPath12", 0, ST_WPT_RUN, 0, 5, 0, .6);	
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_F, "FollowPath12", 0, ST_WPT_RUN, 0, 2, -10, .5);	
	EntGame.SpawnAnimalOnPath(AID_WOLVERINE, "MEDIUMPATH06", 0, ST_WPT_RUN, 0, -2, 0, 1);
	EntGame.SpawnAnimalOnPath(AID_GROUSE, "DecorativePath12", 0, ST_WPT_WALK, 0, 0, 0, .5);	
	Script.WaitSec(1);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "FollowPath12", 0, ST_WPT_RUN, 0, -5, -12, .8);	
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "FollowPath12", 0, ST_WPT_RUN, 0, 0, -13, .5);	
	
	--PREDATOR ATTACK
	wolverine5 = EntGame.SpawnAnimalOnPath(AID_WOLVERINE, "MEDIUMPATH06", 0, ST_WPT_RUN, 0, 0, 0, .7);
	Animal.SetAutoChargeDist(wolverine5, 8);
	Animal.FaceEntity(wolverine5, entCamera);
	Animal.SetPostAttackRand(wolverine5, false);
	Animal.SetPostAttackDir(wolverine5, -90);
			
	Script.WaitSec(5.5);
	EntGame.SpawnAnimalOnPath(AID_GROUSE, "DecorativePath13", 0, ST_WPT_WALK, 0, 5, 0, .5);
	Script.WaitSec(1);
	Camera.SetTiltOffset(entCamera, 15, 1.0);
	EntGame.SpawnAnimalOnPath(AID_GROUSE, "DecorativePath11", 0, ST_WPT_WALK, 0, 1, 0, .3);
	EntGame.SpawnAnimalOnPath(AID_GROUSE, "DecorativePath16", 0, ST_WPT_WALK, 0, 1, 0, .5);
	Script.WaitSec(1);
	
	--POWERUP
	Grouse = EntGame.SpawnAnimalOnPath(AID_GROUSE, "DecorativePath14", 0, ST_WPT_RUN, 0, 1, 0, .1);
	Animal.FaceEntity(Grouse, entCamera);
	EntGame.CreateAnimalPowerUp(Grouse, PID_WILEY_VISION_100);
			
	Script.WaitSec(1);
	
	EntGame.SpawnAnimalOnPath(AID_GROUSE, "DecorativePath16", 0, ST_WPT_WALK, 0, 1, 3, .3);
	EntGame.SpawnAnimalOnPath(AID_GROUSE, "DecorativePath15", 0, ST_WPT_RUN, 0, 1, 0, .5);
	
	Camera.SetTiltOffset(entCamera, 0, 5);

	EntGame.SpawnBirdOnPath(AID_GOOSE, "MEDIUMPATH07", 0, 0, 1, 0, .2);
	Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "MEDIUMPATH07", 0, 0, .5, 0, .2);
	Script.WaitSec(.5);
	Goose = EntGame.SpawnBirdOnPath(AID_GOOSE, "MEDIUMPATH07", 0, 0, 1, 0, .2);
	Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "MEDIUMPATH07", 0, 0, -2, 0, .2);
	Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "MEDIUMPATH07", 0, 0, 0, 0, .2);	
	Script.WaitSec(1);
	EntGame.SpawnAnimalOnPath(AID_GROUSE, "DecorativePath17", 0, ST_WPT_WALK, 0, 0, 0, .5);
	Script.WaitSec(2);
	EntGame.SpawnAnimalOnPath(AID_GROUSE, "DecorativePath18", 0, ST_WPT_RUN, 0, 0, 0, .5);
	EntGame.SpawnAnimalOnPath(AID_GROUSE, "DecorativePath17", 0, ST_WPT_WALK, 0, 0, -2, .5);
	Script.WaitSec(6.5);
	
	EntGame.SpawnAnimalOnPath(AID_WOLVERINE, "DecorativePath20", 0, ST_WPT_RUN, 0, 0, 0, 1);
	
 	Script.WaitSec(1.5);
	Deer = EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_F, "DecorativePath17", 0, ST_WPT_RUN, 0, 0, -1, .8);
		Animal.FaceEntity(Deer, entCamera);
	Script.WaitSec(2.5);

	Deer = EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "DecorativePath17", 0, ST_WPT_RUN, 0, 0, 3.5, .8);
		Animal.FaceEntity(Deer, entCamera);
	Script.WaitSec(.5);
	Deer = EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_F, "DecorativePath17", 0, ST_WPT_RUN, 0, 0, -2, .8);
		Animal.FaceEntity(Deer, entCamera);
	Script.WaitSec(1);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "SHORTPATH07", 0, 0, -1, 0, .4);
	
	--POWERUP
	Deer = EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "DecorativePath17", 0, ST_WPT_RUN, 0, 0, 0, .8);
	Animal.FaceEntity(Deer, entCamera);
	EntGame.CreateAnimalPowerUp(Deer, PID_2X_FIRE_RATE);
		
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "FollowPath12", 0, ST_WPT_RUN, 0, 5, 0, .6);	
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_F, "FollowPath12", 0, ST_WPT_RUN, 0, 2, -10, .5);	
    Script.WaitSec(1);     
	EntGame.SpawnBirdOnPath(AID_GOOSE, "SHORTPATH07", 0, 0, -2.5, 0, .4);
	Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_GROUSE, "DecorativePath17", 0, ST_WPT_WALK, 0, 0, 0, .8);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "SHORTPATH07", 0, 0, -3.5, 0, .4);
	Script.WaitSec(1);
	EntGame.SpawnAnimalOnPath(AID_GROUSE, "DecorativePath17", 0, ST_WPT_WALK, 0, 0, -2, .8);
	Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "SHORTPATH07", 0, 0, -1.5, 0, .4);  
	Script.WaitSec(2);    
	    
    end;
    
-----------------------------------------------------------------------------

function Part5()
  
	--Camera.JumpToWaypoint(entCamera, "CamWptII");
    --Camera.SetSpeed(entCamera, 0.0, 0.007);
	
	Camera.SetSpeed(entCamera, 1.0, 0.1);
	Camera.StopAtWaypoint(entCamera, "CamWptKK");
	
	--PREDATOR ATTACK
	wolverine7 = EntGame.SpawnAnimalOnPath(AID_WOLVERINE, "MEDIUMPATH08", 0, ST_WPT_RUN, 0, 0, 0, .4);
		Animal.SetChargeWhenShot(wolverine7, true);
		Animal.FaceEntity(wolverine7, entCamera);
		Animal.SetPostAttackRand(wolverine7, false);
		Animal.SetPostAttackDir(wolverine7, -90);	
		
	EntGame.SpawnAnimalOnPath(AID_GROUSE, "SHORTPATH10", 0, ST_WPT_WALK, 0, 0, 0, .5);	
	EntGame.SpawnAnimalOnPath(AID_GROUSE, "SHORTPATH08", 0, ST_WPT_WALK, 0, 0, 0, .3);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "FollowPath11", 0, ST_WPT_RUN, 0, 2, 3, .1);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "FollowPath11", 0, ST_WPT_RUN, 0, -2, -3, .5);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_F, "FollowPath11", 0, ST_WPT_RUN, 0, -5.5, 4.5, .3);
	Script.WaitSec(1);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_F, "FollowPath11", 0, ST_WPT_RUN, 0, -6.2, -5.5, .1);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "FollowPath11", 0, ST_WPT_RUN, 0, 3.5, -1, .2);
	
	Camera.SetTiltOffset(entCamera, 20, 3.0);
	
	Script.WaitSec(3);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "FollowPath11", 0, ST_WPT_RUN, 0, 1.3, -3.3, .2);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_F, "FollowPath11", 0, ST_WPT_RUN, 0, 4, -7.3, .2);
	
	--POWERUP
	Deer = EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "FollowPath11", 0, ST_WPT_RUN, 0, -3, -10, .5);
	EntGame.CreateAnimalPowerUp(Deer, PID_2X_MAGAZINE);	
	
	Script.WaitSec(1);
	EntGame.SpawnAnimalOnPath(AID_GROUSE, "SHORTPATH09", 0, ST_WPT_RUN, 0, 2, 0, .2);
	Script.WaitSec(7);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "FollowPath11", 0, ST_WPT_RUN, 0, 2, 3, .1);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_F, "FollowPath11", 0, ST_WPT_RUN, 0, -2, -3, .5);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "FollowPath11", 0, ST_WPT_RUN, 0, -5.5, 4.5, .3);   
	EntGame.SpawnBirdOnPath(AID_GOOSE, "SHORTPATH12", 0, 0, 0, 0, 1);
	Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "SHORTPATH11", 0, -2, 0, -3, .3);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "SHORTPATH12", 0, 0, 1.5, 0, .8);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "SHORTPATH12", 0, 6, -2, -3, .5);
	Script.WaitSec(1);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "SHORTPATH11", 0, -2, 0, -3, .3);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "SHORTPATH12", 0, 0, 1, 0, .8);
	Script.WaitSec(2);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "FollowPath11", 0, ST_WPT_RUN, 0, 2.3, -3.3, .2);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_F, "FollowPath11", 0, ST_WPT_RUN, 0, 4, -7.3, .2);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "FollowPath11", 0, ST_WPT_RUN, 0, -3.5, -10, .5);	
	EntGame.SpawnBirdOnPath(AID_GOOSE, "SHORTPATH11", 0, 0, 0, 0, .8);	
	Script.WaitSec(1.5);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "SHORTPATH11", 0, 0, -1, 0, .7);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "FollowPath11", 0, ST_WPT_RUN, 0, -4, 0, 1);
	Script.WaitSec(2.0);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "MEDIUMPATH09", 0, 0, 0, 0, .8);
	Script.WaitSec(1);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "MEDIUMPATH09", 0, 0, -1.5, 0, .8);
	Script.WaitSec(1);
	
	--POWERUP
	Goose = EntGame.SpawnBirdOnPath(AID_GOOSE, "MEDIUMPATH09", 0, 0, 1.5, 0, .8);
	EntGame.CreateAnimalPowerUp(Goose, PID_WILEY_VISION_100);
			
	Deer1 = EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "FollowPath13", 0, ST_WPT_RUN, 0, 0, 0, .6);
		Animal.FaceEntity(Deer1, entCamera);
	Deer2 = EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_F, "FollowPath13", 0, ST_WPT_RUN, 0, 1.5, -.5, .6);
		Animal.FaceEntity(Deer2, entCamera);
	Deer3 = EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "FollowPath13", 0, ST_WPT_RUN, 0, -1.5, -4, .5);
		Animal.FaceEntity(Deer3, entCamera);
    Script.WaitSec(1.5); 
	EntGame.SpawnBirdOnPath(AID_GOOSE, "MEDIUMPATH09", 0, 0, 1, 0, .8);
 	    
	--PREDATOR ATTACK
	wolverine8 = EntGame.SpawnAnimalOnPath(AID_WOLVERINE, "FollowPath13", 0, ST_WPT_RUN, 0, 0, 0, 1.3);
		Animal.FaceEntity(wolverine8, entCamera);
		Animal.SetAutoChargeDist(wolverine8, 8);
		Animal.SetPostAttackRand(wolverine8, false);
		Animal.SetPostAttackDir(wolverine8, 90);			
		
	Script.WaitSec(1.5);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "MEDIUMPATH09", 0, 0, 0, 0, .8); 	
	
	Camera.SetTiltOffset(entCamera, 10, .5);
		
     -- pan left and shoot some more
    Camera.SetPanOffset(entCamera, -50, 0.5);
	Camera.SetRollOffset(entCamera, -10, .5);
    
    Script.WaitSec(.5);   
	EntGame.SpawnBirdOnPath(AID_GOOSE, "MEDIUMPATH09", 0, 0, -1.5, 0, .8); 	
	Script.WaitSec(2.5);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "SHORTPATH15", 0, ST_WPT_RUN, 0, 0, 0, 1);	
 	Script.WaitSec(1);
	
    -- pan right and shoot some more
    Camera.SetPanOffset(entCamera, 5, .5);
	Camera.SetRollOffset(entCamera, 0, .5);
    
	EntGame.SpawnAnimalOnPath(AID_GROUSE, "SHORTPATH13", 0, ST_WPT_WALK, 0, 0, 0, .1);	
	EntGame.SpawnAnimalOnPath(AID_GROUSE, "SHORTPATH14", 0, ST_WPT_WALK, 0, 0, 0, .1);	
    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "FollowPath8", 1, ST_WPT_RUN, 0, 0, 0, 1);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_F, "FollowPath9", 1, ST_WPT_RUN, 0, 1.5, -.5, .8);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "FollowPath10", 1, ST_WPT_RUN, 0, 0, 0, 1);

    end;    

-----------------------------------------------------------------------------
-- Main entry point
   
Setup();   
Intro();   
Part1();   
Part2();   
Part3();   
Part4();   
Part5();