RuneI
Class GiantCrab

source: c:\runehov\RuneI\Classes\GiantCrab.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Pawn
         |
         +--RuneI.ScriptPawn
            |
            +--RuneI.GiantCrab
Direct Known Subclasses:BabyCrab

class GiantCrab
extends RuneI.ScriptPawn

//============================================================================= // GiantCrab. //=============================================================================
Variables
 CrabPincer LeftClaw
           Covered up inside shell
 float ThrowZ
           Z velocity to throw off when on back
 bool bCamouflage
           Uses start spot texture as camouflage
 bool bFightHigh
           Whether to use rear up attack
 bool bInShell
           Covered up inside shell
 int stallcount
           Covered up inside shell

States
Dying, MonkeyOnBack, Flipped, FightingLow, FightingHigh, Charging, Fleeing, Acquisition, InShell

Function Summary
 void AfterSpawningInventory()
     
//================================================
//
// AfterSpawningInventory
//
// Used to spawn additional chained weapon
//================================================
 void Attach(Actor Other)
 bool BodyPartCritical(int BodyPart)
     
//============================================================
//
// BodyPartCritical
//
//============================================================
 int BodyPartForJoint(int joint)
     
//============================================================
//
// BodyPartForJoint
//
// Returns the body part a joint is associated with
//============================================================
 int BodyPartForPolyGroup(int polygroup)
     
//============================================================
//
// BodyPartForPolyGroup
//
//============================================================
 bool BodyPartSeverable(int BodyPart)
     
//============================================================
//
// BodyPartSeverable
//
//============================================================
 void Bump(Actor Other)
     
//===================================================================
//
// Bump
//
// If Pawns bump a destroyable decoration, they should smash it
//===================================================================
 bool CanPickup(Inventory item)
     
//================================================
//
// CanPickup
//
// Let's pawn dictate what it can pick up
//================================================
 void CrabAttack()
 void CrabWalking(vector src, vector dst, rotator rot)
     
//============================================================
// Animation functions
//============================================================
 bool DamageBodyPart(int Damage, Pawn EventInstigator, vector HitLocation, vector Momentum, name DamageType, int bodypart)
     
//============================================================
//
// DamageBodyPart
//
//============================================================
 void DropLeftWeapon()
 void DropRightWeapon()
 name GetGroup(name sequence)
 int LimbPassThrough(int BodyPart, int Blunt, int Sever)
     
//============================================================
//
// LimbPassThrough
//
// Determines what damage is passed through to body
//============================================================
 void LimbSevered(int BodyPart, vector Momentum)
     
//============================================================
//
// LimbSevered
//
//============================================================
 void MakeTwitchable()
     
//------------------------------------------------------------
//
// MakeTwitchable
//
// TODO: Move logic into carcass
//------------------------------------------------------------
 EMatterType MatterForJoint(int joint)
     
//============================================================
//
// MatterForJoint
//
// Returns what kind of material joint is associated with
//============================================================
 Texture PainSkin(int BodyPart)
     
//============================================================
//
// PainSkin
//
// returns the pain skin for a given polygroup
//============================================================
 void PlayDeath(name DamageType)
 void PlayMoving(optional float)
 void PlayTurnTo(rotator targetangle)
 void PlayWaiting(optional float)
 void PostBeginPlay()
 void ThrowOffMonkeys()


State Dying Function Summary
 bool DamageBodyPart(int Damage, Pawn EventInstigator, vector HitLocation, vector Momentum, name DamageType, int bodypart)
 void Attach(Actor Other)
 void EndState()
 void AmbientSoundTimer()
 void AltWeaponDeactivate()
 void AltWeaponActivate()
 void WeaponDeactivate()
 void WeaponActivate()
 bool SetEnemy(Actor NewEnemy)
 void BeginState()
 void Attach(Actor Other)


State MonkeyOnBack Function Summary


State Flipped Function Summary
 void EndState()
 void KnockBack()
 void Attach(Actor Other)
 void Timer()
 void TryToGetUp()


State FightingLow Function Summary
 void EndState()
 void AmbientSoundTimer()
 void AltWeaponDeactivate()
 void AltWeaponActivate()
 void WeaponDeactivate()
 void WeaponActivate()


State FightingHigh Function Summary
 void CauseQuake()
 void WeaponDeactivate()
 void WeaponActivate()
 void AmbientSoundTimer()
 void EndState()


State Charging Function Summary
 void PickDestinationBackAway()
 void PickDestination()
 void HitWall(vector HitNormal, Actor Wall)
 void EnemyNotVisible()
 void MayFall()
     
//, EndState;


State Fleeing Function Summary
 void AmbientSoundTimer()


State Acquisition Function Summary


State InShell Function Summary
 void EndState()
 bool SetEnemy(Actor NewEnemy)
 void AmbientSoundTimer()



Source Code


00001	//=============================================================================
00002	// GiantCrab.
00003	//=============================================================================
00004	class GiantCrab expands ScriptPawn;
00005	
00006	
00007	/* Description:
00008		Sidesteps around towards enemy.  When annoyed, rears up on back legs
00009		and tries to knock enemy down.  If enemy jumps on him, he rears up and
00010		knocks him off.  When severely damaged, will tuck back into it's shell.
00011		If rearing up, has the possiblity of being flipped over by a blow to
00012		underside. Will not willingly go in water.  Can only be damaged by striking
00013		on soft underbelly while reared up.
00014	
00015	   Behaviors:
00016		-Free Roaming (sidesteps towards enemies)
00017		-Guarding a spot
00018	
00019	   Resources needed:
00020		SnapMiss, SnapHit, idle, walk, pain sounds
00021	
00022	   TODO:
00023		pause after throwing off
00024		sometimes defend by covering up
00025		Handle narrow walls, hitwalls better
00026	*/
00027	
00028	var() bool	bCamouflage;	// Uses start spot texture as camouflage
00029	var() bool	bFightHigh;		// Whether to use rear up attack
00030	var() float	ThrowZ;			// Z velocity to throw off when on back
00031	var() bool	bInShell;		// Covered up inside shell
00032	var CrabPincer LeftClaw;
00033	var int stallcount;
00034	
00035	var(Sounds) Sound		RearUpSound;
00036	var(Sounds) Sound		UpsideDownSound;
00037	var(Sounds) Sound		ThrowoffSound;
00038	
00039	
00040	//================================================
00041	//
00042	// AfterSpawningInventory
00043	//
00044	// Used to spawn additional chained weapon
00045	//================================================
00046	function AfterSpawningInventory()
00047	{
00048	
00049		LeftClaw = Spawn(class'crabpincer');
00050		LeftClaw.SetOwner(self);
00051		AttachActorToJoint(LeftClaw, 23);	// Attach to left wrist
00052		InvisibleWeapon(Weapon).ChainOnWeapon(LeftClaw);
00053		LeftClaw.GotoState('Active');
00054	}
00055	
00056	function DropLeftWeapon()
00057	{
00058		LeftClaw=None;
00059		if (Weapon != None && InvisibleWeapon(Weapon) != None)
00060		{
00061			if (InvisibleWeapon(Weapon).ChainedWeapon == None)
00062			{
00063				DetachActorFromJoint(23);
00064				Weapon.Destroy();
00065				Weapon = None;
00066			}
00067			else
00068			{
00069				DetachActorFromJoint(23);
00070				InvisibleWeapon(Weapon).ChainedWeapon.Destroy();
00071				InvisibleWeapon(Weapon).ChainedWeapon = None;
00072			}
00073		}
00074	}
00075	
00076	function DropRightWeapon()
00077	{
00078		local InvisibleWeapon removing;
00079	
00080		if (Weapon != None && InvisibleWeapon(Weapon) != None)
00081		{
00082			removing = InvisibleWeapon(Weapon);
00083			DetachActorFromJoint(JointNamed(WeaponJoint));
00084			Weapon = removing.ChainedWeapon;
00085			removing.ChainedWeapon = None;
00086			removing.Destroy();
00087		}
00088	}
00089	
00090	function ThrowOffMonkeys()
00091	{
00092		local actor Other;
00093		local vector X,Y,Z,vel;
00094	
00095		GetAxes(Rotation, X,Y,Z);
00096		vel = -200*X + ThrowZ*Z;
00097		foreach BasedActors(class'actor', Other)
00098		{
00099			Other.Velocity += vel;
00100			Other.SetPhysics(PHYS_Falling);
00101		}
00102	}
00103	
00104	//================================================
00105	//
00106	// CanPickup
00107	//
00108	// Let's pawn dictate what it can pick up
00109	//================================================
00110	function bool CanPickup(Inventory item)
00111	{
00112		return item.IsA('CrabPincer');
00113	}
00114	
00115	
00116	function PostBeginPlay()
00117	{
00118		local Texture tex;
00119		local int Flags;
00120		local vector ScrollDir;
00121	
00122		Super.PostBeginPlay();
00123	//	bInShell = true;
00124	
00125		// Grab shell texture from surroundings
00126		if (bCamouflage)
00127		{
00128			tex = TraceTexture(Location+vect(0,0,-100), Location, Flags, ScrollDir);
00129			if (tex != None)
00130			{
00131				SkelGroupSkins[1] = tex;
00132			}
00133		}
00134	}
00135	
00136	
00137	function Attach(actor Other)
00138	{	// Someone landed on me
00139		if (Health > 0 && AlertOrders != 'NoMove')
00140			GotoState('MonkeyOnBack');
00141	}
00142	
00143	
00144	//============================================================
00145	// Localized Damage Support functions
00146	//============================================================
00147	
00148	//============================================================
00149	//
00150	// PainSkin
00151	//
00152	// returns the pain skin for a given polygroup
00153	//============================================================
00154	function Texture PainSkin(int BodyPart)
00155	{
00156		switch(BodyPart)
00157		{
00158			case BODYPART_LARM1:
00159			case BODYPART_RARM1:
00160			case BODYPART_TORSO:
00161				break;
00162	
00163			case BODYPART_HEAD:		// undercarriage
00164				if (SkelGroupSkins[1] == Texture'creatures.giantcrabcrab3')
00165					SkelGroupSkins[1] = Texture'creatures.giantcrabcrabpain';
00166				break;
00167			case BODYPART_RLEG1:	// legs
00168				if (SkelGroupSkins[1] == Texture'creatures.giantcrabcrab3')
00169					SkelGroupSkins[1] = Texture'creatures.giantcrabcrabpain';
00170				SkelGroupSkins[7] = Texture'creatures.giantcrabcrabpain';
00171				break;
00172			case BODYPART_RLEG2:
00173				if (SkelGroupSkins[1] == Texture'creatures.giantcrabcrab3')
00174					SkelGroupSkins[1] = Texture'creatures.giantcrabcrabpain';
00175				SkelGroupSkins[8] = Texture'creatures.giantcrabcrabpain';
00176				break;
00177			case BODYPART_RARM2:
00178				if (SkelGroupSkins[1] == Texture'creatures.giantcrabcrab3')
00179					SkelGroupSkins[1] = Texture'creatures.giantcrabcrabpain';
00180				SkelGroupSkins[9] = Texture'creatures.giantcrabcrabpain';
00181				break;
00182			case BODYPART_LLEG1:
00183				if (SkelGroupSkins[1] == Texture'creatures.giantcrabcrab3')
00184					SkelGroupSkins[1] = Texture'creatures.giantcrabcrabpain';
00185				SkelGroupSkins[4] = Texture'creatures.giantcrabcrabpain';
00186				break;
00187			case BODYPART_LLEG2:
00188				if (SkelGroupSkins[1] == Texture'creatures.giantcrabcrab3')
00189					SkelGroupSkins[1] = Texture'creatures.giantcrabcrabpain';
00190				SkelGroupSkins[5] = Texture'creatures.giantcrabcrabpain';
00191				break;
00192			case BODYPART_LARM2:
00193				if (SkelGroupSkins[1] == Texture'creatures.giantcrabcrab3')
00194					SkelGroupSkins[1] = Texture'creatures.giantcrabcrabpain';
00195				SkelGroupSkins[6] = Texture'creatures.giantcrabcrabpain';
00196				break;
00197		}
00198		return None;
00199	}
00200	
00201	//============================================================
00202	//
00203	// MatterForJoint
00204	//
00205	// Returns what kind of material joint is associated with
00206	//============================================================
00207	function EMatterType MatterForJoint(int joint)
00208	{
00209		switch(joint)
00210		{
00211			case 1: case 18: case 22: case 10:
00212			case 12: case 14: case 3: case 5:
00213			case 7:							return MATTER_FLESH;
00214	
00215			case 24:						return MATTER_WOOD;
00216			
00217		}
00218		return MATTER_NONE;
00219	}
00220	
00221	//============================================================
00222	//
00223	// BodyPartForJoint
00224	//
00225	// Returns the body part a joint is associated with
00226	//============================================================
00227	function int BodyPartForJoint(int joint)
00228	{
00229		switch(joint)
00230		{
00231			case 1:						return BODYPART_HEAD;
00232			case 18:					return BODYPART_RARM1;
00233			case 22:					return BODYPART_LARM1;
00234			case 24:					return BODYPART_TORSO;
00235	
00236			case 10:					return BODYPART_RARM2;	// legs
00237			case 12:					return BODYPART_RLEG1;
00238			case 14:					return BODYPART_RLEG2;
00239			case 3:						return BODYPART_LLEG1;
00240			case 5:						return BODYPART_LARM2;
00241			case 7:						return BODYPART_LLEG2;
00242	
00243			default:					return BODYPART_BODY;
00244		}
00245	}
00246	
00247	//============================================================
00248	//
00249	// BodyPartForPolyGroup
00250	//
00251	//============================================================
00252	function int BodyPartForPolyGroup(int polygroup)
00253	{
00254		switch(polygroup)
00255		{
00256			case 11:					return BODYPART_LARM1;
00257			case 10:					return BODYPART_RARM1;
00258			case 1:						return BODYPART_TORSO;
00259	
00260			case 7:						return BODYPART_RLEG1;	// legs
00261			case 8:						return BODYPART_RLEG2;
00262			case 9:						return BODYPART_RARM2;
00263			case 4:						return BODYPART_LLEG1;
00264			case 5:						return BODYPART_LLEG2;
00265			case 6:						return BODYPART_LARM2;
00266		}
00267		return BODYPART_BODY;
00268	}
00269	
00270	//============================================================
00271	//
00272	// BodyPartSeverable
00273	//
00274	//============================================================
00275	function bool BodyPartSeverable(int BodyPart)
00276	{
00277		// When flipped over, allow leg severing
00278		if (GetGroup(AnimSequence) == 'flipped')
00279		{
00280			if (BodyPart == BODYPART_LLEG1 || BodyPart == BODYPART_LLEG2 ||
00281				BodyPart == BODYPART_RLEG1 || BodyPart == BODYPART_RLEG2 ||
00282				BodyPart == BODYPART_LARM2 || BodyPart == BODYPART_RARM2)
00283				return true;
00284		}
00285	
00286		return (BodyPart == BODYPART_LARM1 || BodyPart == BODYPART_RARM1);
00287	}
00288	
00289	//============================================================
00290	//
00291	// BodyPartCritical
00292	//
00293	//============================================================
00294	function bool BodyPartCritical(int BodyPart)
00295	{
00296		return false;
00297	}
00298	
00299	//================================================
00300	//
00301	// SeveredLimbClass
00302	//
00303	//================================================
00304	function class<Actor> SeveredLimbClass(int BodyPart)
00305	{
00306		switch(BodyPart)
00307		{
00308			case BODYPART_LARM1:
00309			case BODYPART_RARM1:
00310				return class'CrabClaw';
00311			case BODYPART_LARM2:
00312			case BODYPART_RARM2:
00313			case BODYPART_LLEG1:
00314			case BODYPART_RLEG1:
00315			case BODYPART_LLEG2:
00316			case BODYPART_RLEG2:
00317				return class'CrabLeg';
00318		}
00319	
00320		return None;
00321	}
00322	
00323	//============================================================
00324	//
00325	// LimbSevered
00326	//
00327	//============================================================
00328	function LimbSevered(int BodyPart, vector Momentum)
00329	{
00330		local int joint;
00331		local actor part;
00332		local vector X,Y,Z;
00333		local vector pos;
00334		local class<actor> partclass;
00335	
00336		partclass = SeveredLimbClass(BodyPart);
00337	
00338		switch(BodyPart)
00339		{
00340			case BODYPART_LARM1:
00341				SkelGroupSkins[12] = Texture'runefx.gore';
00342				DropLeftWeapon();
00343				joint = JointNamed('lwrist');
00344				GetAxes(Rotation, X, Y, Z);
00345				pos = GetJointPos(joint);
00346				part = Spawn(partclass,,, pos, Rotation);
00347				if(part != None)
00348				{
00349					part.Velocity = -Y * 100 + vect(0, 0, 175);
00350					part.GotoState('Drop');
00351				}
00352				part = Spawn(class'BloodSpurt', self,, pos, Rotation);
00353				if(part != None)
00354				{
00355					AttachActorToJoint(part, joint);
00356				}
00357				break;
00358			case BODYPART_RARM1:
00359				SkelGroupSkins[13] = Texture'runefx.gore';
00360				DropRightWeapon();
00361				joint = JointNamed('rwrist');
00362				GetAxes(Rotation, X, Y, Z);
00363				pos = GetJointPos(joint);
00364				part = Spawn(partclass,,, pos, Rotation);
00365				if(part != None)
00366				{
00367					part.Velocity = Y * 100 + vect(0, 0, 175);
00368					part.GotoState('Drop');
00369				}
00370				part = Spawn(class'BloodSpurt', self,, pos, Rotation);
00371				if(part != None)
00372				{
00373					AttachActorToJoint(part, joint);
00374				}
00375				break;
00376	
00377			// Little legs
00378			case BODYPART_LLEG1:
00379				joint = JointNamed('rkneea');
00380				GetAxes(Rotation, X, Y, Z);
00381				part = Spawn(partclass,,, GetJointPos(joint), Rotation);
00382				if(part != None)
00383				{
00384					part.Velocity = VRand() * 100 + vect(0, 0, 175);
00385					part.GotoState('Drop');
00386				}
00387				break;
00388			case BODYPART_LLEG2:
00389				joint = JointNamed('rkneeb');
00390				GetAxes(Rotation, X, Y, Z);
00391				part = Spawn(partclass,,, GetJointPos(joint), Rotation);
00392				if(part != None)
00393				{
00394					part.Velocity = VRand() * 100 + vect(0, 0, 175);
00395					part.GotoState('Drop');
00396				}
00397				break;
00398			case BODYPART_LARM2:
00399				joint = JointNamed('rkneec');
00400				GetAxes(Rotation, X, Y, Z);
00401				part = Spawn(partclass,,, GetJointPos(joint), Rotation);
00402				if(part != None)
00403				{
00404					part.Velocity = VRand() * 100 + vect(0, 0, 175);
00405					part.GotoState('Drop');
00406				}
00407				break;
00408			case BODYPART_RLEG1:
00409				joint = JointNamed('lkneea');
00410				GetAxes(Rotation, X, Y, Z);
00411				part = Spawn(partclass,,, GetJointPos(joint), Rotation);
00412				if(part != None)
00413				{
00414					part.Velocity = VRand() * 100 + vect(0, 0, 175);
00415					part.GotoState('Drop');
00416				}
00417				break;
00418			case BODYPART_RLEG2:
00419				joint = JointNamed('lkneeb');
00420				GetAxes(Rotation, X, Y, Z);
00421				part = Spawn(partclass,,, GetJointPos(joint), Rotation);
00422				if(part != None)
00423				{
00424					part.Velocity = VRand() * 100 + vect(0, 0, 175);
00425					part.GotoState('Drop');
00426				}
00427				break;
00428			case BODYPART_RARM2:
00429				joint = JointNamed('lkneec');
00430				GetAxes(Rotation, X, Y, Z);
00431				part = Spawn(partclass,,, GetJointPos(joint), Rotation);
00432				if(part != None)
00433				{
00434					part.Velocity = VRand() * 100 + vect(0, 0, 175);
00435					part.GotoState('Drop');
00436				}
00437				break;
00438		}
00439	
00440		if (BodyPartMissing(BODYPART_LARM1) && BodyPartMissing(BODYPART_RARM1) && GetGroup(AnimSequence) != 'flipped')
00441			GotoState('Fleeing');
00442	}
00443	
00444	//============================================================
00445	//
00446	// LimbPassThrough
00447	//
00448	// Determines what damage is passed through to body
00449	//============================================================
00450	function int LimbPassThrough(int BodyPart, int Blunt, int Sever)
00451	{
00452		if (BodyPart == BODYPART_BODY)	// Falling damage, etc.
00453			return Blunt+Sever;
00454	
00455		if (BodyPart == BODYPART_TORSO)	// Shell doesn't accept sever damage
00456			return 0;
00457	//		return Blunt;
00458	
00459		// Can only be killed when flipped
00460		if (GetGroup(AnimSequence) == 'flipped')
00461			return Blunt+Sever;
00462	
00463		return Blunt;
00464	}
00465	
00466	//============================================================
00467	//
00468	// DamageBodyPart
00469	//
00470	//============================================================
00471	function bool DamageBodyPart(int Damage, Pawn EventInstigator, vector HitLocation, vector Momentum, name DamageType, int bodypart)
00472	{
00473		if (GetGroup(AnimSequence) == 'RearedUp')
00474			GotoState('Flipped');
00475	
00476		return Super.DamageBodyPart(Damage, EventInstigator, HitLocation, Momentum, DamageType, BodyPart);
00477	}
00478	
00479	
00480	//------------------------------------------------------------
00481	//
00482	// MakeTwitchable
00483	//
00484	// TODO: Move logic into carcass
00485	//------------------------------------------------------------
00486	function MakeTwitchable()
00487	{
00488		local int j;
00489	
00490		// Turn all collision joints accelerative
00491		for (j=0; j<NumJoints(); j++)
00492		{
00493			if ((JointFlags[j] & JOINT_FLAG_COLLISION)==0)
00494				continue;
00495	
00496			switch(j)
00497			{
00498				case 18: case 22:
00499					JointFlags[j] = JointFlags[j] | JOINT_FLAG_ACCELERATIVE;
00500	//				SetJointRotThreshold(j, 16000);
00501	//				SetJointDampFactor(j, 0.025);
00502	//				SetAccelMagnitude(j, 8000);
00503					break;
00504			}
00505		}
00506	}
00507	
00508	//===================================================================
00509	//
00510	// Bump
00511	//
00512	// If Pawns bump a destroyable decoration, they should smash it
00513	//===================================================================
00514	
00515	function Bump(Actor Other)
00516	{
00517		if(Other.IsA('DecorationRune') && DecorationRune(Other).bDestroyable)
00518		{
00519			CrabAttack();
00520		}
00521		else
00522		{
00523			Super.Bump(Other);
00524		}
00525	}
00526	
00527	//============================================================
00528	// Animation functions
00529	//============================================================
00530	function CrabWalking(vector src, vector dst, rotator rot)
00531	{
00532		local vector X,Y,Z;
00533		local vector dir;
00534		local float XdotDir;
00535	
00536		dir = Normal(dst - src);
00537		GetAxes(Rotation, X,Y,Z);
00538		XdotDir = X dot dir;
00539	
00540		if (XdotDir < -0.8)
00541		{
00542			LoopAnim('movebackward', 2.0, 0.1);
00543		}
00544		else if (XdotDir > 0.8)
00545		{
00546			LoopAnim('moveforward', 2.0, 0.1);
00547		}
00548		else if ((X cross dir).Z < 0)
00549		{	// Moving left
00550			LoopAnim('moveleft', 2.0, 0.1);
00551		}
00552		else
00553		{	// Moving right
00554			LoopAnim('moveright', 2.0, 0.1);
00555		}
00556	}
00557	
00558	function PlayTurnTo(rotator targetangle)
00559	{
00560		local int YawErr;
00561	
00562		YawErr = targetangle.Yaw - Rotation.Yaw;
00563		
00564		// Fix angles (0..180,0..-180)
00565		while (YawErr > 32768)
00566			YawErr -= 65535;
00567		while (YawErr < -32768)
00568			YawErr += 65535;
00569	
00570	//	if (YawErr > 0)
00571		if (YawErr < 0)	//test to see if anims are misnamed
00572		{
00573			LoopAnim('RotateRight', 3.0, 0.1);
00574		}
00575		else
00576		{
00577			LoopAnim('RotateLeft', 3.0, 0.1);
00578		}
00579	}
00580	
00581	function CrabAttack()
00582	{
00583		local float choice;
00584	
00585		choice = FRand();
00586		if (choice < 0.3 && !BodyPartMissing(BODYPART_LARM1))
00587			PlayAnim('attackl', 1.0, 0.1);
00588		else if (choice < 0.6 && !BodyPartMissing(BODYPART_RARM1))
00589			PlayAnim('attackr', 1.0, 0.1);
00590		else
00591			PlayAnim('attackb', 1.0, 0.1);
00592	}
00593	
00594	function PlayMoving(optional float tween)
00595	{
00596		LoopAnim('moveforward', 2.0, 0.1);
00597	}
00598	
00599	function PlayWaiting(optional float tween)
00600	{
00601		if (bInShell)
00602			PlayAnim('Ground', 1.0, 0.1);
00603		else
00604			LoopAnim('Idle', 1.0, 0.1);
00605	}
00606	
00607	function PlayDeath(name DamageType)
00608	{
00609		if (GetGroup(AnimSequence) == 'Flipped')
00610		{
00611			PlayAnim('FlippedDie', 1.0, 0.1);
00612		}
00613		else
00614		{
00615			PlayAnim('towake', 1.0, 0.1);	// just cover up
00616		}
00617	}
00618	
00619	function name GetGroup(name sequence)
00620	{
00621		switch(sequence)
00622		{
00623			case 'rearup':
00624			case 'rearidle':
00625			case 'rearupattack':
00626			case 'backfromrear':
00627				return 'rearedup';
00628	
00629			case 'flippedidle':
00630			case 'flippeddie':
00631	//		case 'transflipover':
00632				return 'Flipped';
00633	
00634			case 'ground':
00635			case 'towake':
00636				return 'Ground';
00637		}
00638		return 'none';
00639	}
00640	
00641	
00642	
00643	////////////////////////////////////////////////////////////////////////////////////////////
00644	//
00645	// Overridden ScriptPawn States
00646	//
00647	////////////////////////////////////////////////////////////////////////////////////////////
00648	
00649	// Default orders (upon going home and starting up)
00650	State InShell
00651	{
00652		function AmbientSoundTimer()
00653		{	// Don't play it, just reset timer for next one
00654			AmbientSoundTime = (0.5 + FRand()*0.5) * AmbientWaitSoundDelay;
00655		}
00656	
00657		function bool SetEnemy( Actor NewEnemy )
00658		{
00659			bTaskLocked = false;		// always release from this state to attack
00660			Super.SetEnemy(NewEnemy);
00661		}
00662	
00663		function EndState()
00664		{
00665			SetMovementPhysics();
00666		}
00667	
00668	Begin:
00669		bInShell = true;
00670		if (GetGroup(AnimSequence) != 'Ground')
00671		{
00672			PlayAnim('towake', 1.0, 0.1);
00673		}
00674		SetPhysics(PHYS_None);
00675	}
00676	
00677	
00678	//================================================
00679	//
00680	// Acquisition
00681	//
00682	//================================================
00683	State Acquisition
00684	{
00685	ignores EnemyAcquired, SeePlayer, HearNoise;
00686	
00687	Begin:
00688		if(debugstates) slog(name@"Acquiring"@Enemy.Name);
00689	Acquire:
00690		Sleep(RandRange(0.5, 1.0));
00691	
00692	Wake:
00693		if (bInShell)
00694		{
00695			PlayAnim('Wake', 1.0, 0.1);
00696			FinishAnim();
00697			bInShell = false;
00698		}
00699		Acceleration = vect(0,0,0);
00700		SetMovementPhysics();
00701	
00702	Turn:
00703		LastSeenPos = Enemy.Location;
00704		PlayTurnTo(rotator(LastSeenPos - Location));
00705		TurnTo(LastSeenPos);
00706		PlayWaiting();
00707	
00708	InformTeam:
00709		PlaySound(AcquireSound, SLOT_Interact,,,, 1.0 + FRand()*0.2-0.1);
00710		
00711		GotoState('TacticalDecision');
00712	}
00713	
00714	
00715	//================================================
00716	//
00717	// Fleeing
00718	//
00719	// Cover up and go dormant
00720	//================================================
00721	State Fleeing
00722	{
00723		ignores SeePlayer, HearNoise, EnemyAcquired, Attach, DamageBodyPart;
00724	
00725		function AmbientSoundTimer()
00726		{	// Don't play it, just reset timer for next one
00727			AmbientSoundTime = (0.5 + FRand()*0.5) * AmbientWaitSoundDelay;
00728		}
00729	
00730	Begin:
00731		PlayAnim('towake', 1.0, 0.1);
00732		bInShell = true;
00733		SetPhysics(PHYS_None);
00734	}
00735	
00736	
00737	//================================================
00738	//
00739	// Charging
00740	//
00741	//================================================
00742	State Charging
00743	{
00744	ignores EnemyAcquired, SeePlayer, HearNoise, BeginState;//, EndState;
00745	
00746		function MayFall()
00747		{	// Only jump if reachable
00748			bCanJump = false;
00749		}
00750	
00751		function EnemyNotVisible()
00752		{
00753			GotoState('Hunting');
00754		}
00755	
00756		function HitWall(vector HitNormal, actor Wall)
00757		{
00758			if (Physics == PHYS_Falling)
00759				return;
00760	
00761	//		slog("hitwall: min="$MinHitWall);
00762	
00763			Focus = Destination;
00764			if (PickWallAdjust())
00765				GotoState('Charging', 'AdjustFromWall');
00766			else
00767				MoveTimer = -1.0;
00768		}
00769	
00770		function PickDestination()
00771		{
00772			local vector ToEnemy, ToSide, Up;
00773			Up = vect(0,0,1);
00774			ToEnemy = Enemy.Location - Location;
00775			ToSide = ToEnemy cross Up;
00776			if (FRand() < 0.5)
00777				ToSide *= -1;
00778			Destination = Location + ToEnemy*0.5 + ToSide*0.5;
00779		}
00780	
00781		function PickDestinationBackAway()
00782		{
00783			local vector ToEnemy, ToSide, Up;
00784			Up = vect(0,0,1);
00785			ToEnemy = Normal(Enemy.Location - Location);
00786			ToSide = ToEnemy cross Up;
00787			if (FRand() < 0.5)
00788				ToSide *= -1;
00789			Destination = Location - ToEnemy*RandRange(10,100) + ToSide*RandRange(10,100);
00790		}
00791		
00792	AdjustFromWall:
00793		StrafeTo(Destination, Focus); 
00794		Goto('CloseIn');
00795	
00796	ResumeCharge:
00797		PlayMoving();
00798		Goto('Charge');
00799	
00800	Begin:
00801		if(debugstates) slog(name@"Charging");
00802	
00803	Charge:
00804		bFromWall = false;
00805		
00806	CloseIn:
00807		if ( !ValidEnemy() )
00808			GotoState('GoingHome');
00809		if (BodyPartMissing(BODYPART_LARM1) && BodyPartMissing(BODYPART_RARM1) && GetGroup(AnimSequence) != 'flipped')
00810			GotoState('Fleeing');
00811	
00812		if ( Enemy.Region.Zone.bWaterZone )
00813		{	// Enemy entered water zone
00814			if (!bCanSwim)
00815				GotoState('TacticalDecision');
00816		}
00817		else if (!bCanFly && !bCanWalk)
00818			// Enemy left water zone
00819			GotoState('GoingHome');
00820	
00821		if (Physics == PHYS_Falling)
00822			WaitForLanding();
00823	
00824	Move:
00825		if(!actorReachable(Enemy) )
00826			GotoState('Hunting');
00827	
00828		SoundChance(ThreatenSound, 0.3);
00829		PickDestination();
00830		if (pointReachable(Destination))
00831		{
00832			CrabWalking(Location, Destination, Rotation);
00833			StrafeFacing(Destination, Enemy);
00834			Acceleration = vect(0,0,0);
00835		}
00836		else
00837		{
00838			PlayMoving();
00839			MoveTo(Enemy.Location);
00840			FinishAnim();
00841			Acceleration = vect(0,0,0);
00842		}
00843	
00844		// if within melee range, goto attack
00845		if (InMeleeRange(Enemy))
00846		{
00847			if (FRand() < HighOrLow && bFightHigh)
00848				GotoState('FightingHigh');
00849			else
00850				GotoState('FightingLow');
00851		}
00852		
00853		PlayWaiting();
00854		Sleep(0.1);
00855		Goto('Charge');
00856	
00857	ResumeFromFighting:
00858		if (!InMeleeRange(Enemy))
00859		{
00860			MoveTimer = 0.0;
00861			Goto('Charge');
00862		}
00863	
00864	BackOff:
00865		PickDestinationBackAway();
00866		CrabWalking(Location, Destination, Rotation);
00867		StrafeFacing(Destination, Enemy);
00868		Acceleration = vect(0,0,0);
00869		if (FRand() < 0.3)
00870			Goto('BackOff');
00871		Goto('Charge');
00872	}
00873	
00874	
00875	//================================================
00876	//
00877	// FightingHigh
00878	//
00879	// Reared up on hind legs
00880	//================================================
00881	State FightingHigh
00882	{
00883		function EndState()
00884		{
00885			WeaponDeactivate();
00886		}
00887	
00888		function AmbientSoundTimer()
00889		{
00890			PlayAmbientFightSound();
00891		}
00892	
00893		function WeaponActivate()
00894		{
00895			bSwingingHigh = true;
00896			Super.WeaponActivate();
00897			if (LeftClaw != None)
00898				LeftClaw.StartAttack();
00899		}
00900	
00901		function WeaponDeactivate()
00902		{
00903			bSwingingHigh = false;
00904			Super.WeaponDeactivate();
00905			if (LeftClaw != None)
00906				LeftClaw.FinishAttack();
00907		}
00908	
00909		function CauseQuake()
00910		{
00911			local RunePlayer P;
00912	
00913			if(self.IsA('BabyCrab'))
00914				return; // BabyCrabs cannot cause a quake
00915	
00916			foreach RadiusActors(class'RunePlayer', P, 500, Location)
00917			{
00918				P.ShakeView(1.0, 800, 0.5);
00919			}
00920		}
00921	
00922	Begin:
00923		Acceleration = vect(0,0,0);
00924	
00925	AttackHigh:
00926		PlayAnim('rearup', 1.0, 0.1);
00927		FinishAnim();
00928		stallcount=0;
00929	Stall:
00930		PlaySound(RearUpSound, SLOT_Talk,,,, 1.0 + FRand()*0.2-0.1);
00931		PlayAnim('rearidle', 1.0, 0.1);
00932		FinishAnim();
00933		if (++stallcount < 3)
00934		{
00935			if (!NeedToTurn(Enemy.Location) && !InMeleeRange(Enemy))
00936				Goto('Stall');
00937		}
00938	HighAttack:
00939		if (InMeleeRange(Enemy))
00940			PlayAnim('rearupattack', 1.0, 0.1);
00941		else
00942			PlayAnim('BackFromRear', 1.0, 0.1);
00943		FinishAnim();
00944	
00945		CauseQuake();
00946	
00947	RearDown:
00948		GotoState('Charging', 'ResumeFromFighting');
00949	}
00950	
00951	
00952	//================================================
00953	//
00954	// FightingLow
00955	//
00956	//================================================
00957	State FightingLow
00958	{
00959		function WeaponActivate()
00960		{	// Right claw attack
00961			bSwingingLow = true;
00962			Super.WeaponActivate();
00963	
00964		}
00965	
00966		function WeaponDeactivate()
00967		{	// End of right claw attack
00968			bSwingingLow = false;
00969			Super.WeaponDeactivate();
00970		}
00971	
00972		function AltWeaponActivate()
00973		{	// Left claw attack
00974			bSwingingLow = true;
00975			if (LeftClaw != None)
00976				LeftClaw.StartAttack();
00977		}
00978	
00979		function AltWeaponDeactivate()
00980		{	// End of left claw attack
00981			if (LeftClaw != None)
00982				LeftClaw.FinishAttack();
00983			bSwingingLow = false;
00984		}
00985	
00986		function AmbientSoundTimer()
00987		{
00988			PlayAmbientFightSound();
00989		}
00990	
00991		function EndState()
00992		{
00993			bSwingingLow = false;
00994		}
00995	
00996	Begin:
00997		Acceleration = vect(0,0,0);
00998	
00999	AttackLow:
01000		CrabAttack();
01001		FinishAnim();
01002		GotoState('Charging', 'ResumeFromFighting');
01003	}
01004	
01005	
01006	//================================================
01007	//
01008	// Flipped
01009	//
01010	// Flipped upside down
01011	//================================================
01012	State Flipped
01013	{
01014		ignores SeePlayer, HearNoise, EnemyAcquired;
01015	
01016		function TryToGetUp()
01017		{
01018			local int numlegs;
01019	
01020			if (!BodyPartMissing(BODYPART_LLEG1))
01021				numlegs++;
01022			if (!BodyPartMissing(BODYPART_LLEG2))
01023				numlegs++;
01024			if (!BodyPartMissing(BODYPART_RLEG1))
01025				numlegs++;
01026			if (!BodyPartMissing(BODYPART_RLEG2))
01027				numlegs++;
01028			if (!BodyPartMissing(BODYPART_LARM2))
01029				numlegs++;
01030			if (!BodyPartMissing(BODYPART_RARM2))
01031				numlegs++;
01032	
01033			// flip over if no-one standing on me, and have enough legs
01034			if (StandingCount==0 && FRand()<0.6 && !Region.Zone.bWaterZone && numlegs>3)
01035			{
01036				GotoState('Flipped', 'Getup');
01037			}
01038		}
01039	
01040		function Timer()
01041		{
01042			if (FRand() < 0.3)
01043				PlaySound(UpsideDownSound, SLOT_Talk,,,, 1.0 + FRand()*0.2-0.1);
01044		}
01045	
01046		function Attach(actor Other)
01047		{
01048			GotoState('Flipped', 'Rocking');
01049		}
01050	
01051		function KnockBack()
01052		{
01053			local vector vel;
01054			vel = -500*Normal(vector(Rotation));
01055			vel.Z = 100;
01056			AddVelocity(vel);		
01057		}
01058	
01059		function EndState()
01060		{
01061			SetTimer(0, false);
01062		}
01063	
01064	Rocking:
01065		PlayAnim('Rock', 1.0, 0.1);
01066		FinishAnim();
01067		PlayAnim('Rock', 0.6, 0.1);
01068		FinishAnim();
01069		PlayAnim('Rock', 0.2, 0.1);
01070		FinishAnim();
01071		Goto('Idle');
01072	
01073	GetUp:
01074		PlayAnim('flipup', 1.0, 0.1);
01075		FinishAnim();
01076		SetMovementPhysics();
01077		GotoState('TacticalDecision');
01078	
01079	Begin:
01080		Acceleration = vect(0,0,0);
01081		KnockBack();
01082		if (GetGroup(AnimSequence) != 'flipped')
01083		{
01084			PlayAnim('transflipover', 1.0, 0.1);
01085			FinishAnim();
01086		}
01087		WaitForLanding();
01088		Velocity=vect(0,0,0);
01089		SetPhysics(PHYS_None);
01090		SetTimer(2, true);
01091	Idle:
01092		LoopAnim('flippedidle', 1.0, 0.1);
01093	
01094		Sleep(RandRange(2, 3+(4-Level.Game.Difficulty)));
01095		TryToGetUp();
01096	}
01097	
01098	
01099	//================================================
01100	//
01101	// MonkeyOnBack
01102	//
01103	// Something on my back, rear up to get it off
01104	//================================================
01105	State MonkeyOnBack
01106	{
01107		ignores Attach;
01108	
01109	Begin:
01110		Acceleration = vect(0,0,0);
01111		PlayWaiting();
01112		FinishAnim();
01113	
01114	Getup:	// If on ground, must wake
01115		if (bInShell)
01116		{
01117			PlayAnim('Wake', 1.0, 0.1);
01118			FinishAnim();
01119			bInShell = false;
01120		}
01121		
01122	RearUp:
01123		if (StandingCount > 0)
01124		{
01125			PlayAnim('rearup', 1.0, 0.1);
01126			Sleep(0.3);
01127			PlaySound(ThrowoffSound, SLOT_Talk,,,, 1.0 + FRand()*0.2-0.1);
01128			ThrowOffMonkeys();
01129			FinishAnim();
01130			PlayAnim('rearidle', 1.0, 0.1);
01131			FinishAnim();
01132			Goto('Rearup');
01133		}
01134		GotoState('TacticalDecision');
01135	}
01136	
01137	
01138	
01139	//============================================================
01140	//
01141	// STATE Dying
01142	//
01143	//============================================================
01144	state Dying
01145	{
01146	ignores SeePlayer, EnemyNotVisible, HearNoise, KilledBy, Trigger, Bump, HitWall, HeadZoneChange, FootZoneChange, ZoneChange, Falling, WarnTarget, Died, LongFall, PainTimer;
01147	
01148		function Attach(actor Other)
01149		{
01150			// Someone jumped on my corpse
01151		}
01152	
01153		function BeginState()
01154		{
01155			local int BodyPart;
01156	
01157			// Turn most collision joints off
01158			for (BodyPart=0; BodyPart<NUM_BODYPARTS; BodyPart++)
01159			{
01160				if (BodyPart == BODYPART_LARM1 || BodyPart == BODYPART_RARM1 || BodyPart == BODYPART_TORSO)
01161					continue;
01162	
01163				BodyPartCollision(BodyPart, false);
01164			}
01165	
01166	//		bJointsBlock = true;
01167		}
01168	
01169	Begin:
01170		Velocity=vect(0,0,0);
01171	}
01172	
01173	
01174	state() NoMove
01175	{
01176	ignores EnemyAcquired;
01177	
01178		function bool SetEnemy( Actor NewEnemy )
01179		{
01180			bTaskLocked = false;
01181			Super.SetEnemy(NewEnemy);
01182			bTaskLocked = true;
01183		}
01184	
01185		function WeaponActivate()
01186		{	// Right claw attack
01187			bSwingingLow = true;
01188			Super.WeaponActivate();
01189		}
01190	
01191		function WeaponDeactivate()
01192		{	// End of right claw attack
01193			bSwingingLow = false;
01194			Super.WeaponDeactivate();
01195		}
01196	
01197		function AltWeaponActivate()
01198		{	// Left claw attack
01199			bSwingingLow = true;
01200			if (LeftClaw != None)
01201				LeftClaw.StartAttack();
01202		}
01203	
01204		function AltWeaponDeactivate()
01205		{	// End of left claw attack
01206			if (LeftClaw != None)
01207				LeftClaw.FinishAttack();
01208			bSwingingLow = false;
01209		}
01210	
01211		function AmbientSoundTimer()
01212		{
01213			PlayAmbientFightSound();
01214		}
01215	
01216		function EndState()
01217		{
01218			bSwingingLow = false;
01219		}
01220	
01221		function Attach(actor Other)
01222		{
01223			if (Health > 0)
01224				GotoState('NoMove', 'OnBack');
01225		}
01226	
01227		function bool DamageBodyPart(int Damage, Pawn EventInstigator, vector HitLocation, vector Momentum, name DamageType, int bodypart)
01228		{	// Don't flip
01229			return Super.DamageBodyPart(Damage, EventInstigator, HitLocation, Momentum, DamageType, BodyPart);
01230		}
01231	
01232	Begin:
01233		Acceleration = vect(0,0,0);
01234	
01235		if (bInShell)
01236		{
01237			PlayAnim('Wake', 1.0, 0.1);
01238			FinishAnim();
01239			bInShell = false;
01240		}
01241	
01242	Loop:
01243		if(Enemy != None)
01244		{
01245			if (NeedToTurn(Enemy.Location))
01246			{
01247				PlayTurnTo(rotator(Enemy.Location - Location));
01248	KeepTurning:
01249				Sleep(0.2);
01250				TurnTo(Enemy.Location);
01251	
01252				if (NeedToTurn(Enemy.Location))
01253					Goto('KeepTurning');
01254	
01255				PlayWaiting(0.1);
01256			}
01257	
01258			if (InRange(Enemy, MeleeRange))
01259			{
01260				CrabAttack();
01261				FinishAnim();
01262	
01263				PlayWaiting(0.1);
01264			}
01265		}
01266	
01267		Sleep(0.1);
01268		Goto('Loop');
01269	
01270	OnBack:
01271		if (StandingCount > 0)
01272		{
01273			PlayAnim('rearup', 1.0, 0.1);
01274			Sleep(0.3);
01275			PlaySound(ThrowoffSound, SLOT_Talk,,,, 1.0 + FRand()*0.2-0.1);
01276			ThrowOffMonkeys();
01277			FinishAnim();
01278			PlayAnim('rearidle', 1.0, 0.1);
01279			FinishAnim();
01280			Goto('OnBack');
01281		}
01282		PlayWaiting(0.1);
01283		Goto('Loop');
01284	}
01285	
01286	
01287	
01288	
01289	simulated function Debug(Canvas canvas, int mode)
01290	{
01291		local vector ToEnemy, ToSide, Up;
01292	
01293		Super.Debug(canvas, mode);
01294		
01295		Canvas.DrawText("Crab:");
01296		Canvas.CurY -= 8;
01297		Canvas.DrawText(" Destination: "$Destination);
01298		Canvas.CurY -= 8;
01299		Canvas.DrawText(" bInShell: "$bInShell);
01300		Canvas.CurY -= 8;
01301	
01302		Canvas.DrawLine3D(Destination, Location, 255, 255, 255);
01303	
01304		if (Weapon != None && mode == 0)
01305			Weapon.Debug(canvas, mode);
01306	}
01307	
01308	defaultproperties
01309	{
01310	     bCamouflage=True
01311	     bFightHigh=True
01312	     ThrowZ=600.000000
01313	     RearUpSound=Sound'CreaturesSnd.Crab.crabsee01'
01314	     UpsideDownSound=Sound'CreaturesSnd.Crab.crabdeath04'
01315	     ThrowoffSound=Sound'CreaturesSnd.Crab.crabdeath02'
01316	     Orders=InShell
01317	     FightOrFlight=1.000000
01318	     FightOrDefend=1.000000
01319	     HighOrLow=0.500000
01320	     AcquireSound=Sound'CreaturesSnd.Crab.crabamb02'
01321	     AmbientWaitSounds(0)=Sound'CreaturesSnd.Crab.crabamb03b'
01322	     AmbientWaitSounds(1)=Sound'CreaturesSnd.Crab.crabamb02b'
01323	     AmbientWaitSounds(2)=Sound'CreaturesSnd.Crab.crabamb03'
01324	     AmbientFightSounds(0)=Sound'CreaturesSnd.Crab.crabattack01'
01325	     AmbientFightSounds(1)=Sound'CreaturesSnd.Crab.crabattack04'
01326	     AmbientFightSounds(2)=Sound'CreaturesSnd.Crab.crabattack04'
01327	     AmbientWaitSoundDelay=17.000000
01328	     AmbientFightSoundDelay=15.000000
01329	     StartWeapon=Class'RuneI.CrabPincer'
01330	     ShadowScale=3.500000
01331	     bCanStrafe=True
01332	     bAlignToFloor=True
01333	     MeleeRange=70.000000
01334	     GroundSpeed=325.000000
01335	     AccelRate=1000.000000
01336	     JumpZ=0.000000
01337	     MaxStepHeight=10.000000
01338	     WalkingSpeed=150.000000
01339	     ClassID=1
01340	     BodyPartHealth(0)=100
01341	     BodyPartHealth(1)=40
01342	     BodyPartHealth(2)=5
01343	     BodyPartHealth(3)=40
01344	     BodyPartHealth(4)=5
01345	     BodyPartHealth(5)=100
01346	     BodyPartHealth(6)=5
01347	     BodyPartHealth(7)=5
01348	     BodyPartHealth(8)=5
01349	     BodyPartHealth(9)=5
01350	     UnderWaterTime=2.000000
01351	     Intelligence=BRAINS_REPTILE
01352	     HitSound1=Sound'CreaturesSnd.Crab.crabdeath02b'
01353	     HitSound2=Sound'CreaturesSnd.Crab.crabdeath01b'
01354	     HitSound3=Sound'CreaturesSnd.Crab.crabdeath04b'
01355	     Die=Sound'CreaturesSnd.Crab.crabdeath01'
01356	     Die2=Sound'CreaturesSnd.Crab.crabdeath02'
01357	     Die3=Sound'CreaturesSnd.Crab.crabdeath03'
01358	     FootStepWood(0)=Sound'CreaturesSnd.Crab.crabfootstep05'
01359	     FootStepWood(1)=Sound'CreaturesSnd.Crab.crabfootstep05'
01360	     FootStepWood(2)=Sound'CreaturesSnd.Crab.crabfootstep05'
01361	     FootStepMetal(0)=Sound'CreaturesSnd.Crab.crabfootstep05'
01362	     FootStepMetal(1)=Sound'CreaturesSnd.Crab.crabfootstep05'
01363	     FootStepMetal(2)=Sound'CreaturesSnd.Crab.crabfootstep05'
01364	     FootStepStone(0)=Sound'CreaturesSnd.Crab.crabfootstep05'
01365	     FootStepStone(1)=Sound'CreaturesSnd.Crab.crabfootstep05'
01366	     FootStepStone(2)=Sound'CreaturesSnd.Crab.crabfootstep05'
01367	     FootStepFlesh(0)=Sound'CreaturesSnd.Crab.crabfootstep05'
01368	     FootStepFlesh(1)=Sound'CreaturesSnd.Crab.crabfootstep05'
01369	     FootStepFlesh(2)=Sound'CreaturesSnd.Crab.crabfootstep05'
01370	     FootStepIce(0)=Sound'CreaturesSnd.Crab.crabfootstep05'
01371	     FootStepIce(1)=Sound'CreaturesSnd.Crab.crabfootstep05'
01372	     FootStepIce(2)=Sound'CreaturesSnd.Crab.crabfootstep05'
01373	     FootStepEarth(0)=Sound'CreaturesSnd.Crab.crabfootstep05'
01374	     FootStepEarth(1)=Sound'CreaturesSnd.Crab.crabfootstep05'
01375	     FootStepEarth(2)=Sound'CreaturesSnd.Crab.crabfootstep05'
01376	     FootStepSnow(0)=Sound'CreaturesSnd.Crab.crabfootstep05'
01377	     FootStepSnow(1)=Sound'CreaturesSnd.Crab.crabfootstep05'
01378	     FootStepSnow(2)=Sound'CreaturesSnd.Crab.crabfootstep05'
01379	     LandSoundWood=None
01380	     LandSoundMetal=None
01381	     LandSoundStone=None
01382	     LandSoundFlesh=None
01383	     LandSoundIce=None
01384	     LandSoundSnow=None
01385	     LandSoundEarth=None
01386	     LandSoundWater=None
01387	     LandSoundMud=None
01388	     LandSoundLava=None
01389	     WeaponJoint=rthumb
01390	     bRotateHead=False
01391	     bRotateTorso=False
01392	     LookDegPerSec=0.000000
01393	     bAllowStandOn=True
01394	     AnimSequence=ground
01395	     CollisionRadius=45.000000
01396	     CollisionHeight=32.000000
01397	     Mass=300.000000
01398	     RotationRate=(Pitch=1000,Roll=0)
01399	     Skeletal=SkelModel'creatures.GiantCrab'
01400	}

End Source Code