RuneI
Class LimbWeapon

source: c:\runehov\RuneI\Classes\LimbWeapon.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Inventory
         |
         +--Engine.Weapon
            |
            +--RuneI.NonStow
               |
               +--RuneI.LimbWeapon
Direct Known Subclasses:AxeSarkArm, BerserkerLArm, BerserkerRArm, ConrackLArm, ConrackRArm, CrabClaw, CrabLeg, DarkVikingLArm, DarkVikingRArm, ElderArm, goblinlarm, GoblinRArm, GuardLArm, GuardRArm, Head, KarlLArm, KarlRArm, MechArm, MechBladeArm, RagnarLArm, RagnarRArm, SarkArm, SarkConArm, SarkHammerArm, SarkRagnarArm, SarkSwordArm, SigurdLArm, SigurdRArm, SnowRagnarArm, TownRagnarArm, TrialRagnarArm, TTongue, WarDwarfLArm, WarDwarfRArm, WolfLArm, WolfRArm, WomanArm, WoodDwarfLArm, WoodDwarfRArm, ZombieLArm, ZombieRArm

class LimbWeapon
extends RuneI.NonStow

//============================================================================= // LimbWeapon. //=============================================================================
Variables
 Actor Blood
 bool bNeverExpire

States
Swinging, Drop, Pickup

Function Summary
 EMatterType MatterForJoint(int joint)
     
//============================================================
//
// MatterForJoint
//
// Returns what kind of material joint is associated with
//============================================================
 void SpawnBloodSpray(vector HitLoc, vector HitNorm, EMatterType matter)


State Swinging Function Summary
 void EndState()
     
	{
		Blood = Spawn(class'Blood',,, Owner.Location,);
		if(Blood != None)
		{
			AttachActorToJoint(Blood, JointNamed('offset'));
		}
	}
	
	
 void BeginState()
     
{
	


State Drop Function Summary
 void EndState()
 void BeginState()


State Pickup Function Summary
 void Touch(Actor Other)
     
/*
	
 bool JointDamaged(int Damage, Pawn EventInstigator, vector HitLoc, vector Momentum, name DamageType, int joint)
     
/*
	
 void EndState()
 void BeginState()



Source Code


00001	//=============================================================================
00002	// LimbWeapon.
00003	//=============================================================================
00004	class LimbWeapon expands NonStow;
00005	
00006	
00007	var actor Blood;
00008	var() bool bNeverExpire;
00009	
00010	
00011	//============================================================
00012	//
00013	// MatterForJoint
00014	//
00015	// Returns what kind of material joint is associated with
00016	//============================================================
00017	function EMatterType MatterForJoint(int joint)
00018	{
00019		return MATTER_FLESH;
00020	}
00021	
00022	function SpawnBloodSpray(vector HitLoc, vector HitNorm, EMatterType matter)
00023	{
00024		if (matter != MATTER_NONE)
00025		{
00026			Spawn(class'BloodSpray',,, HitLoc, rotator(HitNorm));
00027		}
00028	}
00029	
00030	
00031	//-----------------------------------------------------------------------------
00032	//
00033	// State Pickup
00034	//
00035	// LimbWeapons will remove themselves if not picked up within a given amount
00036	// of time.
00037	//-----------------------------------------------------------------------------
00038	
00039	auto state Pickup
00040	{
00041		function BeginState()
00042		{
00043			bSweepable=false;
00044			SetCollision(true, false, false);
00045			bCollideWorld = true;
00046			bLookFocusPlayer = true;
00047			bLookFocusCreature = true;
00048			if (!bNeverExpire)
00049			{
00050				LifeSpan = ExpireTime; //RandRange(15,20);
00051			}
00052		}
00053		
00054		function EndState()
00055		{
00056			bSweepable=Default.bSweepable;
00057			SetCollision(false, false, false);
00058			bCollideWorld = false;
00059			bLookFocusPlayer = false;
00060			bLookFocusCreature = false;
00061	
00062			LifeSpan=0;
00063			Style=Default.Style;
00064			ScaleGlow=Default.ScaleGlow;
00065		}
00066	/*
00067		function bool JointDamaged(int Damage, Pawn EventInstigator, vector HitLoc, vector Momentum, name DamageType, int joint)
00068		{
00069			Destroy();
00070			return true;
00071		}
00072	*/
00073	/*
00074		function Touch(Actor Other)
00075		{
00076			if(Other.IsA('Pawn'))
00077			{
00078				if(Pawn(Other).CanPickUp(self))
00079				{
00080					SetOwner(Other);
00081					GotoState('BeingPickedUp');
00082				}
00083			}
00084		}
00085	*/
00086	begin:
00087		AmbientGlow = 0;
00088		SkelMesh = Default.SkelMesh;
00089	}
00090	
00091	
00092	state Drop
00093	{
00094		function BeginState()
00095		{		
00096			Super.BeginState();
00097	
00098			Blood = Spawn(class'Blood',,, Location,);
00099			if(Blood != None)
00100			{
00101				AttachActorToJoint(Blood, JointNamed('offset'));
00102			}
00103			
00104			DesiredRotation.Yaw = Rotation.Yaw - Rand(2000) + 1000;		
00105		}
00106		
00107		function EndState()
00108		{
00109			Super.EndState();
00110	
00111			Blood = DetachActorFromJoint(JointNamed('offset'));
00112			Blood.Destroy();		
00113		}
00114	}
00115	
00116	/* Not yet finished!  -- cjr
00117	state Swinging
00118	{
00119		function BeginState()
00120		{
00121			Blood = Spawn(class'Blood',,, Owner.Location,);
00122			if(Blood != None)
00123			{
00124				AttachActorToJoint(Blood, JointNamed('offset'));
00125			}
00126		}
00127		
00128		function EndState()
00129		{
00130			Blood = DetachActorFromJoint(JointNamed('offset'));
00131			Blood.Destroy();
00132		}
00133	}
00134	*/
00135	
00136	defaultproperties
00137	{
00138	     Damage=12
00139	     DamageType=Blunt
00140	     ThroughAir(0)=Sound'WeaponsSnd.Arm.armswing02'
00141	     ThroughAir(1)=Sound'WeaponsSnd.Arm.armswing01'
00142	     ThroughAir(2)=Sound'WeaponsSnd.Arm.armswing02'
00143	     HitFlesh(0)=Sound'WeaponsSnd.Arm.armflesh01'
00144	     HitWood(0)=Sound'WeaponsSnd.Arm.armimp01'
00145	     HitWood(1)=Sound'WeaponsSnd.Arm.armimp02'
00146	     HitWood(2)=Sound'WeaponsSnd.Arm.armimp03'
00147	     HitStone(0)=Sound'WeaponsSnd.Arm.armimp01'
00148	     HitStone(1)=Sound'WeaponsSnd.Arm.armimp02'
00149	     HitStone(2)=Sound'WeaponsSnd.Arm.armimp03'
00150	     HitMetal(0)=Sound'WeaponsSnd.Arm.armimp01'
00151	     HitMetal(1)=Sound'WeaponsSnd.Arm.armimp02'
00152	     HitMetal(2)=Sound'WeaponsSnd.Arm.armimp03'
00153	     HitDirt(0)=Sound'WeaponsSnd.Arm.armimp01'
00154	     HitDirt(1)=Sound'WeaponsSnd.Arm.armimp02'
00155	     HitDirt(2)=Sound'WeaponsSnd.Arm.armimp03'
00156	     HitShield=Sound'WeaponsSnd.Arm.armshield01'
00157	     HitWeapon=Sound'WeaponsSnd.Arm.armweapon01'
00158	     HitBreakableWood=Sound'WeaponsSnd.Arm.armimp01'
00159	     HitBreakableStone=Sound'WeaponsSnd.Arm.armimp01'
00160	     A_AttackStandA=T_OUTStandingAttackA
00161	     A_AttackStandAReturn=T_OUTStandingAttackAreturn
00162	     A_Taunt=T_OUTTaunt
00163	     PickupMessage="You picked up a severed limb"
00164	     RespawnTime=0.000000
00165	     ExpireTime=20.000000
00166	     DropSound=Sound'WeaponsSnd.Arm.armdrop01'
00167	     Buoyancy=2.500000
00168	     Skeletal=SkelModel'objects.Limbs'
00169	}

End Source Code