-----------------------------------------------------------------------------
-- Stage 3-2
-----------------------------------------------------------------------------
-- GLOBALS

function SpawnIntroAnimals()

    a =  EntGame.SpawnAnimalOnPath(AID_KUDU_M, "IntroCamAnimalsPath1", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
    Animal.SetLoopAtPathEnd(a, true);
    b =  EntGame.SpawnAnimalOnPath(AID_KUDU_M, "IntroCamAnimalsPath2", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
    Animal.SetLoopAtPathEnd(b, true);
     
    end;
    
-----------------------------------------------------------------------------    

function PostStage()

    EntGame.EnablePlayerControl(false);
    EntGame.ClearFlag(GF_READYTOSTART);
    EntGame.BindCameraToEntity("OutroCamera");
    
    Sound.Release(smpLeopardRoar);
  
    end;     
    
-----------------------------------------------------------------------------    
-- Setup

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

    -- load world
    SetupWorld("Maps\\WorldHiddenCrater\\HiddenCraterCommon.ini", "Maps\\Stage3-2\\Stage3-2.ini","","");
    EntGame.CreatePlayerEntities();
    
	EntGame.SetGlobalDustColorInitial(1.0, 0.64, .35, .2);
    EntGame.SetGlobalDustColorFinal  (0.0, 0.64, .35, .2);
    
    EntGame.SetStageTimer(150);
    
    -- load sounds
    smpLeopardRoar = Sound.Load("Sound\\Animals\\LeopardRoar.wav");

    EntGame.LoadAnimal(AID_SPURWINGGOOSE_M);
    EntGame.LoadAnimal(AID_MEERKAT_M);
	EntGame.LoadAnimal(AID_LEOPARD_M);	
	EntGame.LoadAnimal(AID_KUDU_M);
	EntGame.LoadAnimal(AID_KUDU_F);
        
    SpawnIntroAnimals();	

 	StartupSequence("Music\\Visibly Shaken Underscore.ogg");

	EntGame.DestroyAllAnimals();
	
	
 --S   Animal.SetState(a, ST_GONE);
 --S   Animal.SetState(b, ST_GONE);
      
    end;
-----------------------------------------------------------------------------

function Part1()

	Camera.SetSpeed(entCamera, 0.0, 0.1);	    
	Camera.JumpToWaypoint(entCamera, "CamWptAA");
	
	EntGame.SpawnAnimalOnPath(AID_KUDU_M, "FollowPathAlpha5", 0, ST_WPT_RUN, 0, 0, 0, 1.2);  
   	EntGame.SpawnAnimalOnPath(AID_KUDU_M, "FollowPathAlpha1", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
   	Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_KUDU_M, "FollowPathAlpha2", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_KUDU_M, "FollowPathAlpha5", 0, ST_WPT_RUN, 0, 0, 0, 1.2);  
   	EntGame.SpawnAnimalOnPath(AID_KUDU_M, "FollowPathAlpha1", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha22", 0, 2, 1, 0, 1.2);
    Script.WaitSec(.25);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha22", 0, 0, 1, -1, .88);
    Script.WaitSec(.25);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha22", 0, 2, 1, 1, .6);	
    Script.WaitSec(.25);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha22", 0, 0, 2, 0, .88);
    Script.WaitSec(.25);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha22", 0, 0, 0, 2, .5);
	
	
	EntGame.SpawnAnimalOnPath(AID_MEERKAT_M, "MeerkatPath4", 0, ST_WPT_RUN, 0, 0, 0, 1.5); 
	Script.WaitSec(.2);
	EntGame.SpawnAnimalOnPath(AID_MEERKAT_M, "MeerkatPath4", 0, ST_WPT_RUN, 0, 0, 0, 1.3); 
	Script.WaitSec(.2);
	EntGame.SpawnAnimalOnPath(AID_MEERKAT_M, "MeerkatPath4", 0, ST_WPT_RUN, 0, 0, 0, 1.1);  
	Script.WaitSec(1);
	EntGame.SpawnAnimalOnPath(AID_MEERKAT_M, "MeerkatPath4", 0, ST_WPT_RUN, 0, 0, 0, 1.5); 
	EntGame.SpawnAnimalOnPath(AID_MEERKAT_M, "MeerkatPath4", 0, ST_WPT_RUN, 0, 0, 0, 1.2);  
	EntGame.SpawnAnimalOnPath(AID_KUDU_M, "FollowPathAlpha3", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	Script.WaitSec(1);
	EntGame.SpawnAnimalOnPath(AID_KUDU_M, "FollowPathAlpha4", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	
	Script.WaitSec(10);
	
	EntGame.SpawnAnimalOnPath(AID_KUDU_M, "FollowPathAlpha2", 0, ST_WPT_RUN, 0, 0, 0, 1.5);
	Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_KUDU_M, "FollowPathAlpha3", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	EntGame.SpawnAnimalOnPath(AID_KUDU_M, "FollowPathAlpha4", 0, ST_WPT_RUN, 0, 0, 0, 1.5);
	
	a=EntGame.SpawnAnimalOnPath(AID_MEERKAT_M, "MeerkatPath1", 0, ST_POPUP, 4, 0, 0, 1);      
    Animal.FaceEntity(a, entCamera);
    
    Script.WaitSec(1.5);
    
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha22", 0, 0, 1, 0, 1.2);
    Script.WaitSec(.25);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha22", 0, 0, 0, -1, .88);
    Script.WaitSec(.25);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha22", 0, 0, 1, 1, .6);	
    Script.WaitSec(.5);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha22", 0, 0, 2, 0, .88);
    Script.WaitSec(.25);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha22", 0, 0, 0, 2, .5);
    Script.WaitSec(.25);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha22", 0, 1, 1, 1, .4);	
    
    a=EntGame.SpawnAnimalOnPath(AID_MEERKAT_M, "MeerkatPath3", 0, ST_POPUP, 4, 0, 0, 1);      
    Animal.FaceEntity(a, entCamera);
    Script.WaitSec(3);
    a=EntGame.SpawnAnimalOnPath(AID_MEERKAT_M, "MeerkatPath2", 0, ST_POPUP, 4, 0, 0, 1);      
    Animal.FaceEntity(a, entCamera);
   
	Script.WaitSec(6);
	EntGame.SpawnAnimalOnPath(AID_KUDU_M, "FollowPathAlpha9", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	EntGame.SpawnAnimalOnPath(AID_KUDU_F, "FollowPathAlpha5", 0, ST_WPT_RUN, 0, 0, 0, .85);
	Script.WaitSec(3);
		
	Sound.Play(smpLeopardRoar, 1, DS2_VOLMAX, DS2_RIGHT);
	
	a = EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "FollowPathAlpha9",0, ST_WPT_RUN, 1,0,0,1.2);
	Animal.FaceEntity(a, entCamera );
	Animal.SetChargeWhenShot(a, true);	
	Animal.SetAttackType(a, ATK_STRAFE);
	Animal.SetStrafeAttackDist(a, 6.5);
	
	Script.WaitSec(2);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha24", 0, 0, 1, 0, 1.2);
    Script.WaitSec(.25);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha24", 0, 0, 0, -1, .88);
    Script.WaitSec(.25);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha24", 0, 0, 1, 1, .6);	
    Script.WaitSec(.5);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha24", 0, 0, 2, 0, .88);
		
	a=EntGame.SpawnAnimalOnPath(AID_MEERKAT_M, "MeerkatPath3", 0, ST_POPUP, 4, 0, 0, 1);      
    Animal.FaceEntity(a, entCamera);
	
    end;
    
-----------------------------------------------------------------------------

function Part2()


	Camera.SetSpeed(entCamera, 2.0, 0.1);
	Camera.StopAtWaypoint(entCamera, "CamWptGG");
	
	EntGame.ShowCaption(STR_LVL_3_2_A, 0, 4.0);
	
	EntGame.SpawnAnimalOnPath(AID_KUDU_M, "FollowPathAlpha1", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	EntGame.SpawnAnimalOnPath(AID_KUDU_M, "FollowPathAlpha2", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	Script.WaitSec(9.25);
	EntGame.SpawnAnimalOnPath(AID_KUDU_F, "FollowPathAlpha3", 2, ST_WPT_RUN, 0, 0, 0, 1.2);
	EntGame.SpawnAnimalOnPath(AID_KUDU_M, "FollowPathAlpha3", 2, ST_WPT_RUN, 0, 0, -2, 1.33);
	
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha23", 0, 1, -1, 0, 1.2);
    Script.WaitSec(.25);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha23", 0, 0, 0, -1, .88);
    Script.WaitSec(.25);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha23", 0, 1, 1, 1, .6);	
    Script.WaitSec(.5);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha23", 0, 0, -2, 0, .88);
    Script.WaitSec(.25);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha23", 0, 1, 0, 2, .5);
    Script.WaitSec(2.75);	

	a=EntGame.SpawnAnimalOnPath(AID_MEERKAT_M, "MeerkatPath14", 0, ST_POPUP, 4, 0, 0, 1);      
    Animal.FaceEntity(a, entCamera);
	
	a = EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "FollowPathAlpha3",0, ST_WPT_RUN, 0,0,0,1.3);
	Animal.FaceEntity(a, entCamera );
	Script.WaitSec(2);
	a = EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "FollowPathAlpha3",0, ST_WPT_RUN, 0,2,2,1.3);
	Animal.FaceEntity(a, entCamera );
	Script.WaitSec(1); 	
    EntGame.SpawnAnimalOnPath(AID_KUDU_M, "FollowPathAlpha3", 2, ST_WPT_RUN, 0, 0, 0, 1.2);
    Script.WaitSec(2); 
    
    a=EntGame.SpawnAnimalOnPath(AID_MEERKAT_M, "MeerkatPath5", 0, ST_POPUP, 4, 0, 0, 1);      
    Animal.FaceEntity(a, entCamera);
    Script.WaitSec(1);
    			
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha23", 0, 0, 1, 0, 1.2);
    Script.WaitSec(.25);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha23", 0, 0, 0, -1, .88);
    Script.WaitSec(.25);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha23", 0, 0, 1, 1, .6);	
    Script.WaitSec(.5);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha23", 0, 0, 2, 0, .88);
    Script.WaitSec(.25);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha23", 0, 0, 0, 2, .5);
    Script.WaitSec(.25);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha23", 0, 1, 1, 1, .4);	

	Script.WaitSec(5);	
	Sound.Play(smpLeopardRoar, 1, DS2_VOLMAX, DS2_RIGHT);
	    	
	a=EntGame.SpawnAnimalOnPath(AID_MEERKAT_M, "MeerkatPath13", 0, ST_POPUP, 4, 0, 0, 1);      
    Animal.FaceEntity(a, entCamera);
	EntGame.SpawnAnimalOnPath(AID_KUDU_M, "FollowPathAlpha6", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	EntGame.SpawnAnimalOnPath(AID_KUDU_F, "FollowPathAlpha6", 0, ST_WPT_RUN, -1, 0, -1, 1.2);
	
	Script.WaitSec(2);
		
	a = EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "FollowPathAlpha6",0, ST_WPT_RUN, 1,0,0,1.2);
	Animal.FaceEntity(a, entCamera );
	Animal.SetAutoChargeDist(a, 30);
	Animal.SetChargeWhenShot(a, true);	
	Animal.SetAttackType(a, ATK_STRAFE);
	Animal.SetStrafeAttackDist(a, 6.5);
	
	Script.WaitSec(2.5);
	
	EntGame.SpawnAnimalOnPath(AID_KUDU_M, "FollowPathAlpha10", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	EntGame.SpawnAnimalOnPath(AID_KUDU_F, "FollowPathAlpha7", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
 
	Script.WaitSec(4);
		
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha25", 0, 0, 1, 0, 1.2);
    Script.WaitSec(.25);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha25", 0, 1, 0, -1, .88);
    Script.WaitSec(.25);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha25", 0, 0, 1, 1, .6);	
    Script.WaitSec(.5);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha25", 0, 1, 2, 0, .88);
    Script.WaitSec(.25);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha25", 0, 0, 1, 2, .5);
    Script.WaitSec(.25);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha25", 0, 1, 1, 1, .4);	
	
	EntGame.SpawnAnimalOnPath(AID_KUDU_M, "FollowPathAlpha10", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	EntGame.SpawnAnimalOnPath(AID_KUDU_F, "FollowPathAlpha7", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	Script.WaitSec(2);
	EntGame.SpawnAnimalOnPath(AID_KUDU_M, "FollowPathAlpha10", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	EntGame.SpawnAnimalOnPath(AID_KUDU_F, "FollowPathAlpha7", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	
	Script.WaitSec(2);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha25", 0, 0, 1, 0, 1.2);
    Script.WaitSec(.25);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha25", 0, 1, 0, -1, .88);
    Script.WaitSec(.25);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha25", 0, 0, 1, 1, .6);	
    Script.WaitSec(.5);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha25", 0, 1, 2, 0, .88);
    Script.WaitSec(.25);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha25", 0, 0, 1, 2, .5);
    Script.WaitSec(.25);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha25", 0, 1, 1, 1, .4);	
	Script.WaitSec(4.5);

	a = EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "FollowPathAlpha13",0, ST_WPT_RUN, 4,0,0,1.3);
	Animal.FaceEntity(a, entCamera );
	
	Script.WaitSec(2);

	EntGame.SpawnAnimalOnPath(AID_KUDU_M, "FollowPathAlpha11", 0, ST_WPT_RUN, 0, 0, -1, .9);	
	EntGame.SpawnAnimalOnPath(AID_KUDU_M, "FollowPathAlpha12", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	EntGame.SpawnAnimalOnPath(AID_KUDU_M, "FollowPathAlpha12", 0, ST_WPT_RUN, 1, 0, 2, 1.0);
	
	Script.WaitSec(4);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha26", 0, 0, 1, 0, 1.2);
    Script.WaitSec(.25);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha26", 0, 1, 0, -1, .88);
    Script.WaitSec(.25);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha26", 0, 0, 1, 1, .6);	
    Script.WaitSec(.5);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha26", 0, 1, 2, 0, .88);
    Script.WaitSec(.25);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha26", 0, 0, 1, 2, .5);
    Script.WaitSec(.25);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha26", 0, 1, 1, 1, .4);	
    
	Script.WaitSec(2);
		
	a=EntGame.SpawnAnimalOnPath(AID_MEERKAT_M, "MeerkatPath15", 0, ST_POPUP, 4, 0, 0, 1);      
    Animal.FaceEntity(a, entCamera);
    Script.WaitSec(8);
    a=EntGame.SpawnAnimalOnPath(AID_MEERKAT_M, "MeerkatPath9", 0, ST_POPUP, 4, 0, 0, 1);      
    Animal.FaceEntity(a, entCamera);
    Animal.SetElvOffset(a, -.1);
    Script.WaitSec(2);
    a=EntGame.SpawnAnimalOnPath(AID_MEERKAT_M, "MeerkatPath8", 0, ST_POPUP, 4, 0, 0, 1);      
    Animal.FaceEntity(a, entCamera);
    Animal.SetElvOffset(a, -.1);
    Script.WaitSec(2);
    a=EntGame.SpawnAnimalOnPath(AID_MEERKAT_M, "MeerkatPath7", 0, ST_POPUP, 2, 0, 0, 1);      
    Animal.FaceEntity(a, entCamera);
    Animal.SetElvOffset(a, -.1);
    Script.WaitSec(1);
		
   	EntGame.SpawnAnimalOnPath(AID_KUDU_M, "FollowPathAlpha14", 0, ST_WPT_RUN, 0, 0, 0, 1.0);
	
    a=EntGame.SpawnAnimalOnPath(AID_MEERKAT_M, "MeerkatPath6", 0, ST_POPUP, 4, 0, 0, 1);      
    Animal.FaceEntity(a, entCamera);
    Animal.SetElvOffset(a, -.1);
	Script.WaitSec(1);
    a=EntGame.SpawnAnimalOnPath(AID_MEERKAT_M, "MeerkatPath9", 0, ST_POPUP, 4, 0, 0, 1);      
    Animal.FaceEntity(a, entCamera);
    Animal.SetElvOffset(a, -.1);
	Script.WaitSec(.6); 
	a=EntGame.SpawnAnimalOnPath(AID_MEERKAT_M, "MeerkatPath12", 0, ST_POPUP, 4, 0, 0, 1);      
    Animal.FaceEntity(a, entCamera);
    Animal.SetElvOffset(a, -.1);
	
    a=EntGame.SpawnAnimalOnPath(AID_MEERKAT_M, "MeerkatPath8", 0, ST_POPUP, 4, 0, 0, 1);      
    Animal.FaceEntity(a, entCamera);
    Animal.SetElvOffset(a, -.1);
    
	Script.WaitSec(.5);
		
    a=EntGame.SpawnAnimalOnPath(AID_MEERKAT_M, "MeerkatPath7", 0, ST_POPUP, 4, 0, 0, 1);      
    Animal.FaceEntity(a, entCamera);
    Animal.SetElvOffset(a, -.1);
    
    Script.WaitSec(4);
    	
  	a=EntGame.SpawnAnimalOnPath(AID_MEERKAT_M, "MeerkatPath16", 0, ST_POPUP, 4, 0, 0, 1);      
    Animal.FaceEntity(a, entCamera);
    Animal.SetElvOffset(a, -.1);
    	
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha26", 0, 0, 1, 0, 1.2);
    Script.WaitSec(.25);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha26", 0, 1, 0, -1, .88);
    Script.WaitSec(.25);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha26", 0, 0, 1, 1, .6);	
    Script.WaitSec(.5);    
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha26", 0, 1, 2, 0, .88);
    Script.WaitSec(.25);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha26", 0, 0, 1, 2, .5);
    Script.WaitSec(.25);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha26", 0, 1, 1, 1, .4);	
    EntGame.SpawnAnimalOnPath(AID_KUDU_M, "FollowPathAlpha15", 0, ST_WPT_RUN, -3, 0, -3, 1.2);
    
    Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_KUDU_M, "FollowPathAlpha15", 0, ST_WPT_RUN, 0, 0, 0, 1.1);
	
	Script.WaitSec(1.2);
	
	EntGame.SpawnAnimalOnPath(AID_KUDU_M, "FollowPathAlpha16", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	
	Script.WaitSec(6.5);
		
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha26", 0, 0, 1, 0, 1.2);
    Script.WaitSec(.25);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha26", 0, 2, 1, -1, .88);
    Script.WaitSec(.25);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha26", 0, 0, 1, 1, .6);	
    Script.WaitSec(.5);    
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha26", 0, 1, 2, 0, .88);
    Script.WaitSec(.25);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha26", 0, -2, 1, 2, .5);
    Script.WaitSec(.25);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha26", 0, 1, 1, 1, .4);	
        
	Sound.Play(smpLeopardRoar, 1, DS2_VOLMAX, DS2_RIGHT);
	
	a = EntGame.SpawnAnimalOnPath(AID_LEOPARD_M, "FollowPathAlpha16",0, ST_WPT_RUN, 1,0,0,1.3);
	Animal.FaceEntity(a, entCamera );
	Animal.SetAutoChargeDist(a, 15.0);
	Animal.SetAttackType(a, ATK_STATIC);
	Animal.SetAttackRepeat(a, 2);
	Animal.SetPostAttackRand(a, false);
	Animal.SetPostAttackDir(a, -90);
	
	Script.WaitSec(5);
	
    end;
        
-----------------------------------------------------------------------------

function Part3()
	
	EntGame.SpawnAnimalOnPath(AID_KUDU_M, "FollowPathAlpha17", 0, ST_WPT_RUN, 0, 0, -1, .9);
	Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_KUDU_M, "FollowPathAlpha18", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_KUDU_M, "FollowPathAlpha19", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	
	a=EntGame.SpawnAnimalOnPath(AID_MEERKAT_M, "MeerkatPath17", 0, ST_POPUP, 4, 0, 0, 1);      
    Animal.FaceEntity(a, entCamera);
    
	Script.WaitSec(6);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha26", 0, 0, 1, 0, 1.2);
    Script.WaitSec(.25);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha26", 0, 2, 1, -1, .88);
    Script.WaitSec(.25);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha26", 0, 0, 1, 1, .6);	
    Script.WaitSec(.5);    
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha26", 0, 1, 2, 0, .88);
    Script.WaitSec(.25);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha26", 0, -2, 1, 2, .5);
    Script.WaitSec(.25);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha26", 0, 1, 1, 1, .4);
    
    Script.WaitSec(2);
	EntGame.SpawnAnimalOnPath(AID_KUDU_M, "FollowPathAlpha17", 0, ST_WPT_RUN, 0, 0, -1, .9);
	EntGame.SpawnAnimalOnPath(AID_KUDU_M, "FollowPathAlpha18", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	Script.WaitSec(.5);
	EntGame.SpawnAnimalOnPath(AID_KUDU_M, "FollowPathAlpha19", 0, ST_WPT_RUN, 0, 0, 0, 1.2);
	Script.WaitSec(2);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha26", 0, -1, 0, 1, 1);	
    Script.WaitSec(.5);    
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha26", 0, 1, -2, 0, .9);
    Script.WaitSec(.25);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha26", 0, -2, -1, 2, .8);
    Script.WaitSec(.25);
    EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha26", 0, 1, 1, 1, .7);
	Script.WaitSec(2);
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha26", 0, -1, 0, 1, 1);	
    Script.WaitSec(.5);    
	EntGame.SpawnBirdOnPath(AID_SPURWINGGOOSE_M, "FollowPathAlpha26", 0, 1, -2, 0, .9);
	EntGame.SpawnAnimalOnPath(AID_KUDU_F, "FollowPathAlpha19", 0, ST_WPT_RUN, 0, 0, -1, 1.3);
	EntGame.SpawnAnimalOnPath(AID_KUDU_M, "FollowPathAlpha20", 0, ST_WPT_RUN, 0, 0, 0, 1.1);
	Script.WaitSec(1.25);
	EntGame.SpawnAnimalOnPath(AID_KUDU_M, "FollowPathAlpha21", 0, ST_WPT_RUN, 1, 0, 1, 1.0);
	
    end;
       
-----------------------------------------------------------------------------

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

