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 00079 00080 00081 00082 00083 00084 00085 00086 00087 00088 00089 00090 00091 00092 00093 00094 00095 00096 00097 00098 00099 00100 00101 00102 00103 00104 00105 00106 00107 00108 00109 00110 00111 00112 00113 00114 00115 00116 00117 00118 00119 00120 00121 00122 00123 00124 00125 00126 00127 00128 00129 00130 00131 00132 00133 00134 00135 00136 00137 00138 00139 00140 00141 00142 00143 00144 00145 00146 00147 00148 00149 00150 00151 00152 00153 00154 00155 00156 00157 00158 00159 00160 00161 00162 00163 00164 00165 |
//============================================================================= // Amplifier. //============================================================================= class Amplifier extends Pickup; #exec AUDIO IMPORT FILE="Sounds\Pickups\HEALTH1.wav" NAME="HEALTH1" GROUP="Pickups" #exec AUDIO IMPORT FILE="Sounds\Pickups\ampl1.wav" NAME="AmpAct" GROUP="Pickups" #exec TEXTURE IMPORT NAME=I_Amp FILE=Textures\Hud\i_amp.pcx GROUP="Icons" MIPS=OFF #exec MESH IMPORT MESH=AmplifierM ANIVFILE=Models\amp_a.3d DATAFILE=Models\amp_d.3d X=0 Y=0 Z=0 LODSTYLE=8 MLOD=1 // 124 Vertices, 244 Triangles #exec MESH LODPARAMS MESH=AmplifierM STRENGTH=1.0 MINVERTS=21 MORPH=0.3 ZDISP=1200.0 #exec MESH ORIGIN MESH=AmplifierM X=0 Y=0 Z=50 YAW=0 #exec MESH SEQUENCE MESH=AmplifierM SEQ=All STARTFRAME=0 NUMFRAMES=1 #exec TEXTURE IMPORT NAME=JAmplifier1 FILE=Models\Amp.pcx GROUP="Skins" #exec MESHMAP SCALE MESHMAP=AmplifierM X=0.08 Y=0.08 Z=0.16 #exec MESHMAP SETTEXTURE MESHMAP=AmplifierM NUM=1 TEXTURE=JAmplifier1 TLOD=10 var() float AmpMultiplier; var() sound AmpSound; event TravelPreAccept() { local inventory w; Super.TravelPreAccept(); w = Pawn(Owner).FindInventoryType(class'DispersionPistol'); if ( w != None ) DispersionPistol(w).Amp = self; w = Pawn(Owner).FindInventoryType(class'ASMD'); if ( w != None ) ASMD(w).Amp = self; } function inventory SpawnCopy( pawn Other ) { local inventory Copy; local Inventory I; Copy = Super.SpawnCopy(Other); I = Other.FindInventoryType(class'DispersionPistol'); if ( DispersionPistol(I) != None ) DispersionPistol(I).amp = Amplifier(Copy); I = Other.FindInventoryType(class'ASMD'); if ( ASMD(I) != None ) ASMD(I).amp = Amplifier(Copy); return Copy; } function float UseCharge(float Amount) { Return 1.0; } function UsedUp() { local Inventory I; I = Pawn(Owner).FindInventoryType(class'DispersionPistol'); if ( DispersionPistol(I) != None ) DispersionPistol(I).amp = None; I = Pawn(Owner).FindInventoryType(class'ASMD'); if ( ASMD(I) != None ) ASMD(I).amp = None; Super.UsedUp(); } state Activated { function BeginState() { local inventory inv; bActive = true; for ( Inv=Pawn(Owner).Inventory; Inv!=None; Inv=Inv.Inventory ) { if ( inv.isa('DispersionPistol')) DispersionPistol(Inv).Amp = self; if ( inv.isa('ASMD')) ASMD(Inv).Amp = self; } } function float UseCharge(float Amount) { local float TempCharge; if (AmpMultiplier<1.0) AmpMultiplier=1.0; if (Charge < Amount) { TempCharge = Charge; Charge=0; Return (AmpMultiplier-1.0)*TempCharge/Amount+1.0; } Charge = Charge - Amount; return AmpMultiplier; } function Timer() { Charge -= 2; if (Charge<=0) { UsedUp(); } } function EndState() { if ( Owner.IsA('PlayerPawn') ) PlayerPawn(Owner).ClientAdjustGlow(0.1,vect(-100,-20,0)); Owner.AmbientSound=None; Owner.LightType=LT_None; Owner.AmbientGlow=0; bActive = false; } Begin: SetTimer(1.0,True); PlaySound(ActivateSound); Owner.AmbientSound=AmpSound; if ( Owner.IsA('PlayerPawn') ) PlayerPawn(Owner).ClientAdjustGlow(-0.1,vect(100,20,0)); Owner.LightType=LT_Steady; Owner.LightRadius=6; Owner.LightEffect=LE_NonIncidence; Owner.LightSaturation=40; Owner.LightHue=225; Owner.LightBrightness=255; Owner.AmbientGlow=255; } state DeActivated { Begin: } defaultproperties { AmpMultiplier=4.000000 AmpSound=Sound'UnrealShare.Pickups.AmpAct' bCanActivate=True ExpireMessage="Amplifier is out of power." bAutoActivate=True bActivatable=True bDisplayableInv=True PickupMessage="You got the Energy Amplifier" RespawnTime=90.000000 PickupViewMesh=LodMesh'UnrealShare.AmplifierM' Charge=1000 MaxDesireability=1.200000 PickupSound=Sound'UnrealShare.Pickups.GenPickSnd' ActivateSound=Sound'UnrealShare.Pickups.HEALTH1' Icon=Texture'UnrealShare.Icons.I_Amp' Mesh=LodMesh'UnrealShare.AmplifierM' CollisionRadius=20.000000 CollisionHeight=13.500000 } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |