RuneI
Class GoblinShield

source: c:\runehov\RuneI\Classes\GoblinShield.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Inventory
         |
         +--Engine.Shield
            |
            +--RuneI.GoblinShield
Direct Known Subclasses:None

class GoblinShield
extends Engine.Shield

//============================================================================= // GoblinShield. //=============================================================================

Function Summary
 void DestroyEffect()
     
//-----------------------------------------------------------------------------
//
// DestroyEffect
//
// Used when shield is destroyed
//-----------------------------------------------------------------------------
 void PlayHitSound(name DamageType)
     
//=============================================================================
//
// Sound Functions
//
//=============================================================================



Source Code


00001	//=============================================================================
00002	// GoblinShield.
00003	//=============================================================================
00004	class GoblinShield expands Shield;
00005	
00006	
00007	//-----------------------------------------------------------------------------
00008	//
00009	// DestroyEffect
00010	//
00011	// Used when shield is destroyed
00012	//-----------------------------------------------------------------------------
00013	function DestroyEffect()
00014	{
00015		local int i, numchunks, NumSourceGroups;
00016		local debris d;
00017		local debriscloud c;
00018		local vector loc;
00019		local float scale;
00020	
00021		// Spawn cloud
00022		c = Spawn(class'DebrisCloud');
00023		if(c != None)
00024			c.SetRadius(Max(CollisionRadius,CollisionHeight));
00025	
00026		// Spawn debris
00027		numchunks = Clamp(Mass/10, 2, 15);
00028	
00029		// Find appropriate size of chunks
00030		scale = (CollisionRadius*CollisionRadius*CollisionHeight) / (numchunks*500);
00031		scale = scale ** 0.3333333;
00032		for (NumSourceGroups=1; NumSourceGroups<16; NumSourceGroups++)
00033		{
00034			if (SkelGroupSkins[NumSourceGroups] == None)
00035				break;
00036		}
00037	
00038		for (i=0; i<numchunks; i++)
00039		{
00040			loc = Location;
00041			loc.X += (FRand()*2-1)*CollisionRadius;
00042			loc.Y += (FRand()*2-1)*CollisionRadius;
00043			loc.Z += (FRand()*2-1)*CollisionHeight;
00044			d = Spawn(class'debriswood',,,loc);
00045			if(d != None)
00046			{
00047				d.SetSize(scale);
00048				d.SetTexture(SkelGroupSkins[i%NumSourceGroups]);
00049			}
00050		}
00051	}
00052	
00053	
00054	//=============================================================================
00055	//
00056	// Sound Functions
00057	//
00058	//=============================================================================
00059	function PlayHitSound(name DamageType)
00060	{
00061	}
00062	
00063	defaultproperties
00064	{
00065	     Health=50
00066	     rating=1
00067	     DestroyedSound=Sound'WeaponsSnd.Shields.xtroy03'
00068	     PickupMessage="You possess a Goblin Shield"
00069	     RespawnSound=Sound'OtherSnd.Respawns.respawn01'
00070	     DropSound=Sound'WeaponsSnd.Shields.xdrop03'
00071	     PickupMessageClass=Class'RuneI.PickupMessage'
00072	     LODCurve=LOD_CURVE_ULTRA_CONSERVATIVE
00073	     CollisionRadius=13.000000
00074	     CollisionHeight=3.000000
00075	     bCollideWorld=True
00076	     Skeletal=SkelModel'weapons.GoblinShield'
00077	     SkelGroupSkins(0)=Texture'weapons.GoblinShieldgoblin_shield'
00078	     SkelGroupSkins(1)=Texture'weapons.GoblinShieldgoblin_shield'
00079	     SkelGroupSkins(2)=Texture'weapons.GoblinShieldBeetleshine'
00080	}

End Source Code