-----------------------------------------------------------------------------
-- Site 9
-----------------------------------------------------------------------------
-- PostStage

function PostStage()
    -- do this stuff first, tells the game that the round is over
    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\\Site9\\Site9.ini", "","","");
    EntGame.CreatePlayerEntities();
    
	-- do any setup that is specifically for testing.
	if (EntGame.TestingLevels()) then
		Testing();
		end;
		
    rain = Entity.FindName(entRoot, "Rain");
    
    EntGame.SetGlobalDustColorInitial(.5, 0.2, .2, .2);
    EntGame.SetGlobalDustColorFinal  (0.0, 0.2, .2, .2);
    
    EntGame.SetStageTimer(170);

    EntGame.LoadAnimal(AID_ELK_M);
	EntGame.LoadAnimal(AID_ELK_F);	
	EntGame.LoadAnimal(AID_GOOSE);
	EntGame.LoadAnimal(AID_BISON);
	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");	      
  

     -- set the camera to a cool spot, then fade in
    EntGame.BindCameraToEntity("CountdownCamera3");
    FadeIn();    
    Script.WaitSec(1.0); 
    
    -- "3"
	-- turn off the rain object
    if (rain) then
        Entity.SetBool(rain, "enabled",  false);    
        end;    
    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.01);    
    EntGame.BindInputToEntity("Player1");  
    Entity.GameEventPre(Game.GetRootEntity(), SSK1_COUNTDOWN_HUNT, 0);     
    Entity.GameEventPre(Game.GetRootEntity(), SSK1_START, 0);
   
    end;
    
-----------------------------------------------------------------------------
-- Use this function for overriding various game parameters (i.e. weapon availability, etc.)
function Testing()
    EntGame.SetPlayerWeapon(0, WS_PISTOL, 	    WID_PISTOL_2);
	EntGame.SetPlayerWeapon(0, WS_SINGLE_RIFLE, WID_SINGLE_RIFLE_3);
    EntGame.SetPlayerWeapon(0, WS_SHOTGUN,	    WID_SHOTGUN_2);	
	EntGame.SetPlayerWeapon(0, WS_AUTO_RIFLE, 	WID_AUTO_RIFLE_2);	
	EntGame.SetPlayerWeapon(0, WS_BOW, 		    WID_BOW_1);
	EntGame.ResetWeaponIcons();
	end;
	
-----------------------------------------------------------------------------

function Part1()

    -- turn off the rain object
    if (rain) then
        Entity.SetBool(rain, "enabled",  false);    
        end;    

	EntGame.SpawnAnimal(AID_ELK_M, "FollowPath1");
	EntGame.SpawnAnimal(AID_ELK_M, "FollowPath3");

	Script.WaitSec(1.5);

	EntGame.SpawnAnimal(AID_COYOTE, "FollowPath1");

	Script.WaitSec(1.5);

	EntGame.SpawnAnimal(AID_ELK_M, "FollowPath4");

	Script.WaitSec(1.5);

	EntGame.SpawnAnimal(AID_ELK_F, "FollowPath2");

	Script.WaitSec(1.50);

	EntGame.SpawnAnimal(AID_COYOTE, "FollowPath3");

	Script.WaitSec(2.25);

	EntGame.SpawnAnimalOnPath(AID_ELK_M, "FollowPath2", 0, ST_WPT_RUN, 0, 2, 3, .6);
	EntGame.SpawnAnimalOnPath(AID_ELK_M, "FollowPath1", 0, ST_WPT_RUN, 0, -2, -3, .5);

	Script.WaitSec(2);

	--LIGHTENING
	EntGame.LightningFlash();
	
	--POWERUP
	Elk = EntGame.SpawnAnimalOnPath(AID_ELK_M, "FollowPath3", 0, ST_WPT_RUN, 0, -3, -4, .6);
	EntGame.CreateAnimalPowerUp(Elk, PID_WILEY_VISION_50);

	Script.WaitSec(1);

	EntGame.SpawnAnimalOnPath(AID_ELK_F, "FollowPath2", 0, ST_WPT_RUN, 0, -5.5, 4.5, .3);
	EntGame.SpawnAnimalOnPath(AID_ELK_F, "FollowPath1", 0, ST_WPT_RUN, 0, 3, 4, .5);

	Script.WaitSec(4); 
	
	EntGame.SpawnAnimal(AID_COYOTE, "FollowPath1");

	Script.WaitSec(5);

	EntGame.SpawnAnimal(AID_ELK_M, "FollowPath4");

	Script.WaitSec(1.5);

	EntGame.SpawnAnimal(AID_ELK_F, "FollowPath2");

	Script.WaitSec(4.5);

	
    end;
    
-----------------------------------------------------------------------------

function Part2()
	
	--Camera.JumpToWaypoint(entCamera, "CamWptAA");
    --Camera.SetSpeed(entCamera, 0.0, 0.007);    
	
	Camera.SetSpeed(entCamera, 2.0, 0.1);
	Camera.StopAtWaypoint(entCamera, "CamWptGG");
	
	Script.WaitSec(.25);
	
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath9a", 0, 0, 1, 0, 1.2);
	Script.WaitSec(.25);
	
	--POWERUP
	Goose = EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath9b", 0, -1, .5, .05, .88);
	EntGame.CreateAnimalPowerUp(Goose, PID_2X_SCORE);
	
	Script.WaitSec(.25);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath9b", 0, 0, 0, .1, .2);
	Script.WaitSec(.75);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath9a", 0, 0, 1, 0, 1.2);
	Script.WaitSec(.25);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath9b", 0, -1, .5, .05, .88);
	Script.WaitSec(.25);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath9b", 0, 0, 0, .1, .2);	

	EntGame.SpawnAnimalOnPath(AID_ELK_M, "FollowPath12", 0, ST_WPT_RUN, 0, 2, 3, .5);
	EntGame.SpawnAnimalOnPath(AID_ELK_F, "FollowPath12", 0, ST_WPT_RUN, 0, 1.5, 1.5, .3);
	
	Script.WaitSec(3);
	
	EntGame.SpawnAnimalOnPath(AID_ELK_M, "FollowPath12", 0, ST_WPT_RUN, 0, 2, 3, .5);
	EntGame.SpawnAnimalOnPath(AID_ELK_M, "FollowPath12", 0, ST_WPT_RUN, 0, 0, 0, .7);
	EntGame.SpawnAnimalOnPath(AID_ELK_F, "FollowPath12", 0, ST_WPT_RUN, 0, 1.5, 1.5, .3);	
	
	Script.WaitSec(2);
	
	--POWERUP
	Coyote = EntGame.SpawnAnimalOnPath(AID_COYOTE, "FollowPath10", 0, ST_WPT_RUN, 0, 2, 3, .2);
	EntGame.CreateAnimalPowerUp(Coyote, PID_WILEY_VISION_50);
	Script.WaitSec(1);
	
	EntGame.SpawnAnimalOnPath(AID_COYOTE, "FollowPath10", 0, ST_WPT_RUN, 0, -2, -3, .5);
	Script.WaitSec(.2);
	EntGame.SpawnAnimalOnPath(AID_COYOTE, "FollowPath10", 0, ST_WPT_RUN, 0, -1.5, 2.5, .1);

	Script.WaitSec(4.0);

	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath15", 0, 1, 1.5, .1, .5);
	Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath15", 0, 0, -1, 0, .2);
	Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath15", 0, 2, -2, .15, .6);
	Script.WaitSec(.5);	
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath15", 0, 1, 0, .1, .5);
	Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath15", 0, 0, 1, 0, .2);
	Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath15", 0, 2, -3, .15, .6);
	Script.WaitSec(.25);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath15", 0, 1, 1.5, .1, .5);
	Script.WaitSec(.5);

	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath15", 0, 0, -1, 0, .2);
	Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath15", 0, 2, -2, .15, .6);	
	
	EntGame.SpawnAnimalOnPath(AID_COYOTE, "FollowPath10", 0, ST_WPT_RUN, 0, 2, 3, .5);
	EntGame.SpawnAnimalOnPath(AID_COYOTE, "FollowPath10", 0, ST_WPT_RUN, 0, -2, -3, .7);


	EntGame.SpawnAnimalOnPath(AID_ELK_F, "FollowPath10b", 0, ST_WPT_RUN, 0, -2, -3, .6);
	
	Script.WaitSec(2);
	
	EntGame.SpawnAnimalOnPath(AID_ELK_M, "FollowPath10b", 0, ST_WPT_RUN, 0, 2, 3, .9);
	
	--POWERUP
	Elk = EntGame.SpawnAnimalOnPath(AID_ELK_M, "FollowPath10b", 0, ST_WPT_RUN, 0, 0, 0, .4);
	EntGame.CreateAnimalPowerUp(Elk, PID_3X_RELOAD_RATE);

	Script.WaitSec(6);

	--PREDATOR #1
	a = EntGame.SpawnAnimalOnPath(AID_BISON, "FollowPath10c", 0, ST_WPT_RUN, 0, 2, -3, .5);
	Animal.SetAutoChargeDist(a, 25);	
	Animal.SetAttackType(a, ATK_STRAFE);
	Animal.SetStrafeAttackDist(a, 6.0);
	Animal.SetStrafeAttackDelay(a, .5);	
	Animal.SetPostAttackRand(a, false);
	Animal.SetPostAttackDir(a, 90);		
	Entity.SetName(a, "BisonA");
	
	Script.WaitSec(3);
	
	EntGame.SpawnAnimalOnPath(AID_BISON, "FollowPath10c", 0, ST_WPT_RUN, 0, -1, -4, .7);

	Script.WaitSec(3);

	EntGame.SpawnAnimalOnPath(AID_ELK_F, "FollowPath10c", 0, ST_WPT_RUN, 0, -2, -3, .7);

	Script.WaitSec(2);
	
	--PREDATOR #2
	b = EntGame.SpawnAnimalOnPath(AID_BISON, "FollowPath10d", 0, ST_WPT_RUN, 0, -2, 3, .8);
	Animal.SetAutoChargeDist(b, 20);	
	Animal.SetAttackType(b, ATK_STRAFE);
	Animal.SetStrafeAttackDist(b, 8.0);
	Animal.SetStrafeAttackDelay(b, .5);	
	Animal.SetPostAttackRand(b, false);
	Animal.SetPostAttackDir(b, 90);		
	Entity.SetName(b, "BisonB");
	
	--POWERUP
	Bison = EntGame.SpawnAnimalOnPath(AID_BISON, "FollowPath10d", 0, ST_WPT_RUN, 0, -2, -3, 1.1);
	EntGame.CreateAnimalPowerUp(Bison, PID_BODY_ARMOR_50);
	
	EntGame.SpawnAnimalOnPath(AID_ELK_F, "FollowPath10f", 0, ST_WPT_RUN, 0, 1, 1, .9);

	Script.WaitSec(2);
	
	EntGame.SpawnAnimalOnPath(AID_BISON, "FollowPath10d", 0, ST_WPT_RUN, 0, 2, 3, .4);
	EntGame.SpawnAnimalOnPath(AID_BISON, "FollowPath10f", 0, ST_WPT_RUN, 0, 1, 1, .9);

	Script.WaitSec(7);
	
	--PREDATOR #3
	c = EntGame.SpawnAnimalOnPath(AID_BISON, "FollowPath10e", 0, ST_WPT_RUN, 0, -6, -3, .7);
	Animal.SetChargeWhenShot(c, true);
	Animal.SetAttackType(c, ATK_STRAFE);
	Animal.SetStrafeAttackDist(c, 8.0);
	Animal.SetStrafeAttackDelay(c, .5);	
	Animal.SetPostAttackRand(c, false);
	Animal.SetPostAttackDir(c, 90);		
	Entity.SetName(c, "BisonC");
		
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath16", 0, 1, 0, .1, .6);
	
	--POWERUP
	Goose = EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath16", 0, 0, 1, 0, .3);
	EntGame.CreateAnimalPowerUp(Goose, PID_WILEY_VISION_50);
	
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath16", 0, 2, -3, .2, .1);

	Script.WaitSec(6);
	
	EntGame.SpawnAnimalOnPath(AID_ELK_M, "FollowPath13", 0, ST_WPT_RUN, 0, 2, 3, .9);
	EntGame.SpawnAnimalOnPath(AID_ELK_F, "FollowPath13", 0, ST_WPT_RUN, 0, -2, -1, .5);
	EntGame.SpawnAnimalOnPath(AID_ELK_M, "FollowPath13", 0, ST_WPT_RUN, 0, -1, -2, 1.2);
	
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath17", 0, 1, -1, .1, .7);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath17", 0, 0, -2, .05, .5);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath17", 0, 2, -4, 0, .2);
	Script.WaitSec(1);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath17", 0, 1, -2, 0, .5);
	Script.WaitSec(1);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath17", 0, -3, -1, 0, .3);
	
	--POWERUP
	Coyote = EntGame.SpawnAnimalOnPath(AID_COYOTE, "FollowPath13", 0, ST_WPT_RUN, 0, 2, -1.5, 2);
	EntGame.CreateAnimalPowerUp(Coyote, PID_4X_MAGAZINE);
	
	Script.WaitSec(2);
	EntGame.SpawnAnimalOnPath(AID_COYOTE, "FollowPath13", 0, ST_WPT_RUN, 0, 2, -1.5, 2);
	Script.WaitSec(4);
	EntGame.SpawnAnimalOnPath(AID_ELK_F, "FollowPath19", 0, ST_WPT_RUN, 0, 1, 1, .9);
	
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath17", 0, 1, -1, 0, 1);
	
	Script.WaitSec(1);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath17", 0, 2, -3, -.2, .8);
	EntGame.SpawnAnimalOnPath(AID_ELK_M, "FollowPath19", 0, ST_WPT_RUN, 0, -1, -2, 1.2);

    end;
        
-----------------------------------------------------------------------------

function Part3()

	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath17", 0, 4, 1, .1, .5);
	EntGame.SpawnAnimalOnPath(AID_ELK_F, "FollowPath19", 0, ST_WPT_RUN, 0, 1, 1, .9);
	Script.WaitSec(1);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath17", 0, -3, -3, -.12, .3);
	EntGame.SpawnAnimalOnPath(AID_ELK_M, "FollowPath19", 0, ST_WPT_RUN, 0, -1, -2, 1.2);
	Script.WaitSec(2.5);
	
	--PREDATOR #4
	d = EntGame.SpawnAnimalOnPath(AID_BISON, "FollowPath19", 0, ST_WPT_RUN, 0, 1, -2, .9);
	Animal.SetAutoChargeDist(d, 30);	
	Animal.SetAttackType(d, ATK_STRAFE);
	Animal.SetStrafeAttackDist(d, 8.3);
	Animal.SetStrafeAttackDelay(d, .5);	
	Entity.SetName(d, "BisonD");
	
	Script.WaitSec(2);
	EntGame.SpawnAnimalOnPath(AID_ELK_M, "FollowPath13", 0, ST_WPT_RUN, 0, 2, -1.5, .9);
	Script.WaitSec(1);
	EntGame.SpawnAnimalOnPath(AID_ELK_F, "FollowPath13", 0, ST_WPT_RUN, 0, -2, -1, .8);
	
	--POWERUP
	Goose = EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath17", 0, 1, 0, 0, .7);
	EntGame.CreateAnimalPowerUp(Goose, PID_WILEY_VISION_50);
	
	Script.WaitSec(2.5);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath17", 0, 0, 1, .2, .5);
	EntGame.SpawnAnimalOnPath(AID_ELK_M, "FollowPath13", 0, ST_WPT_RUN, 0, 2, -1.5, .9);
	Script.WaitSec(1.0);
	EntGame.SpawnAnimalOnPath(AID_ELK_F, "FollowPath13", 0, ST_WPT_RUN, 0, -2, -1, .8);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath17", 0, 2, -3, -.2, .2);
	Script.WaitSec(1); 
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath17", 0, 4, 1, .1, .2);
	Script.WaitSec(1); 
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath17", 0, -3, -3, -.12, .3);
    Script.WaitSec(6);      
	    
    end;
        
-----------------------------------------------------------------------------

function Part4()

	--Camera.JumpToWaypoint(entCamera, "CamWptGG");
    --Camera.SetSpeed(entCamera, 0.0, 0.007);
	
	Camera.SetSpeed(entCamera, 2.0, 0.1);
	Camera.StopAtWaypoint(entCamera, "CamWptKK");
	
	-- turn off the rain object
    if (rain) then
        Entity.SetBool(rain, "enabled",  true);    
        end;
		
	EntGame.SpawnAnimalOnPath(AID_COYOTE, "FollowPath20", 0, ST_WPT_RUN, 0, 2, 3, 3);
	EntGame.SpawnAnimalOnPath(AID_COYOTE, "FollowPath20", 0, ST_WPT_RUN, 0, -2, -1, 3.3);

	Script.WaitSec(.5);

	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath21", 0, 1, 0, .2, .7);
	
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath21", 0, 0, 1, 0, .5);

	Script.WaitSec(.5);

	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath21", 0, 2, -3, .1, .2);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath21", 0, 4, 1, .05, .2);

	Script.WaitSec(1);
	
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath21", 0, 1, 4, .1, .5);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath21", 0, -3, -3, 0, .3);
	
	Script.WaitSec(6);
	
	--POWERUP
	Elk = EntGame.SpawnAnimalOnPath(AID_ELK_M, "FollowPath23a", 0, ST_WPT_RUN, 0, 2, 3, .9);
	EntGame.CreateAnimalPowerUp(Elk, PID_1_5X_SCORE);
	
	Script.WaitSec(4);
	
	EntGame.SpawnAnimalOnPath(AID_ELK_M, "FollowPath23", 0, ST_WPT_RUN, 0, 2, 3, 1.1);
	EntGame.SpawnAnimalOnPath(AID_ELK_F, "FollowPath23", 0, ST_WPT_RUN, 0, -2, -1, .7);

	Script.WaitSec(1);

	EntGame.SpawnAnimalOnPath(AID_ELK_F, "FollowPath23a", 0, ST_WPT_RUN, 0, 2, 3, .9);
	EntGame.SpawnAnimalOnPath(AID_ELK_M, "FollowPath23a", 0, ST_WPT_RUN, 0, -2, -1, .5);
	EntGame.SpawnAnimalOnPath(AID_ELK_F, "FollowPath23a", 0, ST_WPT_RUN, 0, -1, -2, 1.2);

	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath25", 0, 1, 2, .1, .7);
	Script.WaitSec(1);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath25", 0, 1, 0, .2, .7);
	Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath25", 0, 2, 1, 0, .2);
	Script.WaitSec(1);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath25", 0, 1, 2, .1, .7);
	Script.WaitSec(1);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath25", 0, 1, -1, .2, .7);
	Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath25", 0, 2, 0, 0, .2);
	Script.WaitSec(1);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath25", 0, 1, 2, .2, .7);
	Script.WaitSec(.5);
	
	--POWERUP
	Goose = EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath25", 0, 1, 1, 0, .2);
	EntGame.CreateAnimalPowerUp(Goose, PID_2X_FIRE_RATE);

	Script.WaitSec(2.0);
	
	EntGame.SpawnAnimalOnPath(AID_ELK_F, "FollowPath24", 0, ST_WPT_RUN, 0, 2, 3, 1.2);
	EntGame.SpawnAnimalOnPath(AID_ELK_M, "FollowPath24", 0, ST_WPT_RUN, 0, -3, -2, .5);
	EntGame.SpawnAnimalOnPath(AID_ELK_M, "FollowPath24", 0, ST_WPT_RUN, 0, -1, -2, .8);	
	
	Script.WaitSec(2.0);

	EntGame.SpawnAnimalOnPath(AID_ELK_M, "FollowPath24", 0, ST_WPT_RUN, 0, 2, 3, 1.2);

	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath26", 0, 1, 0, .05, .7);
	Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath26", 0, 0, 1, 0, .5);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath26", 0, 2, -1, .1, .2);
	Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath26", 0, 4, 1, 0, .2);
	Script.WaitSec(3);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath26", 0, 1, 0, .05, .7);
	Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath26", 0, 0, 1, 0, .5);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath26", 0, 2, -1, .1, .2);
	Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath26", 0, 4, 1, 0, .2);	

	EntGame.SpawnAnimalOnPath(AID_COYOTE, "FollowPath24a", 0, ST_WPT_RUN, 0, 2, 3, 3.2);
	
	--POWERUP
	Coyote = EntGame.SpawnAnimalOnPath(AID_COYOTE, "FollowPath24a", 0, ST_WPT_RUN, 0, -1, 1, 3);
	EntGame.CreateAnimalPowerUp(Coyote, PID_WILEY_VISION_50);

	Script.WaitSec(9);
	
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath27", 0, 0, 1, .1, .8);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath27", 0, 2, -3, 0, .6);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath27", 0, 0, 2, .1, .5);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath27", 0, 2, -1, 0, .2);    

	EntGame.SpawnAnimalOnPath(AID_ELK_M, "FollowPath31", 0, ST_WPT_RUN, 0, 2, 3, 1.2);
	EntGame.SpawnAnimalOnPath(AID_ELK_F, "FollowPath31", 0, ST_WPT_RUN, 0, -1, 1, 1);	
	
	Script.WaitSec(3);

    end;
        
-----------------------------------------------------------------------------

function Part5()

    --Camera.JumpToWaypoint(entCamera, "CamWptKK");
    --Camera.SetSpeed(entCamera, 0.0, 0.007);
	
	Script.WaitSec(2);

	EntGame.SpawnAnimalOnPath(AID_ELK_M, "FollowPath31", 0, ST_WPT_RUN, 0, 2, 3, 1.2);
	EntGame.SpawnAnimalOnPath(AID_ELK_F, "FollowPath31", 0, ST_WPT_RUN, 0, -1, 1, 1);

	Script.WaitSec(2);

	EntGame.SpawnAnimalOnPath(AID_ELK_F, "FollowPath31", 0, ST_WPT_RUN, 0, 2, 3, 1.2);
	EntGame.SpawnAnimalOnPath(AID_ELK_M, "FollowPath31", 0, ST_WPT_RUN, 0, -1, 1, 1);

	Script.WaitSec(2);

	--POWERUP
	Elk = EntGame.SpawnAnimalOnPath(AID_ELK_M, "FollowPath31", 0, ST_WPT_RUN, 0, 2, -3, 1);
	EntGame.CreateAnimalPowerUp(Elk, PID_2X_RELOAD_RATE);

	Script.WaitSec(2);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath28", 0, 0, 1, 0, .5);
	Script.WaitSec(1);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath28", 0, 2, -3, .1, .2);
	Script.WaitSec(1);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath28", 0, -2, 3, .2, .7);

	EntGame.SpawnAnimalOnPath(AID_ELK_M, "FollowPath32", 0, ST_WPT_RUN, 0, 2, 3, 1.2);
	EntGame.SpawnAnimalOnPath(AID_ELK_F, "FollowPath32", 0, ST_WPT_RUN, 0, -1, 1, 1);

	Script.WaitSec(3);

	EntGame.SpawnAnimalOnPath(AID_ELK_M, "FollowPath33", 0, ST_WPT_RUN, 0, -2, -3, .8);
	EntGame.SpawnAnimalOnPath(AID_ELK_F, "FollowPath33", 0, ST_WPT_RUN, 0, -1, -1, .65);

	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath29", 0, -1, 1, 0, 1);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath29", 0, -2, 3, .1, .7);
	
	Script.WaitSec(3.0);
	
	--POWERUP
	Goose = EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath28", 0, 0, 1, 0, .5);
	EntGame.CreateAnimalPowerUp(Goose, PID_WILEY_VISION_50);
	
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath28", 0, 2, -3, .1, .2);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath28", 0, -2, 3, .2, .7);
	
	EntGame.SpawnAnimalOnPath(AID_ELK_M, "FollowPath32", 0, ST_WPT_RUN, 0, 2, 3, 1.2);
	Script.WaitSec(1);
	EntGame.SpawnAnimalOnPath(AID_ELK_F, "FollowPath32", 0, ST_WPT_RUN, 0, -1, 1, 1);	
	Script.WaitSec(1);
	EntGame.SpawnAnimalOnPath(AID_ELK_M, "FollowPath32", 0, ST_WPT_RUN, 0, 2, 3, 1.2);
	Script.WaitSec(1.5);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath30", 0, -1, 1, 0, 1);
	Script.WaitSec(1);
	
	--PREDATOR #5
	e = EntGame.SpawnAnimalOnPath(AID_BISON, "FollowPath33", 0, ST_WPT_RUN, 0, 1, -2, 1);
	Animal.SetAutoChargeDist(e, 35);	
	Animal.SetAttackType(e, ATK_STRAFE);
	Animal.SetStrafeAttackDist(e, 7.0);
	Animal.SetStrafeAttackDelay(e, .5);	
	Animal.SetPostAttackRand(e, false);
	Animal.SetPostAttackDir(e, -60);		
	Entity.SetName(e, "BisonE");
	
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath36", 0, 0, 1, 0, .5);
	Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath37", 0, 2, 1, .1, .2);
	Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath37", 0, 0, 1, 0, .5);
	Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath37", 0, 2, 0, .1, .2);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath36", 0, -2, 2, .2, .7);
	Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath36", 0, -2, -1, .2, .7);
	Script.WaitSec(.5);
	EntGame.SpawnBirdOnPath(AID_GOOSE, "FollowPath36", 0, -2, 0, .2, .7);

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

