RuneI
Class LokiGuard

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

class LokiGuard
extends RuneI.Viking

//============================================================================= // LokiGuard. //=============================================================================

Function Summary
 void ApplyGoreCap(int BodyPart)
     
//============================================================
//
// ApplyGoreCap
//
//============================================================
 int BodyPartForPolyGroup(int polygroup)
     
//============================================================
//
// BodyPartForPolyGroup
//
//============================================================
 void CreatureStatue()
     
//================================================
//
// Statue
//
//================================================
 Texture PainSkin(int BodyPart)
     
//============================================================
//
// PainSkin
//
// returns the pain skin for a given polygroup
//============================================================



Source Code


00001	//=============================================================================
00002	// LokiGuard.
00003	//=============================================================================
00004	class LokiGuard expands Viking;
00005	
00006	//============================================================
00007	//
00008	// PainSkin
00009	//
00010	// returns the pain skin for a given polygroup
00011	//============================================================
00012	function Texture PainSkin(int BodyPart)
00013	{
00014		switch(BodyPart)
00015		{
00016			case BODYPART_TORSO:
00017				SkelGroupSkins[2] = Texture'players.ragnarlg_bodypain';
00018				break;
00019			case BODYPART_HEAD:
00020				SkelGroupSkins[10] = Texture'players.ragnarlg_headpain';
00021				break;
00022			case BODYPART_LARM1:
00023				SkelGroupSkins[8] = Texture'players.ragnarlg_armpain';
00024				SkelGroupSkins[11] = Texture'players.ragnarlg_armpain';
00025				break;
00026			case BODYPART_RARM1:
00027				SkelGroupSkins[5] = Texture'players.ragnarlg_armpain';
00028				SkelGroupSkins[4] = Texture'players.ragnarlg_armpain';
00029				break;
00030			case BODYPART_LLEG1:
00031				SkelGroupSkins[3] = Texture'players.ragnarlg_legpain';
00032				break;
00033			case BODYPART_RLEG1:
00034				SkelGroupSkins[1] = Texture'players.ragnarlg_legpain';
00035				break;
00036		}
00037		return None;
00038	}
00039	
00040	//============================================================
00041	//
00042	// BodyPartForPolyGroup
00043	//
00044	//============================================================
00045	function int BodyPartForPolyGroup(int polygroup)
00046	{
00047		switch(polygroup)
00048		{
00049			case 10:							return BODYPART_HEAD;
00050			case 11:							return BODYPART_LARM1;
00051			case 4: 							return BODYPART_RARM1;
00052			case 3:								return BODYPART_LLEG1;
00053			case 1:								return BODYPART_RLEG1;
00054			case 2: case 5: case 6: case 7:
00055				case 8: case 9: 				return BODYPART_TORSO;
00056		}
00057		return BODYPART_BODY;
00058	}
00059	
00060	//============================================================
00061	//
00062	// ApplyGoreCap
00063	//
00064	//============================================================
00065	function ApplyGoreCap(int BodyPart)
00066	{
00067		switch(BodyPart)
00068		{
00069			case BODYPART_LARM1:
00070				SkelGroupSkins[9] = Texture'runefx.gore_bone';
00071				SkelGroupFlags[9] = SkelGroupFlags[9] & ~POLYFLAG_INVISIBLE;
00072				break;
00073			case BODYPART_RARM1:
00074				SkelGroupSkins[12] = Texture'runefx.gore_bone';
00075				SkelGroupFlags[12] = SkelGroupFlags[12] & ~POLYFLAG_INVISIBLE;
00076				break;
00077			case BODYPART_HEAD:
00078				SkelGroupSkins[7] = Texture'runefx.gore_bone';
00079				SkelGroupFlags[7] = SkelGroupFlags[7] & ~POLYFLAG_INVISIBLE;
00080				break;
00081		}
00082	}
00083	
00084	//================================================
00085	//
00086	// SeveredLimbClass
00087	//
00088	//================================================
00089	function class<Actor> SeveredLimbClass(int BodyPart)
00090	{
00091		switch(BodyPart)
00092		{
00093			case BODYPART_LARM1:
00094				return class'GuardLArm';
00095			case BODYPART_RARM1:
00096				return class'GuardRArm';
00097			case BODYPART_HEAD:
00098				return class'GuardHead';
00099				break;
00100		}
00101	
00102		return None;
00103	}
00104	
00105	
00106	//================================================
00107	//
00108	// Statue
00109	//
00110	//================================================
00111	State() Statue
00112	{
00113	ignores HearNoise, EnemyAcquired, Bump;
00114	
00115		function CreatureStatue()
00116		{
00117			//arms
00118			SkelGroupSkins[1] = texture'statues.lg_rckleg';
00119			SkelGroupSkins[3] = texture'statues.lg_rckleg';
00120	
00121			//legs
00122			SkelGroupSkins[4] = texture'statues.lg_rckarm';
00123			SkelGroupSkins[11] = texture'statues.lg_rckarm';
00124	
00125			//body
00126			SkelGroupSkins[2] = texture'statues.lg_rckbody';
00127			SkelGroupSkins[5] = texture'statues.lg_rckbody';
00128			SkelGroupSkins[6] = texture'statues.lg_rckbody';
00129			SkelGroupSkins[7] = texture'statues.lg_rckbody';
00130			SkelGroupSkins[8] = texture'statues.lg_rckbody';
00131			SkelGroupSkins[9] = texture'statues.lg_rckbody';
00132	
00133			//head
00134			SkelGroupSkins[10] = texture'statues.lg_rckhead';
00135		}
00136	}
00137	
00138	defaultproperties
00139	{
00140	     AcquireSound=Sound'CreaturesSnd.Vikings.dark2attack03'
00141	     AmbientWaitSounds(0)=Sound'CreaturesSnd.Vikings.dark2ambient01'
00142	     AmbientWaitSounds(1)=Sound'CreaturesSnd.Vikings.vike1see01'
00143	     AmbientWaitSounds(2)=Sound'CreaturesSnd.Vikings.vike1breath02'
00144	     AmbientFightSounds(0)=Sound'CreaturesSnd.Vikings.dark2attack01'
00145	     AmbientFightSounds(1)=Sound'CreaturesSnd.Vikings.dark2see01'
00146	     AmbientFightSounds(2)=Sound'CreaturesSnd.Vikings.dark2ambient01'
00147	     AmbientWaitSoundDelay=10.000000
00148	     AmbientFightSoundDelay=7.000000
00149	     HitSound1=Sound'CreaturesSnd.Vikings.guardhit01'
00150	     HitSound2=Sound'CreaturesSnd.Vikings.guardhit02'
00151	     HitSound3=Sound'CreaturesSnd.Vikings.guardhit03'
00152	     Die=Sound'CreaturesSnd.Vikings.guarddeath01'
00153	     Die2=Sound'CreaturesSnd.Vikings.guarddeath02'
00154	     Die3=Sound'CreaturesSnd.Vikings.guarddeath03'
00155	     MaxMouthRot=7000
00156	     MaxMouthRotRate=65535
00157	     SkelMesh=5
00158	}

End Source Code