SarkBall
Class SarkBallDwarf

source: c:\runehov\SarkBall\Classes\SarkBallDwarf.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Inventory
         |
         +--Engine.Weapon
            |
            +--RuneI.NonStow
               |
               +--SarkBall.SarkBall
                  |
                  +--SarkBall.SarkBallScriptPawn
                     |
                     +--SarkBall.SarkBallDwarf
Direct Known Subclasses:None

class SarkBallDwarf
extends SarkBall.SarkBallScriptPawn

//----------------------------------------------------------- // //-----------------------------------------------------------
States
Settling, Pickup, Throw

Function Summary
 void HitGoal(Actor Other)
 
simulated
HitWall(vector HitNormal, Actor HitWall)
 void PickUpSarkBall(Pawn Other)
 void StartRound()


State Settling Function Summary
 void BeginState()


State Pickup Function Summary
 void BeginState()


State Throw Function Summary
 void BeginState()



Source Code


00001	//-----------------------------------------------------------
00002	//
00003	//-----------------------------------------------------------
00004	class SarkBallDwarf expands SarkBallScriptPawn;
00005	
00006	Function PickUpSarkBall(Pawn Other){
00007	  switch (int(RandRange(1,7))){
00008	    case 1: PlaySound(Sound'CreaturesSnd.Dwarves.attack04');
00009	    break;
00010	    case 2: PlaySound(Sound'CreaturesSnd.Dwarves.attack05');
00011	    break;
00012	    case 3: PlaySound(Sound'CreaturesSnd.Dwarves.attack06');
00013	    break;
00014	    case 4: PlaySound(Sound'CreaturesSnd.Dwarves.attack07');
00015	    break;
00016	    case 5: PlaySound(Sound'CreaturesSnd.Dwarves.attack08');
00017	    break;
00018	    case 6: PlaySound(Sound'CreaturesSnd.Dwarves.attack12');
00019	    break;
00020	    case 7: PlaySound(Sound'CreaturesSnd.Dwarves.attack13');
00021	    break;
00022	  }
00023	
00024	  Super.PickUpSarkBall(Other);
00025	}
00026	
00027	Function StartRound(){
00028	    switch (int(RandRange(1,6))){
00029	      case 1: PlaySound(Sound'CreaturesSnd.Dwarves.death06',Slot_None,3);
00030	        break;
00031	      case 2: PlaySound(Sound'CreaturesSnd.Dwarves.death08',Slot_None,3);
00032	        break;
00033	      case 3: PlaySound(Sound'CreaturesSnd.Dwarves.death09',Slot_None,3);
00034	        break;
00035	      case 4: PlaySound(Sound'CreaturesSnd.Dwarves.death10',Slot_None,3);
00036	        break;
00037	      case 5: PlaySound(Sound'CreaturesSnd.Dwarves.death12',Slot_None,3);
00038	        break;
00039	      case 6: PlaySound(Sound'CreaturesSnd.Dwarves.death14',Slot_None,3);
00040	        break;
00041	      case 6: PlaySound(Sound'CreaturesSnd.Dwarves.death13',Slot_None,3);
00042	        break;
00043	      }
00044	}
00045	
00046	Function HitGoal(Actor Other){
00047	
00048	  switch (int(RandRange(1,6))){
00049	      case 1: PlaySound(Sound'CreaturesSnd.Dwarves.death06',Slot_None,3);
00050	        break;
00051	      case 2: PlaySound(Sound'CreaturesSnd.Dwarves.death08',Slot_None,3);
00052	        break;
00053	      case 3: PlaySound(Sound'CreaturesSnd.Dwarves.death09',Slot_None,3);
00054	        break;
00055	      case 4: PlaySound(Sound'CreaturesSnd.Dwarves.death10',Slot_None,3);
00056	        break;
00057	      case 5: PlaySound(Sound'CreaturesSnd.Dwarves.death12',Slot_None,3);
00058	        break;
00059	      case 6: PlaySound(Sound'CreaturesSnd.Dwarves.death14',Slot_None,3);
00060	        break;
00061	      case 6: PlaySound(Sound'CreaturesSnd.Dwarves.death13',Slot_None,3);
00062	        break;
00063	  }
00064	}
00065	
00066	simulated function HitWall(vector HitNormal, actor HitWall){
00067	
00068	    switch (int(RandRange(1,5))){
00069	      case 1: PlaySound(Sound'CreaturesSnd.Dwarves.death05');
00070	        break;
00071	      case 2: PlaySound(Sound'CreaturesSnd.Dwarves.death06');
00072	        break;
00073	      case 3: PlaySound(Sound'CreaturesSnd.Dwarves.death08');
00074	        break;
00075	      case 4: PlaySound(Sound'CreaturesSnd.Dwarves.death09');
00076	        break;
00077	      case 5: PlaySound(Sound'CreaturesSnd.Dwarves.death12');
00078	        break;
00079	  }
00080	  Super.HitWall(HitNormal,HitWall);
00081	}
00082	
00083	State Throw{
00084	  Function BeginState(){
00085	    Super.BeginState();
00086	    switch (int(RandRange(1,4))){
00087	      case 1: PlaySound(Sound'CreaturesSnd.Dwarves.grunt10');
00088	        break;
00089	      case 2: PlaySound(Sound'CreaturesSnd.Dwarves.grunt11');
00090	        break;
00091	      case 3: PlaySound(Sound'CreaturesSnd.Dwarves.grunt12');
00092	        break;
00093	      case 4: PlaySound(Sound'CreaturesSnd.Dwarves.grunt13');
00094	        break;
00095	    }
00096	    Super.BeginState();
00097	  }
00098	}
00099	
00100	auto state Pickup{
00101	
00102	  function BeginState(){
00103	    switch (int(RandRange(1,7))){
00104	      case 1: PlaySound(Sound'CreaturesSnd.Dwarves.see03');
00105	        break;
00106	      case 2: PlaySound(Sound'CreaturesSnd.Dwarves.see04');
00107	        break;
00108	      case 3: PlaySound(Sound'CreaturesSnd.Dwarves.word02');
00109	        break;
00110	      case 4: PlaySound(Sound'CreaturesSnd.Dwarves.word04');
00111	        break;
00112	      case 5: PlaySound(Sound'CreaturesSnd.Dwarves.word07');
00113	        break;
00114	      case 6: PlaySound(Sound'CreaturesSnd.Dwarves.word13');
00115	        break;
00116	      case 7: PlaySound(Sound'CreaturesSnd.Dwarves.word16');
00117	        break;
00118	    }
00119	    Super.BeginState();
00120	  }
00121	}
00122	
00123	State Settling{
00124	
00125	  Function BeginState(){
00126	    switch (int(RandRange(1,6))){
00127	      case 1: PlaySound(Sound'CreaturesSnd.Dwarves.death06',Slot_None,3);
00128	        break;
00129	      case 2: PlaySound(Sound'CreaturesSnd.Dwarves.death08',Slot_None,3);
00130	        break;
00131	      case 3: PlaySound(Sound'CreaturesSnd.Dwarves.death09',Slot_None,3);
00132	        break;
00133	      case 4: PlaySound(Sound'CreaturesSnd.Dwarves.death10',Slot_None,3);
00134	        break;
00135	      case 5: PlaySound(Sound'CreaturesSnd.Dwarves.death12',Slot_None,3);
00136	        break;
00137	      case 6: PlaySound(Sound'CreaturesSnd.Dwarves.death13',Slot_None,3);
00138	        break;
00139	
00140	      }
00141	    Super.BeginState();
00142	  }
00143	
00144	}
00145	
00146	defaultproperties
00147	{
00148	    DrawScale=0.60
00149	}

End Source Code