Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |
00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016 00017 00018 00019 00020 00021 00022 00023 00024 00025 00026 00027 00028 00029 00030 00031 00032 00033 00034 00035 00036 00037 00038 00039 00040 00041 00042 00043 00044 00045 00046 00047 00048 00049 00050 00051 00052 00053 00054 00055 00056 00057 00058 00059 00060 00061 00062 00063 00064 00065 00066 00067 00068 00069 00070 00071 00072 00073 00074 00075 00076 00077 00078 |
class RelicDefenseInventory expands RelicInventory; #exec MESH IMPORT MESH=RelicHelmet ANIVFILE=MODELS\RelicHelmet_a.3d DATAFILE=MODELS\RelicHelmet_d.3d X=0 Y=0 Z=0 #exec MESH ORIGIN MESH=RelicHelmet X=0 Y=0 Z=0 #exec MESH SEQUENCE MESH=RelicHelmet SEQ=All STARTFRAME=0 NUMFRAMES=1 #exec MESH SEQUENCE MESH=RelicHelmet SEQ=base STARTFRAME=0 NUMFRAMES=1 #exec MESHMAP NEW MESHMAP=RelicHelmet MESH=RelicHelmet #exec MESHMAP SCALE MESHMAP=RelicHelmet X=0.1 Y=0.1 Z=0.2 #exec TEXTURE IMPORT NAME=JRelicHelmet FILE=Textures\RelicHelmet.PCX GROUP=Skins FLAGS=2 //Material #1 #exec MESHMAP SETTEXTURE MESHMAP=RelicHelmet NUM=0 TEXTURE=JRelicHelmet function bool HandlePickupQuery( inventory Item ) { local Inventory I; if (item.IsA('UT_Shieldbelt') ) return true; //don't allow shieldbelt if have defense relic return Super.HandlePickupQuery(Item); } function PickupFunction(Pawn Other) { local Inventory I; Super.PickupFunction(Other); // remove other armors for ( I=Owner.Inventory; I!=None; I=I.Inventory ) if ( I.IsA('UT_Shieldbelt') ) I.Destroy(); } function ArmorImpactEffect(vector HitLocation) { if ( Owner.IsA('PlayerPawn') ) { PlayerPawn(Owner).ClientFlash(-0.05,vect(400,400,400)); } Owner.PlaySound(DeActivateSound, SLOT_None, 2.7*Pawn(Owner).SoundDampening); FlashShell(0.4); } // // Absorb damage. // function int ArmorAbsorbDamage(int Damage, name DamageType, vector HitLocation) { ArmorImpactEffect(HitLocation); return 0.4 * Damage; } // // Return armor value. // function int ArmorPriority(name DamageType) { return 1; // very low absorption priority (only if no other armor left } defaultproperties { ShellSkin=Texture'Relics.Skins.RelicGreen' PickupMessage="You picked up the Relic of Defense!" PickupViewMesh=LodMesh'Relics.RelicHelmet' PickupViewScale=0.600000 bIsAnArmor=True Icon=Texture'Relics.Icons.RelicIconDefense' Physics=PHYS_Rotating Skin=Texture'Relics.Skins.JRelicHelmet' CollisionHeight=40.000000 LightBrightness=200 LightHue=100 LightSaturation=0 RotationRate=(Yaw=6000,Roll=0) DesiredRotation=(Roll=0) } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |