-----------------------------------------------------------------------------
-- Site 4
-----------------------------------------------------------------------------

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

	EntGame.SetStageTimer(150);
  
	EntGame.LoadAnimal(AID_WOLF);
	EntGame.LoadAnimal(AID_BLACK_TAIL_DEER_M);
	EntGame.LoadAnimal(AID_BLACK_TAIL_DEER_F);
	EntGame.LoadAnimal(AID_HARLEQUINN);
	EntGame.LoadAnimal(AID_COYOTE);
	
	-- 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");
    
    deer01 = EntGame.SpawnAnimalOnPath(AID_WOLF, "BunnyPath10", 0, ST_WPT_WALK, 5, 0, 0, 1);
    duck00 = EntGame.SpawnBirdOnPath(AID_HARLEQUINN, "LongerPath11", 0, 0, -2, 1, 1.0);
    
    -- 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");
    Camera.JumpToWaypoint(entCamera, "CamWptAA");
    Camera.SetSpeed(entCamera, 0.0, 0.01);        
    EntGame.BindCameraToEntity(entCamera);        
    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_1);
	EntGame.SetPlayerWeapon(0, WS_SINGLE_RIFLE, WID_SINGLE_RIFLE_1);
    EntGame.SetPlayerWeapon(0, WS_SHOTGUN,	    WID_SHOTGUN_1);	
	EntGame.SetPlayerWeapon(0, WS_AUTO_RIFLE, 	WID_AUTO_RIFLE_1);	
	EntGame.SetPlayerWeapon(0, WS_BOW, 		    WID_BOW_1);
	EntGame.ResetWeaponIcons();
	end;
	
-----------------------------------------------------------------------------
function Part1()
    
    EntGame.SpawnAnimalOnPath(AID_COYOTE, "LongerPath1", 1, ST_WPT_RUN, 0, 0, 0, 2.5);
    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "BunnyPath2", 1, ST_WPT_RUN, 0, 0, 0, 1.2);
	Script.WaitSec(1.5);
    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "LongerPath1", 0, ST_WPT_RUN, 0, 0, 0, .8);
    Deer = EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "Path23", 0, ST_WPT_RUN, 0, 1, 1, .6);
    Animal.FaceEntity(Deer, entCamera);
    Script.WaitSec(1.5);	
    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_F, "LongerPath2", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "BunnyPath3", 0, ST_WPT_RUN, 0, 0, 0, .7);
    Script.WaitSec(1.0);
    EntGame.SpawnBirdOnPath(AID_HARLEQUINN, "LongerPath11", 0, 0, -2, 1, 1.0);
	
    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "BunnyPath3", 0, ST_WPT_RUN, 0, 0, 0, .7);
	
    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_F, "BunnyPath2", 0, ST_WPT_RUN, 0, -1, -1, 1.2);
    Script.WaitSec(.5);
    EntGame.SpawnBirdOnPath(AID_HARLEQUINN, "LongerPath11", 0, 1, -1, 0, 1.0);
    Script.WaitSec(1);
    EntGame.SpawnBirdOnPath(AID_HARLEQUINN, "LongerPath11", 0, 0, -2, 1, 1.0);
	EntGame.SpawnAnimalOnPath(AID_COYOTE, "LongerPath2", 0, ST_WPT_RUN, 0, 0, 0, 2);
    Script.WaitSec(.5);
    EntGame.SpawnBirdOnPath(AID_HARLEQUINN, "LongerPath11", 0, -1, -3.5, 0, 1.0);
    Script.WaitSec(.5);
	
	--POWERUP
    Deer = EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "BunnyPath2", 1, ST_WPT_RUN, 0, 0, 0, .4);
	EntGame.CreateAnimalPowerUp(Deer, PID_2X_RELOAD_RATE);
	
    Script.WaitSec(2.0);
    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_F, "BunnyPath3", 0, ST_WPT_RUN, 0, 0, 0, .7);	
    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "LongerPath1", 0, ST_WPT_RUN, 0, 0, 0, .5);

    Script.WaitSec(1.5);
    a = EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "Path23", 0, ST_WPT_RUN, 0, 1, 1, .4);
    Animal.FaceEntity(a, entCamera);
    Script.WaitSec(2.5);
    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "BunnyPath2", 0, ST_WPT_RUN, 0, 0, 0, .7);
    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "BunnyPath3", 0, ST_WPT_RUN, 0, 0, 0, .7);
    Script.WaitSec(1);
	
    Duck = EntGame.SpawnBirdOnPath(AID_HARLEQUINN, "LongerPath11", 0, -1, -3, 0, 1.0);
    Script.WaitSec(1);
    EntGame.SpawnBirdOnPath(AID_HARLEQUINN, "LongerPath11", 0, 0, -4, -1, 1.0);
    Script.WaitSec(.5);
    EntGame.SpawnBirdOnPath(AID_HARLEQUINN, "LongerPath11", 0, .5, -2, -1.5, 1.0);
    Script.WaitSec(1.5);
    EntGame.SpawnBirdOnPath(AID_HARLEQUINN, "LongerPath11", 0, 0, -4, -1, 1.0);
    Script.WaitSec(1);
    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "LongerPath1", 0, ST_WPT_RUN, 0, 0, 0, .5);
	
    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "BunnyPath2", 0, ST_WPT_RUN, 0, 0, 0, .7);
    EntGame.SpawnBirdOnPath(AID_HARLEQUINN, "LongerPath11", 0, 0, -4, -1, 1.0);
    Script.WaitSec(.5);
	
	--POWERUP
    Powerup = EntGame.SpawnBirdOnPath(AID_HARLEQUINN, "LongerPath11", 0, .5, -2, -1.5, 1.0);
	EntGame.CreateAnimalPowerUp(Powerup, PID_WILEY_VISION_50);
    Script.WaitSec(1.5);
	
    a = EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_F, "Path23", 0, ST_WPT_RUN, 0, 1, 1, .7);
    Animal.FaceEntity(a, entCamera);
	
	Script.WaitSec(1);
	EntGame.SpawnAnimalOnPath(AID_COYOTE, "BunnyPath3", 0, ST_WPT_RUN, 0, 0, 0, 2.0);
    Script.WaitSec(3);
    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "LongerPath1", 1, ST_WPT_RUN, 0, 0, 0, .5);
    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_F, "LongerPath2", 0, ST_WPT_RUN, 0, 0, 0, .7);

    Script.WaitSec(2.0); 
	EntGame.SpawnAnimalOnPath(AID_COYOTE, "LongerPath2", 0, ST_WPT_RUN, 0, 0, 0, 3);
	Script.WaitSec(2.0); 
	
    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_F, "LongerPath1", 0, ST_WPT_RUN, 0, 0, 0, .4);
    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "LongerPath2", 0, ST_WPT_RUN, 0, 0, -2, .7);
	
    Script.WaitSec(1);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_F, "BunnyPath3", 0, ST_WPT_RUN, 0, 0, 0, .7);
	Script.WaitSec(1.5);
	
	--POWERUP
    Powerup = EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "BunnyPath2", 1, ST_WPT_RUN, 0, 0, 0, .4);
	EntGame.CreateAnimalPowerUp(Powerup, PID_WILEY_VISION_50);
		
    Script.WaitSec(2.5);
    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "BunnyPath2", 0, ST_WPT_RUN, 0, 0, 0, .7);

	
	--POWERUP
	Coyote = EntGame.SpawnAnimalOnPath(AID_COYOTE, "BunnyPath3", 0, ST_WPT_RUN, 0, 2, 0, 5.5);
	EntGame.CreateAnimalPowerUp(Coyote, PID_1_5X_SCORE);
	
	Script.WaitSec(1.0);
	
	EntGame.SpawnAnimalOnPath(AID_COYOTE, "BunnyPath3", 0, ST_WPT_RUN, 0, 0, 0, 6.5);
	Script.WaitSec(1);
    EntGame.SpawnAnimalOnPath(AID_COYOTE, "LongerPath1", 0, ST_WPT_RUN, 0, 0, 0, 6);
	Script.WaitSec(2);   
	EntGame.SpawnAnimalOnPath(AID_COYOTE, "BunnyPath2", 0, ST_WPT_RUN, 0, 0, 0, 5.5);
	Script.WaitSec(3); 

	--PREDATOR #1
    Wolf = EntGame.SpawnAnimalOnPath(AID_WOLF, "BunnyPath2", 0, ST_WPT_RUN, 0, 0, 0, 1.0);
    Animal.FaceEntity(Wolf, entCamera);
    Animal.SetAutoChargeDist(Wolf, 25);	
	Animal.SetAttackType(Wolf, ATK_STRAFE);
	Animal.SetStrafeAttackDist(Wolf, 7.5);
	Animal.SetStrafeAttackDelay(Wolf, 1);
	Entity.SetName(Wolf, "TroubleC");
	
    Script.WaitSec(9);
	
    Camera.SetSpeed(entCamera, 4.3, 0.2); 
    Camera.StopAtWaypoint(entCamera, "CamWptGG");
    
    Script.WaitSec(7.5);
	
	--POWERUP
    Deer = EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "Path4", 0, ST_WPT_RUN, 0, 0, 0, 1.0);	
	EntGame.CreateAnimalPowerUp(Deer, PID_2X_FIRE_RATE);
	
    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "Path3", 0, ST_WPT_RUN, 0, 0, 0, 1.5);	
    EntGame.SpawnBirdOnPath(AID_HARLEQUINN, "Path5", 0, 0, 0, 0, 1.0);	
    Script.WaitSec(1.0);
    EntGame.SpawnBirdOnPath(AID_HARLEQUINN, "Path5", 0, 0, 1.5, 2, 1.0);	
    Script.WaitSec(1.0);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "Path3", 0, ST_WPT_RUN, 0, 2, 0, 1.5);	
    EntGame.SpawnBirdOnPath(AID_HARLEQUINN, "Path5", 0, -2, 0, -1.5, 1.0);
	EntGame.SpawnAnimalOnPath(AID_COYOTE, "Path4", 0, ST_WPT_RUN, 0, 0, 0, 4);
    Script.WaitSec(.5);
    EntGame.SpawnBirdOnPath(AID_HARLEQUINN, "Path5", 0, 0, .5, 0, 1.0);
    Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "Path3", 0, ST_WPT_RUN, 0, 0, 0, 1.5);	

	--POWERUP
	Powerup = EntGame.SpawnAnimalOnPath(AID_COYOTE, "Path4", 0, ST_WPT_RUN, 0, 0, 1.5, 4);
	EntGame.CreateAnimalPowerUp(Powerup, PID_WILEY_VISION_100);
	
	Script.WaitSec(.5);
    EntGame.SpawnBirdOnPath(AID_HARLEQUINN, "Path5", 0, 1.5, .5, 2, 1.0);	
	EntGame.SpawnAnimalOnPath(AID_COYOTE, "Path4", 0, ST_WPT_RUN, 0, 0, -2.0, 5);
    Script.WaitSec(1.0); 
    EntGame.SpawnBirdOnPath(AID_HARLEQUINN, "Path5", 0, 0, -.5, 1.5, 1.0);

    Script.WaitSec(3.0);	
    
	--PREDATOR #2
    a = EntGame.SpawnAnimalOnPath(AID_WOLF, "BunnyPath5", 0, ST_WPT_RUN, 0, 0, 0, 1.5);
    Animal.FaceEntity(a, entCamera);
    Animal.SetAutoChargeDist(a, 22);	
	Animal.SetAttackType(a, ATK_STRAFE);
	Animal.SetStrafeAttackDist(a, 10);
	Animal.SetStrafeAttackDelay(a, .5);
	Animal.SetPostAttackRand(a, false);
	Animal.SetPostAttackDir(a, 50);	

    Script.WaitSec(3.5);
    
	--PREDATOR #3
    a = EntGame.SpawnAnimalOnPath(AID_WOLF, "BunnyPath5a", 0, ST_WPT_RUN, 0,0, 0, 1.2);
    Animal.FaceEntity(a, entCamera);
    Animal.SetAutoChargeDist(a, 35);
    Animal.SetAttackType(a, ATK_STRAFE);
	Animal.SetStrafeAttackDist(a, 10);
	Animal.SetStrafeAttackDelay(a, .5);
	Animal.SetPostAttackRand(a, false);
	Animal.SetPostAttackDir(a, -50);	
	
    Script.WaitSec(11.5);			
                 	    		  
    end;    

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

function Part2()

	--Camera.JumpToWaypoint(entCamera, "CamWptGG");
    --Camera.SetSpeed(entCamera, 0.0, 0.007); 
    
	Camera.SetPanOffset(entCamera, -70.0, 1.0);
    Camera.SetSpeed(entCamera, .5, 0.1); 
    Camera.StopAtWaypoint(entCamera, "CamWptHH");
    
    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "BunnyPath7", 0, ST_WPT_RUN, 0, 0, 0, 1.2);	
    Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "Path7", 0, ST_WPT_RUN, 0, 1.5, 0, .2);
	Script.WaitSec(1);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_F, "BunnyPath7", 0, ST_WPT_RUN, 0, 0, -2, 1.2);
	EntGame.SpawnAnimalOnPath(AID_COYOTE, "BunnyPath11", 0, ST_WPT_RUN, 0, 0, -2.5, 4);	
    Script.WaitSec(.5);
	
	--POWERUP
    Deer = EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "Path7", 0, ST_WPT_RUN, 0, 0, -1.5, .2);
	EntGame.CreateAnimalPowerUp(Deer, PID_BODY_ARMOR_50);
	
    Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "BunnyPath7", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "Path7", 0, ST_WPT_RUN, 0, 2, -4, .3);
    Script.WaitSec(1.0);
    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_F, "Path7", 0, ST_WPT_RUN, 0, 0, -1.5, .2);
    Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_COYOTE, "BunnyPath11", 0, ST_WPT_RUN, 0, 4, 0, 5);
    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "Path7", 0, ST_WPT_RUN, 0, -1, -4, .4);
    Script.WaitSec(1.0);
    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "Path7", 0, ST_WPT_RUN, 0, 3, -4, .3);
	
	--PREDATOR #4
    a = EntGame.SpawnAnimalOnPath(AID_WOLF, "BunnyPath11", 0, ST_WPT_RUN, 0, 0, 1.5, 1.0);
    Animal.FaceEntity(a, entCamera);
    Animal.SetAutoChargeDist(a, 10);
    Animal.SetAttackType(a, ATK_STRAFE);
	Animal.SetStrafeAttackDist(a, 6.0);
	Animal.SetStrafeAttackDelay(a, .5);
	
    Script.WaitSec(7.5);

    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "Path7", 0, ST_WPT_RUN, 0, 2, -4, .3);
    Script.WaitSec(1.0);
    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_F, "Path7", 0, ST_WPT_RUN, 0, 0, -1.5, .2);
    Script.WaitSec(.5);
    
    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "BunnyPath9", 0, ST_WPT_RUN, 0, 1.5, 0, 1.3);
    Script.WaitSec(.5);
	
	--POWERUP
    Deer = EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "BunnyPath8", 0, ST_WPT_RUN, 0, 0, -1.5, 1.1);
	EntGame.CreateAnimalPowerUp(Deer, PID_WILEY_VISION_100); 
	
    Script.WaitSec(.5);
    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_F, "BunnyPath9", 0, ST_WPT_RUN, 0, 2, -3, .9);
    Script.WaitSec(1.0);
    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_F, "BunnyPath8", 0, ST_WPT_RUN, 0, 0, -1.5, 1.1);
    Script.WaitSec(.5);
    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "BunnyPath9", 0, ST_WPT_RUN, 0, -1, -3, .9);
    Script.WaitSec(3.0);
	EntGame.SpawnAnimalOnPath(AID_COYOTE, "Path7", 0, ST_WPT_RUN, 0, 2, -2, 5);
	Script.WaitSec(3.0);	
    EntGame.SpawnAnimalOnPath(AID_COYOTE, "BunnyPath10", 0, ST_WPT_RUN, 0, 0, 1.5, 5);
    Script.WaitSec(.5);
    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_F, "Path7", 0, ST_WPT_RUN, 0, 2, -2, .3);
	Script.WaitSec(1.0);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "Path7", 0, ST_WPT_RUN, 0, 2, -2, .3);
    EntGame.SpawnAnimalOnPath(AID_COYOTE, "BunnyPath10", 0, ST_WPT_RUN, 0, 0, -2.5, 5);
    Script.WaitSec(1.0);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "Path7", 0, ST_WPT_RUN, 0, 2, -5, .3);
	EntGame.SpawnAnimalOnPath(AID_COYOTE, "BunnyPath10", 0, ST_WPT_RUN, 0, 0, 0, 5);
    Script.WaitSec(1.0);
	
    --PREDATOR 5
    a = EntGame.SpawnAnimalOnPath(AID_WOLF, "BunnyPath10", 0, ST_WPT_RUN, 0, 0, 0, 1.4);
    Animal.FaceEntity(a, entCamera);
    Animal.SetAutoChargeDist(a, 22);
    Animal.SetAttackType(a, ATK_STRAFE);
	Animal.SetStrafeAttackDist(a, 7.0);
	Animal.SetStrafeAttackDelay(a, .5);
	Animal.SetPostAttackRand(a, false);
	Animal.SetPostAttackDir(a, 90);
	Entity.SetName(a, "TroubleA");
	
    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "BunnyPath9", 0, ST_WPT_RUN, 0, 1.5, -20, 1.3);
    Script.WaitSec(1);
    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_F, "BunnyPath9", 0, ST_WPT_RUN, 0, 2, -24, .9);
    Script.WaitSec(1.5);
    EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "BunnyPath9", 0, ST_WPT_RUN, 0, -1, -24, .9);    	
    Script.WaitSec(1);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "BunnyPath8", 0, ST_WPT_RUN, 0, 0, -21.5, 1.1);
    Script.WaitSec(14);
	
    end;    

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

function Part3()

	--Camera.JumpToWaypoint(entCamera, "CamWptHH");
    --Camera.SetSpeed(entCamera, 0.0, 0.007);
	
	EntGame.SpawnAnimalOnPath(AID_COYOTE, "BunnyPath12", 0, ST_WPT_RUN, 0, 0, 0, 5);
	
	Camera.SetSpeed(entCamera, 3.0, 0.1); 
	Camera.StopAtWaypoint(entCamera, "CamWptKK");
    
	Camera.SetPanOffset(entCamera, 0.0, 1.5);

	Script.WaitSec(3);
	Duck = EntGame.SpawnBirdOnPath(AID_HARLEQUINN, "Path16", 0, 0, -6, 2, 1.5);
	Script.WaitSec(1);
	EntGame.SpawnBirdOnPath(AID_HARLEQUINN, "Path16", 0, 0, -7, 2, 1.5);
		
	b1=EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "LongerPath4", 0, ST_WPT_RUN, 0, 0, -3, 1.5);
	Animal.FaceEntity(b1, entCamera);
	EntGame.SpawnBirdOnPath(AID_HARLEQUINN, "Path15", 0, -1, -6, 0, 1.5);	
	Script.WaitSec(1.0);
	
	--POWERUP
	Duck = EntGame.SpawnBirdOnPath(AID_HARLEQUINN, "Path15", 0, -1.5, -7, 0, 1);
	EntGame.CreateAnimalPowerUp(Duck, PID_WILEY_VISION_100); 
	
	a2=EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "LongerPath5", 0, ST_WPT_RUN, 0, 0, -4, 1.4);
	Animal.FaceEntity(a2, entCamera);
	b2=EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_F, "LongerPath4", 0, ST_WPT_RUN, 0, 0, -2.5, 1.5);
	Animal.FaceEntity(b2, entCamera);	
	Script.WaitSec(1.0);
	b3=EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "LongerPath4", 0, ST_WPT_RUN, 0, 0, -2, 1.5);
	Animal.FaceEntity(b3, entCamera);		
	
	--PREDATOR #6
	d1=EntGame.SpawnAnimalOnPath(AID_WOLF, "LongerPath3", 0, ST_WPT_RUN, 0, 0, 0, 1.0);	
    Animal.SetAutoChargeDist(d1, 20);
    Animal.SetAttackType(d1, ATK_STRAFE);
	Animal.SetStrafeAttackDist(d1, 7.0);
	Animal.SetStrafeAttackDelay(d1, .5);
	Animal.SetPostAttackRand(d1, false);
	Animal.SetPostAttackDir(d1, 90);
	Entity.SetName(d1, "TroubleB");
	
	Script.WaitSec(1.0);
	EntGame.SpawnAnimalOnPath(AID_COYOTE, "Path10", 0, ST_WPT_RUN, 0, 0, 0, 5);
	a4=EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "LongerPath5", 0, ST_WPT_RUN, 0, 0, 0, 1.4);
	Animal.FaceEntity(a4, entCamera);
	b4=EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "LongerPath4", 0, ST_WPT_RUN, 0, 0, 0, 1.5);
	Animal.FaceEntity(b4, entCamera);	
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "Path9", 0, ST_WPT_WALK, 0, 0, -3, 1.0);	
	Script.WaitSec(1.5);
	a4=EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_M, "LongerPath5", 0, ST_WPT_RUN, 0, 2, 0, 1.4);
	Animal.FaceEntity(a4, entCamera);
	Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_BLACK_TAIL_DEER_F, "Path9", 0, ST_WPT_WALK, 0, 0, 0, 1.0);
	Script.WaitSec(4);	
	EntGame.SpawnAnimalOnPath(AID_COYOTE, "Path12", 0, ST_WPT_RUN, 0, 0, 0, 5);	
	Script.WaitSec(.5);
	
	--POWERUP
	Coyote=EntGame.SpawnAnimalOnPath(AID_COYOTE, "Path11", 0, ST_WPT_RUN, 0, 0, 0, 5);	
	EntGame.CreateAnimalPowerUp(Coyote, PID_1_5X_SCORE);	
	
	Script.WaitSec(3);
	EntGame.SpawnBirdOnPath(AID_HARLEQUINN, "Path24", 0, 0, -2, 0, 1.2);
	EntGame.SpawnAnimalOnPath(AID_COYOTE, "Path11", 0, ST_WPT_RUN, 0, 0, 0, 5);	
	
	Script.WaitSec(1);
	EntGame.SpawnBirdOnPath(AID_HARLEQUINN, "Path24", 0, 0, -2.5, -1, 1.2);
	Script.WaitSec(.5);

	EntGame.SpawnBirdOnPath(AID_HARLEQUINN, "Path24", 0, 1, -.5, 0, 1.2);
	Script.WaitSec(1.0);
	EntGame.SpawnBirdOnPath(AID_HARLEQUINN, "Path24", 0, 0, -1.5, 0, 1.2);	
	Script.WaitSec(1.0);
	EntGame.SpawnBirdOnPath(AID_HARLEQUINN, "BunnyPath13", 0, -1, -1.5, 0, 1.5);
	Script.WaitSec(.5);	
	EntGame.SpawnBirdOnPath(AID_HARLEQUINN, "BunnyPath13", 0, 0, 0, 2, 1.5);
	Script.WaitSec(1);
	EntGame.SpawnBirdOnPath(AID_HARLEQUINN, "BunnyPath13", 0, -1.5, .5, 0, 1.5);
	Script.WaitSec(.5);	
	EntGame.SpawnBirdOnPath(AID_HARLEQUINN, "BunnyPath13", 0, 0, -2, 2, 1.5);		
 		  
    end;    

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