RuneI
Class GoblinFemale

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

class GoblinFemale
extends RuneI.Goblin

//============================================================================= // GoblinFemale. //=============================================================================

Function Summary
 void ApplyGoreCap(int BodyPart)
     
//============================================================
//
// ApplyGoreCap
//
//============================================================
 int BodyPartForPolyGroup(int polygroup)
     
//============================================================
//
// BodyPartForPolyGroup
//
//============================================================
 bool CanPickup(Inventory item)
     
//============================================================
//
// CanPickup
//
// Let's pawn dictate what it can pick up
//============================================================
 Texture PainSkin(int BodyPart)
     
//============================================================
//
// PainSkin
//
// returns the pain skin for a given polygroup
//============================================================
 void SetupGoblin()
     
//============================================================
//
// SetupGoblin
//
//============================================================



Source Code


00001	//=============================================================================
00002	// GoblinFemale.
00003	//=============================================================================
00004	class GoblinFemale expands Goblin;
00005	
00006	
00007	//================================================
00008	//
00009	// SeveredLimbClass
00010	//
00011	//================================================
00012	function class<Actor> SeveredLimbClass(int BodyPart)
00013	{
00014		switch(BodyPart)
00015		{
00016			case BODYPART_LARM1:
00017				return class'GoblinLArm';
00018			case BODYPART_RARM1:
00019				return class'GoblinRArm';
00020			case BODYPART_HEAD:
00021				return class'GoblinHead';
00022		}
00023	
00024		return None;
00025	}
00026	
00027	
00028	//============================================================
00029	//
00030	// SetupGoblin
00031	//
00032	//============================================================
00033	function SetupGoblin()
00034	{
00035		// Keep the female skins, mesh
00036	}
00037	
00038	//============================================================
00039	//
00040	// BodyPartForPolyGroup
00041	//
00042	//============================================================
00043	function int BodyPartForPolyGroup(int polygroup)
00044	{
00045		switch(polygroup)
00046		{
00047			case 12: case 13:					return BODYPART_HEAD;
00048			case 1:								return BODYPART_LARM1;
00049			case 10:							return BODYPART_RARM1;
00050			case 2:								return BODYPART_LLEG1;
00051			case 3:								return BODYPART_RLEG1;
00052			case 4: case 5: case 6: case 7:
00053			case 8: case 9:	case 11:			return BODYPART_TORSO;
00054		}
00055		return BODYPART_BODY;
00056	}
00057	
00058	//============================================================
00059	//
00060	// ApplyGoreCap
00061	//
00062	//============================================================
00063	function ApplyGoreCap(int BodyPart)
00064	{
00065		switch(BodyPart)
00066		{
00067			case BODYPART_LARM1:
00068				SkelGroupSkins[7] = Texture'runefx.gore_bone';
00069				SkelGroupFlags[7] = SkelGroupFlags[7] & ~POLYFLAG_INVISIBLE;
00070				break;
00071			case BODYPART_RARM1:
00072				SkelGroupSkins[8] = Texture'runefx.gore_bone';
00073				SkelGroupFlags[8] = SkelGroupFlags[8] & ~POLYFLAG_INVISIBLE;
00074				break;
00075			case BODYPART_HEAD:
00076				SkelGroupSkins[4] = Texture'runefx.gore_bone';
00077				SkelGroupFlags[4] = SkelGroupFlags[4] & ~POLYFLAG_INVISIBLE;
00078				break;
00079		}
00080	}
00081	
00082	//============================================================
00083	//
00084	// PainSkin
00085	//
00086	// returns the pain skin for a given polygroup
00087	//============================================================
00088	function Texture PainSkin(int BodyPart)
00089	{
00090		local Texture newpage;
00091		local Texture oldpage;
00092		
00093		switch(BodyPart)
00094		{
00095			case BODYPART_TORSO:
00096				oldpage = SkelGroupSkins[5];
00097				if (oldpage == Texture'creatures.goblinbody')
00098					newpage = Texture'creatures.goblinpainbody';
00099				else if (oldpage == Texture'creatures.goblinpaintedbody')
00100					newpage = Texture'creatures.goblinpainbodypainted1';
00101				else if (oldpage == Texture'creatures.goblinpaintedbody2')
00102					newpage = Texture'creatures.goblinpainbodypainted2';
00103				else if (oldpage == Texture'creatures.goblinpaintedbody3')
00104					newpage = Texture'creatures.goblinpainbodypainted3';
00105				else
00106					newpage = oldpage;
00107				SkelGroupSkins[5] = newpage;
00108				SkelGroupSkins[11] = newpage;
00109				break;
00110			case BODYPART_HEAD:
00111				oldpage = SkelGroupSkins[12];
00112				if (oldpage == Texture'creatures.goblinhead')
00113					newpage = Texture'creatures.goblinpainhead';
00114				else if (oldpage == Texture'creatures.goblinpaintedhead')
00115					newpage = Texture'creatures.goblinpainheadpainted';
00116				else if (oldpage == Texture'creatures.goblinpaintedhead2')
00117					newpage = Texture'creatures.goblinpainheadpainted2';
00118				else if (oldpage == Texture'creatures.goblinpaintedhead3')
00119					newpage = Texture'creatures.goblinpainheadpainted3';
00120				else
00121					newpage = oldpage;
00122				SkelGroupSkins[12] = newpage;
00123				SkelGroupSkins[13] = newpage;
00124				break;
00125			case BODYPART_LARM1:
00126				oldpage = SkelGroupSkins[1];
00127				if (oldpage == Texture'creatures.goblinarmleg')
00128					newpage = Texture'creatures.goblinpainarmleg';
00129				else if (oldpage == Texture'creatures.goblinpaintedarmleg')
00130					newpage = Texture'creatures.goblinpainarmlegpainted';
00131				else
00132					newpage = oldpage;
00133				SkelGroupSkins[1] = newpage;
00134				SkelGroupSkins[6] = newpage;
00135				break;
00136			case BODYPART_RARM1:
00137				oldpage = SkelGroupSkins[10];
00138				if (oldpage == Texture'creatures.goblinarmleg')
00139					newpage = Texture'creatures.goblinpainarmleg';
00140				else if (oldpage == Texture'creatures.goblinpaintedarmleg')
00141					newpage = Texture'creatures.goblinpainarmlegpainted';
00142				else
00143					newpage = oldpage;
00144				SkelGroupSkins[9] = newpage;
00145				SkelGroupSkins[10] = newpage;
00146				break;
00147			case BODYPART_LLEG1:
00148				oldpage = SkelGroupSkins[2];
00149				if (oldpage == Texture'creatures.goblinarmleg')
00150					newpage = Texture'creatures.goblinpainarmleg';
00151				else if (oldpage == Texture'creatures.goblinpaintedarmleg')
00152					newpage = Texture'creatures.goblinpainarmlegpainted';
00153				else
00154					newpage = oldpage;
00155				SkelGroupSkins[2] = newpage;
00156				break;
00157			case BODYPART_RLEG1:
00158				oldpage = SkelGroupSkins[3];
00159				if (oldpage == Texture'creatures.goblinarmleg')
00160					newpage = Texture'creatures.goblinpainarmleg';
00161				else if (oldpage == Texture'creatures.goblinpaintedarmleg')
00162					newpage = Texture'creatures.goblinpainarmlegpainted';
00163				else
00164					newpage = oldpage;
00165				SkelGroupSkins[3] = newpage;
00166				break;
00167		}
00168		return None;
00169	}
00170	
00171	//============================================================
00172	//
00173	// CanPickup
00174	//
00175	// Let's pawn dictate what it can pick up
00176	//============================================================
00177	function bool CanPickup(Inventory item)
00178	{
00179		if (Health <= 0)
00180			return false;
00181	
00182		if (item.IsA('Weapon') && (BodyPartHealth[BODYPART_RARM1] > 0) && (Weapon == None))
00183		{
00184			return (item.IsA('Torch') || item.IsA('GoblinClaw'));
00185		}
00186		else if (item.IsA('Shield') && (BodyPartHealth[BODYPART_LARM1] > 0) && (Shield == None))
00187		{
00188			return false;
00189		}
00190		return(false);
00191	}
00192	
00193	defaultproperties
00194	{
00195	     bLungeAttack=False
00196	     FightOrFlight=0.800000
00197	     FightOrDefend=0.000000
00198	     LatOrVertDodge=0.500000
00199	     HighOrLowBlock=1.000000
00200	     BlockChance=0.000000
00201	     BreathSound=Sound'CreaturesSnd.Goblin.goblinbreath04'
00202	     AcquireSound=Sound'CreaturesSnd.Goblin.goblinsee03'
00203	     AmbientWaitSounds(0)=Sound'CreaturesSnd.Goblin.goblinamb13'
00204	     AmbientWaitSounds(1)=Sound'CreaturesSnd.Goblin.goblinword01'
00205	     AmbientWaitSounds(2)=Sound'CreaturesSnd.Goblin.goblinamb07'
00206	     AmbientFightSounds(0)=Sound'CreaturesSnd.Goblin.goblinattack26'
00207	     AmbientFightSounds(1)=Sound'CreaturesSnd.Goblin.goblinattack31'
00208	     AmbientFightSounds(2)=Sound'CreaturesSnd.Goblin.goblinattack02'
00209	     AmbientWaitSoundDelay=8.500000
00210	     AmbientFightSoundDelay=6.000000
00211	     StartWeapon=Class'RuneI.GoblinClaw'
00212	     StartShield=None
00213	     JumpZ=50.000000
00214	     MaxStepHeight=60.000000
00215	     Health=25
00216	     HitSound1=Sound'CreaturesSnd.Goblin.goblinhit23'
00217	     HitSound2=Sound'CreaturesSnd.Goblin.goblinhit03'
00218	     HitSound3=Sound'CreaturesSnd.Goblin.goblinattack25'
00219	     Die=Sound'CreaturesSnd.Goblin.goblindeath16'
00220	     Die2=Sound'CreaturesSnd.Goblin.goblindeath02'
00221	     Die3=Sound'CreaturesSnd.Goblin.goblindeath01'
00222	     SkelMesh=5
00223	}

End Source Code