RuneI
Class GoblinCrazy

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

class GoblinCrazy
extends RuneI.Goblin

//============================================================================= // GoblinCrazy. //=============================================================================

Function Summary
 void ApplyGoreCap(int BodyPart)
     
//============================================================
//
// ApplyGoreCap
//
//============================================================
 int BodyPartForPolyGroup(int polygroup)
     
//============================================================
//
// BodyPartForPolyGroup
//
//============================================================
 Texture PainSkin(int BodyPart)
     
//============================================================
//
// PainSkin
//
// returns the pain skin for a given polygroup
//============================================================
 void SetGoblinSkins(EGoblinLimb arms, EGoblinTorso torso, EGoblinHead head)
     
//============================================================
//
// SetGoblinSkins
//
//============================================================



Source Code


00001	//=============================================================================
00002	// GoblinCrazy.
00003	//=============================================================================
00004	class GoblinCrazy 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'GoblinEHead';
00022		}
00023	
00024		return None;
00025	}
00026	
00027	
00028	//============================================================
00029	//
00030	// BodyPartForPolyGroup
00031	//
00032	//============================================================
00033	function int BodyPartForPolyGroup(int polygroup)
00034	{
00035		switch(polygroup)
00036		{
00037			case 11: case 12:					return BODYPART_HEAD;
00038			case 1:								return BODYPART_LARM1;
00039			case 10:							return BODYPART_RARM1;
00040			case 2:								return BODYPART_LLEG1;
00041			case 3:								return BODYPART_RLEG1;
00042			case 4: case 5: case 6: case 7:
00043			case 8: case 9:						return BODYPART_TORSO;
00044		}
00045		return BODYPART_BODY;
00046	}
00047	
00048	//============================================================
00049	//
00050	// ApplyGoreCap
00051	//
00052	//============================================================
00053	function ApplyGoreCap(int BodyPart)
00054	{
00055		switch(BodyPart)
00056		{
00057			case BODYPART_LARM1:
00058				SkelGroupSkins[7] = Texture'runefx.gore_bone';
00059				SkelGroupFlags[7] = SkelGroupFlags[7] & ~POLYFLAG_INVISIBLE;
00060				break;
00061			case BODYPART_RARM1:
00062				SkelGroupSkins[8] = Texture'runefx.gore_bone';
00063				SkelGroupFlags[8] = SkelGroupFlags[8] & ~POLYFLAG_INVISIBLE;
00064				break;
00065			case BODYPART_HEAD:
00066				SkelGroupSkins[4] = Texture'runefx.gore_bone';
00067				SkelGroupFlags[4] = SkelGroupFlags[4] & ~POLYFLAG_INVISIBLE;
00068				break;
00069		}
00070	}
00071	
00072	//============================================================
00073	//
00074	// SetGoblinSkins
00075	//
00076	//============================================================
00077	function SetGoblinSkins(EGoblinLimb arms, EGoblinTorso torso, EGoblinHead head)
00078	{
00079		switch(arms)
00080		{
00081			case LIMB_NORMAL:
00082				break;
00083			case LIMB_WARPAINT1:
00084				SkelGroupSkins[1] = texture'runei.goblinpaintedarmleg';
00085				SkelGroupSkins[6] = texture'runei.goblinpaintedarmleg';
00086				SkelGroupSkins[9] = texture'runei.goblinpaintedarmleg';
00087				SkelGroupSkins[10] = texture'runei.goblinpaintedarmleg';
00088				break;
00089		}
00090		switch(torso)
00091		{
00092			case TORSO_NORMAL:
00093				break;
00094			case TORSO_WARPAINT1:
00095				SkelGroupSkins[5] = texture'runei.goblinpaintedbody';
00096				break;
00097			case TORSO_WARPAINT2:
00098				SkelGroupSkins[5] = texture'runei.goblinpaintedbody2';
00099				break;
00100			case TORSO_WARPAINT3:
00101				SkelGroupSkins[5] = texture'runei.goblinpaintedbody3';
00102				break;
00103		}
00104		switch(head)
00105		{
00106			case HEAD_NORMAL:
00107				break;
00108			case HEAD_WARPAINT1:
00109				SkelGroupSkins[11] = texture'runei.goblinpaintedhead';
00110				SkelGroupSkins[12] = texture'runei.goblinpaintedhead';
00111				break;
00112			case HEAD_WARPAINT2:
00113				SkelGroupSkins[11] = texture'runei.goblinpaintedhead2';
00114				SkelGroupSkins[12] = texture'runei.goblinpaintedhead2';
00115				break;
00116			case HEAD_WARPAINT3:
00117				SkelGroupSkins[11] = texture'runei.goblinpaintedhead3';
00118				SkelGroupSkins[12] = texture'runei.goblinpaintedhead3';
00119				break;
00120		}
00121	}
00122	
00123	//============================================================
00124	//
00125	// PainSkin
00126	//
00127	// returns the pain skin for a given polygroup
00128	//============================================================
00129	function Texture PainSkin(int BodyPart)
00130	{
00131		local Texture newpage;
00132		local Texture oldpage;
00133		
00134		switch(BodyPart)
00135		{
00136			case BODYPART_TORSO:
00137				oldpage = SkelGroupSkins[5];
00138				if (oldpage == Texture'creatures.goblinbody')
00139					newpage = Texture'creatures.goblinpainbody';
00140				else if (oldpage == Texture'creatures.goblinpaintedbody')
00141					newpage = Texture'creatures.goblinpainbodypainted1';
00142				else if (oldpage == Texture'creatures.goblinpaintedbody2')
00143					newpage = Texture'creatures.goblinpainbodypainted2';
00144				else if (oldpage == Texture'creatures.goblinpaintedbody3')
00145					newpage = Texture'creatures.goblinpainbodypainted3';
00146				else
00147					newpage = oldpage;
00148				SkelGroupSkins[5] = newpage;
00149				break;
00150			case BODYPART_HEAD:
00151				oldpage = SkelGroupSkins[11];
00152				if (oldpage == Texture'creatures.goblinhead')
00153					newpage = Texture'creatures.goblinpainhead';
00154				else if (oldpage == Texture'creatures.goblinpaintedhead')
00155					newpage = Texture'creatures.goblinpainheadpainted';
00156				else if (oldpage == Texture'creatures.goblinpaintedhead2')
00157					newpage = Texture'creatures.goblinpainheadpainted2';
00158				else if (oldpage == Texture'creatures.goblinpaintedhead3')
00159					newpage = Texture'creatures.goblinpainheadpainted3';
00160				else
00161					newpage = oldpage;
00162				SkelGroupSkins[11] = newpage;
00163				SkelGroupSkins[12] = newpage;
00164				break;
00165			case BODYPART_LARM1:
00166				oldpage = SkelGroupSkins[1];
00167				if (oldpage == Texture'creatures.goblinarmleg')
00168					newpage = Texture'creatures.goblinpainarmleg';
00169				else if (oldpage == Texture'creatures.goblinpaintedarmleg')
00170					newpage = Texture'creatures.goblinpainarmlegpainted';
00171				else
00172					newpage = oldpage;
00173				SkelGroupSkins[1] = newpage;
00174				SkelGroupSkins[6] = newpage;
00175				break;
00176			case BODYPART_RARM1:
00177				oldpage = SkelGroupSkins[10];
00178				if (oldpage == Texture'creatures.goblinarmleg')
00179					newpage = Texture'creatures.goblinpainarmleg';
00180				else if (oldpage == Texture'creatures.goblinpaintedarmleg')
00181					newpage = Texture'creatures.goblinpainarmlegpainted';
00182				else
00183					newpage = oldpage;
00184				SkelGroupSkins[9] = newpage;
00185				SkelGroupSkins[10] = newpage;
00186				break;
00187			case BODYPART_LLEG1:
00188				oldpage = SkelGroupSkins[2];
00189				if (oldpage == Texture'creatures.goblinarmleg')
00190					newpage = Texture'creatures.goblinpainarmleg';
00191				else if (oldpage == Texture'creatures.goblinpaintedarmleg')
00192					newpage = Texture'creatures.goblinpainarmlegpainted';
00193				else
00194					newpage = oldpage;
00195				SkelGroupSkins[2] = newpage;
00196				break;
00197			case BODYPART_RLEG1:
00198				oldpage = SkelGroupSkins[3];
00199				if (oldpage == Texture'creatures.goblinarmleg')
00200					newpage = Texture'creatures.goblinpainarmleg';
00201				else if (oldpage == Texture'creatures.goblinpaintedarmleg')
00202					newpage = Texture'creatures.goblinpainarmlegpainted';
00203				else
00204					newpage = oldpage;
00205				SkelGroupSkins[3] = newpage;
00206				break;
00207		}
00208		return None;
00209	}
00210	
00211	defaultproperties
00212	{
00213	     BreathSound=Sound'CreaturesSnd.Goblin.goblinbreath07'
00214	     AcquireSound=Sound'CreaturesSnd.Goblin.goblinword12'
00215	     AmbientWaitSounds(0)=Sound'CreaturesSnd.Goblin.goblinamb16'
00216	     AmbientWaitSounds(1)=Sound'CreaturesSnd.Goblin.goblinword11'
00217	     AmbientWaitSounds(2)=Sound'CreaturesSnd.Goblin.goblinamb12'
00218	     AmbientFightSounds(0)=Sound'CreaturesSnd.Goblin.goblinattack21'
00219	     AmbientFightSounds(1)=Sound'CreaturesSnd.Goblin.goblinattack06'
00220	     AmbientFightSounds(2)=Sound'CreaturesSnd.Goblin.goblinattack05'
00221	     AmbientWaitSoundDelay=8.000000
00222	     HitSound1=Sound'CreaturesSnd.Goblin.goblinhit02'
00223	     HitSound2=Sound'CreaturesSnd.Goblin.goblinhit21'
00224	     HitSound3=Sound'CreaturesSnd.Goblin.goblinhit10'
00225	     Die=Sound'CreaturesSnd.Goblin.goblindeath05'
00226	     Die2=Sound'CreaturesSnd.Goblin.goblindeath12'
00227	     Die3=Sound'CreaturesSnd.Goblin.goblindeath15'
00228	     SkelMesh=4
00229	}

End Source Code