-----------------------------------------------------------------------------
-- Stage 1-5
-----------------------------------------------------------------------------

function PostStage()
	
    EntGame.EnablePlayerControl(false);
    EntGame.ClearFlag(GF_READYTOSTART);
    EntGame.BindCameraToEntity("IntroCamera");
	
	Sound.Release(smpWaterFall);
	Sound.Release(smpInsects);
	Sound.Release(smpEnterWater);
	Sound.Release(smpSpooky);
	Sound.Release(smpLongGrowl);
	Sound.Release(smpQuickGrowl);
	
    end;    
    
-----------------------------------------------------------------------------    
-- Setup

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

    -- load world
    SetupWorld("Maps\\WorldSwamp\\WorldSwamp.ini", "Maps\\Stage1-5\\Stage1-5.ini","","");
    EntGame.CreatePlayerEntities();

    EntGame.SetGlobalDustColorInitial(0.0, 0.2, 0.2, 0.0);
	EntGame.SetGlobalDustColorFinal  (0.0, 0.2, 0.2, 0.0);
	
	EntGame.SetStageTimer(190);
		
    -- load sounds
    smpWaterFall  = Sound.Load("Sound\\Environment\\Waterfall.wav");
    smpInsects    = Sound.Load("Sound\\Environment\\SwampInsects.wav");       
	smpEnterWater = Sound.Load("Sound\\Environment\\EnterWater.wav");       
    smpSpooky     = Sound.Load("Sound\\Environment\\SpookyScrape.wav");
	smpLongGrowl  = Sound.Load("Sound\\Animals\\DeepGrowlLong.wav");
	smpQuickGrowl = Sound.Load("Sound\\Animals\\DeepGrowlQuick.wav");
	  
    EntGame.LoadAnimal(AID_WILDEBEEST_M);
	EntGame.LoadAnimal(AID_WILDEBEEST_F);
	EntGame.LoadAnimal(AID_NILECROC_M);
	EntGame.LoadAnimal(AID_HIPPO_M);
	EntGame.LoadAnimal(AID_IMPALA_M);

	--Spawn round intro animals
	Sound.Play(smpInsects, 100, DS2_VOLMAX, DS2_CENTER);

	IsleHippo = EntGame.SpawnAnimalOnPath(AID_HIPPO_M, "CrocIntroPath01", 0, ST_GRAZING, 2000,0,0,1);
	Animal.SetElvOffset(IsleHippo,9.4);

    -- find intro camera for animals to look at	
	entCamera = Entity.FindName(entRoot, "IntroCamera");
	Camera.JumpToWaypoint(entCamera, "CamWptAA");   
	Camera.SetSpeed(entCamera, .4, .01);
	
	A = EntGame.SpawnAnimalOnPath(AID_HIPPO_M, "BoringHippoPath01", 0, ST_GRAZING, 2000,0,0,1);	
	--Animal.FaceEntity(A, entCamera);
	
    StartupSequence("Music\\Dim Horizon.ogg");			
	
    EntGame.DestroyAllAnimals();

    end;


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

function Part1()	

	A = EntGame.SpawnAnimalOnPath(AID_HIPPO_M, "BoringHippoPath01", 0, ST_GRAZING, 2000,0,0,.2);
	Animal.FaceEntity(A, entCamera);

	Camera.SetSpeed(entCamera, .25, .01); 
	Camera.JumpToWaypoint(entCamera, "CamWptAA");   
		         
	Script.WaitSec(3);
	
	--Spawn some crocs chasing wildebeests through the trees.
	EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "WildeHerdPath01", 0, ST_WPT_RUN, 1,0,0,1);
	Script.WaitSec(2);
	
	EntGame.ShowCaption(STR_LVL_1_5_A, 0, 4.0);
	
	EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "WildeHerdPath02", 0, ST_WPT_RUN, 1,-5,0,1);
	EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_F, "WildeHerdPath01", 0, ST_WPT_RUN, 1,-10,0,1);
	EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "WildeHerdPath02", 0, ST_WPT_RUN, 1,-15,0,1);	  
	Script.WaitSec(3);
		
	a = EntGame.SpawnAnimalOnPath(AID_NILECROC_M, "CrocHerdPath01", 0, ST_WPT_RUN, 1,0,0,1);
	Animal.SetAutoChargeDist(a, 16.0);
	Animal.SetAttackType(a, ATK_STRAFE);
	Animal.SetPostAttackRand(a, false);
	Animal.SetPostAttackDir(a, -90);
	
	a = EntGame.SpawnAnimalOnPath(AID_NILECROC_M, "CrocHerdPath01", 0, ST_WPT_RUN, 1,-10,5.2,1);		
	--Animal.SetAutoChargeDist(a, 16.0);
	--Animal.SetAttackType(a, ATK_STRAFE);
	--Animal.SetPostAttackRand(a, false);
	--Animal.SetPostAttackDir(a, -90);
				
	Camera.StopAtWaypoint(entCamera, "CamWptDD");
	Script.WaitSec(13);
	Camera.SetSpeed(entCamera, 1.4, .01); 
	Script.WaitSec(5);

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

function Part2()
	
CoinOffset = 1.05;

	--Camera.JumpToWaypoint(entCamera, "CamWptDD");   
	--Camera.SetSpeed(entCamera, .0, .01); 

	A = EntGame.SpawnAnimalOnPath(AID_NILECROC_M, "CrocWaterPath03", 0, ST_WPT_WALK, 1,0,0,4.1);
	Animal.SetSnapToTerrain(A,false);
	Animal.EnableFear(A,false);
	Animal.SetCoinMode (A, CM_SPAWNREL);
	Animal.SetCoinOffset(A, CoinOffset);
	
	A = EntGame.SpawnAnimalOnPath(AID_NILECROC_M, "CrocWaterPath04", 0, ST_WPT_WALK, 1,0,0,4.1);
	Animal.SetSnapToTerrain(A,false);
	Animal.EnableFear(A,false);		
	Animal.SetCoinMode (A, CM_SPAWNREL);
	Animal.SetCoinOffset(A, CoinOffset);
	
	Script.WaitSec(2);
	
	A = EntGame.SpawnAnimalOnPath(AID_NILECROC_M, "CrocWaterPath05", 0, ST_WPT_WALK, 1,0,0,4.1);
	Animal.SetSnapToTerrain(A,false);
	Animal.SetCoinMode (A, CM_SPAWNREL);
	Animal.SetCoinOffset(A, CoinOffset);
	Animal.EnableFear(A,false);			
	Script.WaitSec(2);
	A = EntGame.SpawnAnimalOnPath(AID_NILECROC_M, "CrocWaterPath03", 0, ST_WPT_WALK, 1,0,0,4.1);
	Animal.SetSnapToTerrain(A,false);
	Animal.SetCoinMode (A, CM_SPAWNREL);
	Animal.SetCoinOffset(A, CoinOffset);
	Animal.EnableFear(A,false);			
	A = EntGame.SpawnAnimalOnPath(AID_NILECROC_M, "CrocWaterPath04", 0, ST_WPT_WALK, 1,0,0,4.1);
	Animal.SetSnapToTerrain(A,false);
	Animal.SetCoinMode (A, CM_SPAWNREL);
	Animal.SetCoinOffset(A, CoinOffset);
	Animal.EnableFear(A,false);			
	Script.WaitSec(2);
	
	EntGame.ShowCaption(STR_LVL_1_5_B, 0, 4.0);
	
	A = EntGame.SpawnAnimalOnPath(AID_NILECROC_M, "CrocWaterPath05", 0, ST_WPT_WALK, 1,0,0,4.1);
	Animal.SetSnapToTerrain(A,false);
	Animal.SetCoinMode (A, CM_SPAWNREL);
	Animal.SetCoinOffset(A, CoinOffset);
	Animal.EnableFear(A,false);			
	Script.WaitSec(2);
	A = EntGame.SpawnAnimalOnPath(AID_NILECROC_M, "CrocWaterPath04", 0, ST_WPT_WALK, 1,0,0,4.1);
	Animal.SetSnapToTerrain(A,false);
	Animal.SetCoinMode (A, CM_SPAWNREL);
	Animal.SetCoinOffset(A, CoinOffset);
	Animal.EnableFear(A,false);			
	Script.WaitSec(2);
	A = EntGame.SpawnAnimalOnPath(AID_NILECROC_M, "CrocWaterPath03", 0, ST_WPT_WALK, 1,0,0,4.1);
	Animal.SetSnapToTerrain(A,false);
	Animal.SetCoinMode (A, CM_SPAWNREL);
	Animal.SetCoinOffset(A, CoinOffset);
	Animal.EnableFear(A,false);	
	A = EntGame.SpawnAnimalOnPath(AID_NILECROC_M, "CrocWaterPath04", 0, ST_WPT_WALK, 1,0,0,4.1);
	Animal.SetSnapToTerrain(A,false);
	Animal.SetCoinMode (A, CM_SPAWNREL);
	Animal.SetCoinOffset(A, CoinOffset);
	Animal.EnableFear(A,false);			
	Script.WaitSec(2);
	A = EntGame.SpawnAnimalOnPath(AID_NILECROC_M, "CrocWaterPath05", 0, ST_WPT_WALK, 1,0,0,4.1);
	Animal.SetSnapToTerrain(A,false);
	Animal.SetCoinMode (A, CM_SPAWNREL);
	Animal.SetCoinOffset(A, CoinOffset);
	Animal.EnableFear(A,false);			
	Script.WaitSec(2);
	A = EntGame.SpawnAnimalOnPath(AID_NILECROC_M, "CrocWaterPath03", 0, ST_WPT_WALK, 1,0,0,4.1);
	Animal.SetSnapToTerrain(A,false);
	Animal.SetCoinMode (A, CM_SPAWNREL);
	Animal.SetCoinOffset(A, CoinOffset);
	Animal.EnableFear(A,false);			
	A = EntGame.SpawnAnimalOnPath(AID_NILECROC_M, "CrocWaterPath04", 0, ST_WPT_WALK, 1,0,0,4.1);
	Animal.SetSnapToTerrain(A,false);
	Animal.SetCoinMode (A, CM_SPAWNREL);
	Animal.SetCoinOffset(A, CoinOffset);
	Animal.EnableFear(A,false);			
	Script.WaitSec(2);	
	A = EntGame.SpawnAnimalOnPath(AID_NILECROC_M, "CrocWaterPath03", 0, ST_WPT_WALK, 1,0,0,4.1);
	Animal.SetSnapToTerrain(A,false);
	Animal.SetCoinMode (A, CM_SPAWNREL);
	Animal.SetCoinOffset(A, CoinOffset);
	Animal.EnableFear(A,false);	
	Script.WaitSec(10);
	
	EntGame.ShowCaption(STR_LVL_1_5_C, 0, 4.0);	
	
	Camera.SetSpeed(entCamera, 1.5, 1);		
	Script.WaitSec(3);
	
	Sound.Play(smpEnterWater, 1, DS2_VOLMAX, DS2_CENTER);	
	
	--Have croc come running out of tree
	A = EntGame.SpawnAnimalOnPath(AID_NILECROC_M, "CrocWaterPath01", 0, ST_WPT_WALK, 1,0,0,3.8);
	Animal.SetSnapToTerrain(A,false);
	Animal.SetCoinMode (A, CM_SPAWNREL);
	Animal.SetCoinOffset(A, CoinOffset);
	Animal.EnableFear(A,false);
	Camera.SetSpeed(entCamera, 1.5, 1);
	--Spawn Wildebeests along shore line
	A = EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "ShorePath01", 0, ST_WPT_RUN, 1,0,0,.8);
	Animal.SetSnapToTerrain(A,false);
	Animal.SetCoinMode (A, CM_SPAWNREL);
	Animal.SetCoinOffset(A, CoinOffset);
	A = EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "ShorePath01", 0, ST_WPT_RUN, 1,5,5,.8);
	Animal.SetSnapToTerrain(A,false);
	Animal.SetCoinMode (A, CM_SPAWNREL);
	Animal.SetCoinOffset(A, CoinOffset);
	Script.WaitSec(2);	
	A = EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "ShorePath01", 0, ST_WPT_RUN, 1,0,0,.5);
	Animal.SetSnapToTerrain(A,false);
	Animal.SetCoinMode (A, CM_SPAWNREL);
	Animal.SetCoinOffset(A, CoinOffset);			
	--Spawn crocs in water		
			
	A =EntGame.SpawnAnimalOnPath(AID_NILECROC_M, "IsleCroc01", 0, ST_GRAZING, 200,0,0,.1);
	Animal.SetElvOffset(A ,9.2);
	Animal.SetCoinMode (A, CM_SPAWNREL);
	Animal.SetCoinOffset(A, CoinOffset);
	Animal.EnableFear(A ,false);
	Script.WaitSec(1);	
	
	A = EntGame.SpawnAnimalOnPath(AID_NILECROC_M, "CrocWaterPath01", 0, ST_WPT_WALK, 1,0,0,3.6);
	Animal.FaceEntity(A, entCamera);
	--Animal.SetAutoChargeDist(A, 16.0);
	--Animal.SetAttackType(A, ATK_STRAFE);
	Animal.SetSnapToTerrain(A,false);
	Animal.SetCoinMode (A, CM_SPAWNREL);
	Animal.SetCoinOffset(A, CoinOffset);
	Animal.EnableFear(A,false);
	
	Script.WaitSec(5);	
	
	A = EntGame.SpawnAnimalOnPath(AID_NILECROC_M, "CrocWaterPath01", 0, ST_WPT_WALK, 1,0,0,2.5);
	Animal.FaceEntity(A, entCamera);
	Animal.SetAutoChargeDist(A, 16.0);
	Animal.SetAttackType(A, ATK_STRAFE);
	Animal.SetSnapToTerrain(A,false);
	Animal.SetCoinMode (A, CM_SPAWNREL);
	Animal.SetCoinOffset(A, CoinOffset);
	Animal.EnableFear(A,false);
	
	Camera.StopAtWaypoint(entCamera, "CamWptHH");

	--Spawn hippos swimming around islands
	Script.WaitSec(11);

    A = EntGame.SpawnAnimalOnPath(AID_HIPPO_M, "DeepWaterPath01", 0, ST_WPT_RUN, 1,2,5,.3);
	Animal.SetSnapToTerrain(A,false);
	Animal.SetCoinMode (A, CM_SPAWNREL);
	Animal.SetCoinOffset(A, CoinOffset);
	Script.WaitSec(3);	
	EntGame.ShowCaption(STR_LVL_1_5_D, 0, 3.0);
	Script.WaitSec(5);
		
	EntGame.ShowCaption(STR_LVL_1_5_E, 0, 4.0);
	
	A = EntGame.SpawnAnimalOnPath(AID_HIPPO_M, "DeepWaterPath02", 0, ST_WPT_RUN, 1,0,0,1);
	Animal.SetAutoChargeDist(A, 26.0);
	Animal.SetAttackType(A, ATK_STRAFE);
	Animal.SetStrafeAttackDist(A, 5.9);
	Animal.SetPostAttackRand(A, false);
	Animal.SetPostAttackDir(A, -90);
	Animal.SetPostAttackTimer(A, 0);
	Animal.SetSnapToTerrain(A,false);
	Animal.SetCoinMode (A, CM_SPAWNREL);
	Animal.SetCoinOffset(A, CoinOffset);
	Animal.FaceEntity(A, entCamera );
	
	Script.WaitSec(3);
	
	A = EntGame.SpawnAnimalOnPath(AID_HIPPO_M, "DeepWaterPath02", 0, ST_WPT_RUN, 1,0,0,1);
	Animal.SetAutoChargeDist(A, 26.0);
	Animal.SetAttackType(A, ATK_STATIC);
	Animal.SetStrafeAttackDist(A, 5.0);
	Animal.SetPostAttackRand(A, false);
	Animal.SetPostAttackDir(A, -90);
	Animal.SetAttackRepeat(A, 1);
	Animal.SetSnapToTerrain(A,false);
	Animal.SetCoinMode (A, CM_SPAWNREL);
	Animal.SetCoinOffset(A, CoinOffset);
	Animal.FaceEntity(A, entCamera );
	
	Script.WaitSec(3);
    A = EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "DeepWaterPath01", 0, ST_WPT_RUN, 1,2,5,1.0);
	Animal.SetSnapToTerrain(A,false);
	Animal.SetElvOffset(A, -1.5);
    A = EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "DeepWaterPath01", 0, ST_WPT_RUN, 1,0,0,1.5);		 
	Animal.SetSnapToTerrain(A,false);
	Animal.SetCoinMode (A, CM_SPAWNREL);
	Script.WaitSec(3);
    A = EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "DeepWaterPath01", 0, ST_WPT_RUN, 1,2,0,1.0);
	Animal.SetSnapToTerrain(A,false);
	Animal.SetCoinMode (A, CM_SPAWNREL);
	Script.WaitSec(1);
    A = EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "DeepWaterPath01", 0, ST_WPT_RUN, 1,1,1,1.0);
	Animal.SetSnapToTerrain(A,false);
	Animal.SetCoinMode (A, CM_SPAWNREL);
	Script.WaitSec(4);
    A = EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "DeepWaterPath03", 0, ST_WPT_RUN, 1,2,0,1.0);
	Animal.SetSnapToTerrain(A,false);
	Animal.SetCoinMode (A, CM_SPAWNREL);
	Script.WaitSec(1);
    A = EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "DeepWaterPath03", 0, ST_WPT_RUN, 1,1,3,1.0);
	Animal.SetSnapToTerrain(A,false);
	Animal.SetCoinMode (A, CM_SPAWNREL);

	Script.WaitSec(11);	
	Camera.SetSpeed(entCamera, 2.0, 1);
	--Spawn Wildebeests along shore line

	A = EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "ShorePath02", 0, ST_WPT_RUN, 1,0,0,.8);
	Animal.SetSnapToTerrain(A,false);
	Animal.SetCoinMode (A, CM_SPAWNREL);
	Script.WaitSec(2);
	A = EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "ShorePath02", 0, ST_WPT_RUN, 1,5,5,.8);
	Animal.SetSnapToTerrain(A,false);
	Animal.SetCoinMode (A, CM_SPAWNREL);
	Script.WaitSec(2);	
	
	EntGame.ShowCaption(STR_LVL_1_5_F, 0, 4.0);
	
	A = EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "ShorePath02", 0, ST_WPT_RUN, 1,0,0,.8);
	Animal.SetSnapToTerrain(A,false);
	Animal.SetCoinMode (A, CM_SPAWNREL);
	Script.WaitSec(2);	
	A = EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "ShorePath02", 0, ST_WPT_RUN, 1,5,5,.8);
	Animal.SetSnapToTerrain(A,false);
	Animal.SetCoinMode (A, CM_SPAWNREL);
	Script.WaitSec(2);
	A = EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "ShorePath02", 0, ST_WPT_RUN, 1,0,0,.8);
	Animal.SetSnapToTerrain(A,false);
	Animal.SetCoinMode (A, CM_SPAWNREL);
	Script.WaitSec(2);	
	A = EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "ShorePath02", 0, ST_WPT_RUN, 1,5,5,.8);
	Animal.SetSnapToTerrain(A,false);
	Animal.SetCoinMode (A, CM_SPAWNREL);
	
	Camera.StopAtWaypoint(entCamera, "CamWptJJ");		
	Script.WaitSec(5);				
			
    end;    
-----------------------------------------------------------------------------------------------------------

function Part3()
	
CoinOffset = 1.05;

	--DEBUG
	--Camera.JumpToWaypoint(entCamera, "CamWptJJ");  
		 
	A = EntGame.SpawnAnimalOnPath(AID_IMPALA_M, "ShorePath01", 0, ST_WPT_RUN, 1,-6,-18,1);
	Animal.SetSnapToTerrain(A,false);
	Animal.SetCoinMode (A, CM_SPAWNREL);
	
	--Play Spooky Sound
	Sound.Play(smpSpooky, 1, DS2_VOLMAX, DS2_CENTER);		

	Camera.SetTiltOffset(entCamera, 10, .5);
	Camera.SetSpeed(entCamera, 0, .5);
	Camera.SetPanOffset(entCamera, -140, 2.2);
	Camera.SetTiltOffset(entCamera, 10, .5);
	Camera.SetTiltOffset(entCamera, 0, 1.5);
		
	A = EntGame.SpawnAnimalOnPath(AID_IMPALA_M, "ShorePath01", 0, ST_WPT_RUN, 1,-6,-16,1);
	Animal.SetSnapToTerrain(A,false);
	Animal.SetCoinMode (A, CM_SPAWNREL);
	A = EntGame.SpawnAnimalOnPath(AID_IMPALA_M, "ShorePath01", 0, ST_WPT_RUN, 1,-6,-14,1);
	Animal.SetSnapToTerrain(A,false);
	Animal.SetCoinMode (A, CM_SPAWNREL);
	Script.WaitSec(5);
	
	--Have croc come running out of tree
	Sound.Play(smpQuickGrowl, 1, DS2_VOLMAX, DS2_CENTER);	
	
	--1st Attacker
	A =EntGame.SpawnAnimalOnPath(AID_NILECROC_M, "TreeEmerge01", 0, ST_WPT_CHARGE, 1,0,0,.1);
	Animal.SetAutoChargeDist(A, 16.0);
	Animal.SetAttackType(A, ATK_STATIC);
	Animal.SetAttackRepeat(A, 1); 
	Animal.SetSnapToTerrain(A,false);
	Animal.SetCoinMode (A, CM_SPAWNREL);
	Animal.FaceEntity(A, entCamera );
	Animal.SetPostAttackRand(A, false);
	Animal.SetPostAttackDir(A, 70);	
	
	Script.WaitSec(6);		
	
	EntGame.ShowCaption(STR_LVL_1_5_G, 0, 4.0);
	
	--2nd Attacker		
	A =EntGame.SpawnAnimalOnPath(AID_NILECROC_M, "TreeEmerge02", 0, ST_WPT_WALK, 1,0,0,2.8);
	Animal.SetSnapToTerrain(A,false);
	Animal.FaceEntity(A, entCamera );
	Animal.SetCoinMode (A, CM_SPAWNREL);
	Animal.EnableFear(A,false);
	
	Script.WaitSec(2);		
	
	--3rd Attacker		
	A =EntGame.SpawnAnimalOnPath(AID_NILECROC_M, "TreeEmerge03", 0, ST_WPT_WALK, 1,0,0,2.8);
	Animal.SetSnapToTerrain(A,false);
	Animal.SetCoinMode (A, CM_SPAWNREL);
	Animal.FaceEntity(A, entCamera );
	Animal.EnableFear(A,false);
			
	Script.WaitSec(2);	
				
	--4th Attacker
	A =EntGame.SpawnAnimalOnPath(AID_NILECROC_M, "TreeEmerge01", 0, ST_WPT_WALK, 1,0,0,2.9);
	Animal.SetSnapToTerrain(A,false);
	Animal.SetCoinMode (A, CM_SPAWNREL);
	Animal.FaceEntity(A, entCamera );
	Animal.EnableFear(A,false);
	
	Script.WaitSec(4);	
	
	A = EntGame.SpawnAnimalOnPath(AID_HIPPO_M, "ShorePath01", 0, ST_WPT_RUN, 1,-6,-7,0);
	Animal.SetSnapToTerrain(A,false);
	Animal.SetCoinMode (A, CM_SPAWNREL);
	Animal.FaceEntity(A, entCamera );
	A = EntGame.SpawnAnimalOnPath(AID_HIPPO_M, "ShorePath01", 0, ST_WPT_RUN, 1,-6,0,0);
	Animal.SetSnapToTerrain(A,false);
	Animal.SetCoinMode (A, CM_SPAWNREL);
	Animal.FaceEntity(A, entCamera );
	A = EntGame.SpawnAnimalOnPath(AID_HIPPO_M, "ShorePath01", 0, ST_WPT_RUN, 1,-6,7,-.5);
	Animal.SetSnapToTerrain(A,false);
	Animal.SetCoinMode (A, CM_SPAWNREL);
	Animal.FaceEntity(A, entCamera );
	
	Script.WaitSec(6);	
	Camera.SetPanOffset(entCamera, 0, 4.0);

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

function Part4()	

CoinOffset = 1.05;

	--Camera.JumpToWaypoint(entCamera, "CamWptJJ");
	
	Camera.SetSpeed(entCamera, .75, .5);
	
	Script.WaitSec(2);
		
	Camera.StopAtWaypoint(entCamera, "CamWptLL");	
	Camera.SetSpeed(entCamera, 1.35, .5);	
		
	Script.WaitSec(2);	
	A = EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "ShorePath01", 0, ST_WPT_RUN, 1,-6,-30,1);
	Animal.SetSnapToTerrain(A,false);
	Animal.SetCoinMode (A, CM_SPAWNREL);
	Animal.FaceEntity(A, entCamera );
	A = EntGame.SpawnAnimalOnPath(AID_WILDEBEEST_M, "ShorePath01", 0, ST_WPT_RUN, 1,-6,-26,1);
	Animal.SetSnapToTerrain(A,false);
	Animal.SetCoinMode (A, CM_SPAWNREL);
	Animal.FaceEntity(A, entCamera );
	A = EntGame.SpawnAnimalOnPath(AID_NILECROC_M, "ShorePath01", 0, ST_WPT_CHARGE, 1,-6,-20,1);
	Animal.SetSnapToTerrain(A,false);
	Animal.SetCoinMode (A, CM_SPAWNREL);
	Animal.FaceEntity(A, entCamera );
	
	Camera.SetSpeed(entCamera, 1.40, .5);
	
	Script.WaitSec(12);
	
	Sound.Play(smpLongGrowl, 1, DS2_VOLMAX, DS2_CENTER);
		
	Script.WaitSec(2);	
	
    end;    
-----------------------------------------------------------------------------------------------------------
function Part5()

CoinOffset = 1.05;

	--Camera.SetSpeed(entCamera, .00, 0.01);
	--Camera.JumpToWaypoint(entCamera, "CamWptLL");
			
	EntGame.ShowCaption(STR_LVL_1_5_H, 0, 4.0);
		
	--Crocs jump out of waterfall
	Script.WaitSec(1);
		
	A = EntGame.SpawnAnimalOnPath(AID_NILECROC_M, "WaterFallEmerge02", 0, ST_WPT_CHARGE, 1,0,0,.26); 	
	Animal.SetSnapToTerrain(A,false);
	Animal.SetCoinMode (A, CM_SPAWNREL);
	Animal.SetCoinOffset(A, CoinOffset);
	Animal.FaceEntity(A, entCamera );
	
	Script.WaitSec(3);	
	
	A = EntGame.SpawnAnimalOnPath(AID_NILECROC_M, "WaterFallEmerge01", 0, ST_WPT_CHARGE, 1,0,0,.25);
	Animal.SetSnapToTerrain(A,false);
	Animal.SetCoinMode (A, CM_SPAWNREL);
	Animal.SetCoinOffset(A, CoinOffset);
	Animal.FaceEntity(A, entCamera );
	
	Script.WaitSec(3);	
	
	A = EntGame.SpawnAnimalOnPath(AID_NILECROC_M, "FinalTreeEmerge01", 0, ST_WPT_CHARGE, 1,0,0,1);
	Animal.SetSnapToTerrain(A,false);
	Animal.SetCoinMode (A, CM_SPAWNREL);
	Animal.SetCoinOffset(A, CoinOffset);
	Animal.FaceEntity(A, entCamera );
	
	Script.WaitSec(3);	
	
	--1st Attacker
	A = EntGame.SpawnAnimalOnPath(AID_HIPPO_M, "WaterFallEmerge02", 0, ST_WPT_RUN, 1,0,0,.41);
	Animal.SetAutoChargeDist(A, 10.0);
	Animal.SetAttackType(A, ATK_STATIC);
	Animal.SetStaticAttackDist(A, 3.5);
	Animal.SetAttackRepeat(A, 1);
	Animal.SetPostAttackRand(A, false);
	Animal.SetPostAttackDir(A, 90);
	Animal.SetSnapToTerrain(A,false);
	Animal.SetCoinMode (A, CM_SPAWNREL);
	Animal.SetCoinOffset(A, CoinOffset);
	Animal.FaceEntity(A, entCamera );
	
	Script.WaitSec(4);	
	
	A = EntGame.SpawnAnimalOnPath(AID_HIPPO_M, "WaterFallEmerge01", 0, ST_WPT_RUN, 1,0,0,.41);
	Animal.SetAutoChargeDist(A, 20.0);
	Animal.SetAttackType(A, ATK_STRAFE);
	Animal.SetStrafeAttackDist(A, 5.8);
	Animal.SetPostAttackRand(A, false);
	Animal.SetPostAttackDir(A, 90);
	Animal.SetPostAttackTimer(A, 2);
	Animal.SetSnapToTerrain(A,false);
	Animal.SetCoinMode (A, CM_SPAWNREL);
	Animal.SetCoinOffset(A, CoinOffset);
	Animal.FaceEntity(A, entCamera );
	
	Script.WaitSec(2);	
	
	A = EntGame.SpawnAnimalOnPath(AID_HIPPO_M, "FinalTreeEmerge01", 0, ST_WPT_RUN, 1,0,0,.5);
	Animal.SetSnapToTerrain(A,false);
	Animal.SetCoinMode (A, CM_SPAWNREL);
	Animal.SetCoinOffset(A, CoinOffset);
	Animal.FaceEntity(A, entCamera );
	
	A = EntGame.SpawnAnimalOnPath(AID_NILECROC_M, "FinalTreeEmerge01", 0, ST_WPT_RUN, 1,0,0,1.0);
	Animal.SetSnapToTerrain(A,false);
	Animal.SetCoinMode (A, CM_SPAWNREL);
	Animal.SetCoinOffset(A, CoinOffset);
	Animal.FaceEntity(A, entCamera );
	
	Script.WaitSec(1);	
	
	A = EntGame.SpawnAnimalOnPath(AID_NILECROC_M, "WaterFallEmerge02", 0, ST_WPT_RUN, 1,0,0,1.0);
	Animal.SetSnapToTerrain(A,false);
	Animal.SetCoinMode (A, CM_SPAWNREL);
	Animal.SetCoinOffset(A, CoinOffset);
	Animal.FaceEntity(A, entCamera );	

    end;    
-----------------------------------------------------------------------------------------------------------
-- Main entry point

Setup();   
Part1();   
Part2();   
Part3(); 
Part4(); 
Part5(); 





