Core.Object | +--Engine.Actor | +--Engine.Inventory | +--Engine.Pickup | +--UnrealShare.ShieldBelt
ShieldBeltEffect
MyEffect
FireTexture
TeamFireTextures[4]
int
TeamNum
Texture
TeamTextures[4]
void
ArmorImpactEffect(vector HitLocation)
Destroyed()
PickupFunction(Pawn Other)
SetEffectTexture()
Timer()
00001 //============================================================================= 00002 // ShieldBelt. 00003 //============================================================================= 00004 class ShieldBelt extends Pickup; 00005 00006 #exec AUDIO IMPORT FILE="Sounds\Pickups\SBELTA1.WAV" NAME="BeltSnd" GROUP="Pickups" 00007 #exec AUDIO IMPORT FILE="Sounds\Pickups\pSBELTA2.WAV" NAME="PSbelta2" GROUP="Pickups" 00008 #exec AUDIO IMPORT FILE="Sounds\Pickups\SBELThe2.WAV" NAME="Sbelthe2" GROUP="Pickups" 00009 00010 #exec TEXTURE IMPORT NAME=I_ShieldBelt FILE=TEXTURES\HUD\i_belt.PCX GROUP="Icons" MIPS=OFF 00011 #exec TEXTURE IMPORT NAME=GoldSkin FILE=models\gold.PCX GROUP="None" 00012 #exec TEXTURE IMPORT NAME=RedSkin FILE=MODELS\ChromR.PCX GROUP=Skins FLAGS=2 // skin 00013 #exec TEXTURE IMPORT NAME=BlueSkin FILE=MODELS\ChromB.PCX GROUP=Skins FLAGS=2 // skin 00014 00015 #exec MESH IMPORT MESH=ShieldBeltMesh ANIVFILE=MODELS\belt_a.3D DATAFILE=MODELS\belt_d.3D X=0 Y=0 Z=0 00016 #exec MESH ORIGIN MESH=ShieldBeltMesh X=0 Y=120 Z=110 YAW=64 00017 #exec MESH SEQUENCE MESH=ShieldBeltMesh SEQ=All STARTFRAME=0 NUMFRAMES=1 00018 #exec TEXTURE IMPORT NAME=Abelt1 FILE=MODELS\belt.PCX GROUP="Skins" 00019 #exec MESHMAP SCALE MESHMAP=ShieldBeltMesh X=0.025 Y=0.025 Z=0.05 00020 #exec MESHMAP SETTEXTURE MESHMAP=ShieldBeltMesh NUM=1 TEXTURE=Abelt1 00021 00022 #exec OBJ LOAD FILE=..\Textures\Belt_fx.utx PACKAGE=Unrealshare.Belt_fx 00023 00024 var ShieldBeltEffect MyEffect; 00025 var() firetexture TeamFireTextures[4]; 00026 var() texture TeamTextures[4]; 00027 var int TeamNum; 00028 00029 function ArmorImpactEffect(vector HitLocation) 00030 { 00031 if ( Owner.IsA('PlayerPawn') ) 00032 { 00033 PlayerPawn(Owner).ClientFlash(-0.05,vect(400,400,400)); 00034 PlayerPawn(Owner).PlaySound(DeActivateSound, SLOT_None, 2.7*PlayerPawn(Owner).SoundDampening); 00035 } 00036 if ( MyEffect != None ) 00037 { 00038 //MyEffect.Texture = MyEffect.LowDetailTexture; 00039 MyEffect.ScaleGlow = 4.0; 00040 MyEffect.Fatness = 255; 00041 SetTimer(0.8, false); 00042 } 00043 } 00044 00045 function Timer() 00046 { 00047 if ( MyEffect != None ) 00048 { 00049 MyEffect.Fatness = MyEffect.Default.Fatness; 00050 SetEffectTexture(); 00051 } 00052 } 00053 00054 function Destroyed() 00055 { 00056 if ( Owner != None ) 00057 Owner.SetDefaultDisplayProperties(); 00058 if ( MyEffect != None ) 00059 MyEffect.Destroy(); 00060 Super.Destroyed(); 00061 } 00062 00063 function PickupFunction(Pawn Other) 00064 { 00065 MyEffect = Spawn(class'ShieldBeltEffect', Owner,,Owner.Location, Owner.Rotation); 00066 MyEffect.Mesh = Owner.Mesh; 00067 MyEffect.DrawScale = Owner.Drawscale; 00068 00069 if ( Level.Game.bTeamGame && (Other.PlayerReplicationInfo != None) ) 00070 TeamNum = Other.PlayerReplicationInfo.Team; 00071 else 00072 TeamNum = 3; 00073 SetEffectTexture(); 00074 } 00075 00076 function SetEffectTexture() 00077 { 00078 if ( TeamNum != 3 ) 00079 MyEffect.ScaleGlow = 0.5; 00080 else 00081 MyEffect.ScaleGlow = 1.0; 00082 MyEffect.Texture = TeamFireTextures[TeamNum]; 00083 MyEffect.LowDetailTexture = TeamTextures[TeamNum]; 00084 } 00085 00086 defaultproperties 00087 { 00088 TeamFireTextures(0)=FireTexture'UnrealShare.Belt_fx.ShieldBelt.RedShield' 00089 TeamFireTextures(1)=FireTexture'UnrealShare.Belt_fx.ShieldBelt.BlueShield' 00090 TeamFireTextures(2)=FireTexture'UnrealShare.Belt_fx.ShieldBelt.Greenshield' 00091 TeamFireTextures(3)=FireTexture'UnrealShare.Belt_fx.ShieldBelt.N_Shield' 00092 TeamTextures(0)=Texture'UnrealShare.Belt_fx.ShieldBelt.newred' 00093 TeamTextures(1)=Texture'UnrealShare.Belt_fx.ShieldBelt.newblue' 00094 TeamTextures(2)=Texture'UnrealShare.Belt_fx.ShieldBelt.newgreen' 00095 TeamTextures(3)=Texture'UnrealShare.Belt_fx.ShieldBelt.newgold' 00096 bDisplayableInv=True 00097 PickupMessage="You got the Shield Belt." 00098 RespawnTime=60.000000 00099 PickupViewMesh=LodMesh'UnrealShare.ShieldBeltMesh' 00100 ProtectionType1=ProtectNone 00101 ProtectionType2=ProtectNone 00102 Charge=100 00103 ArmorAbsorption=100 00104 bIsAnArmor=True 00105 AbsorptionPriority=10 00106 MaxDesireability=2.000000 00107 PickupSound=Sound'UnrealShare.Pickups.BeltSnd' 00108 DeActivateSound=Sound'UnrealShare.Pickups.Sbelthe2' 00109 Icon=Texture'UnrealShare.Icons.I_ShieldBelt' 00110 bOwnerNoSee=True 00111 RemoteRole=ROLE_DumbProxy 00112 Mesh=LodMesh'UnrealShare.ShieldBeltMesh' 00113 CollisionRadius=20.000000 00114 CollisionHeight=5.000000 00115 }