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 00166 00167 00168 00169 00170 00171 00172 00173 00174 00175 00176 00177 00178 00179 00180 00181 00182 00183 00184 00185 00186 00187 00188 00189 00190 00191 00192 00193 00194 00195 00196 00197 00198 00199 00200 00201 00202 00203 00204 00205 00206 00207 00208 00209 00210 00211 00212 00213 00214 00215 00216 00217 00218 00219 00220 00221 00222 00223 00224 00225 00226 00227 00228 00229 00230 00231 00232 00233 00234 00235 00236 00237 00238 00239 00240 00241 00242 00243 00244 00245 00246 00247 00248 00249 00250 00251 00252 00253 00254 00255 00256 00257 00258 00259 00260 00261 |
//============================================================================= // ASTurret_IonCannon //============================================================================= #EXEC OBJ LOAD File=../StaticMeshes/AS_Weapons_SM.usx class ASTurret_IonCannon extends ASTurret; var vector RechargeOrigin, RechargeSize; var sound ChargingSound; simulated function PlayFiring(optional float Rate, optional name FiringMode) { if ( Level.NetMode != NM_DedicatedServer ) { PlayAnim('Fire', 0.5); AmbientSound = None; PlaySound(sound'WeaponSounds.BExplosion5'); } } simulated event PlayCharge() { if ( Level.NetMode != NM_DedicatedServer ) { PlayAnim('Charge', 0.08, 0.25); AmbientSound = ChargingSound; } } function Vehicle FindEntryVehicle(Pawn P) { local vector Dir; if ( Bot(P.Controller) != None ) { Dir = Location - P.Location; if ( Abs(Dir.Z) < CollisionHeight ) { Dir.Z = 0; if (VSize(Dir) < EntryRadius) return self; } } return Super.FindEntryVehicle(P); } simulated event PlayRelease() { if ( Level.NetMode != NM_DedicatedServer ) { PlayAnim('Idle', 1.0, 0.25); AmbientSound = None; PlaySound(sound'WeaponSounds.TranslocatorModuleRegeneration', SLOT_Interface,, false,, 4.0); } } simulated function DrawVehicleHUD( Canvas C, PlayerController PC ) { local vehicle V; local vector ScreenPos; local string VehicleInfoString; super.DrawVehicleHUD( C, PC ); if ( Weapon == None || Weapon.GetFireMode(0) == None ) return; // 1st person view if ( !PlayerController(Controller).bBehindView ) { C.Style = ERenderStyle.STY_Alpha; // Draw Weird cam C.DrawColor.R = 255; C.DrawColor.G = 255; C.DrawColor.B = 255; C.DrawColor.A = 64; C.SetPos(0,0); C.DrawTile( Material'TransCamFB', C.SizeX, C.SizeY, 0.0, 0.0, 512, 512 ); // !! hardcoded size C.SetPos(0,0); //C.DrawTile( Material'ScreenNoiseFB', C.SizeX, C.SizeY, 0.0, 0.0, 512, 512 ); // !! hardcoded size C.DrawColor = class'HUD_Assault'.static.GetTeamColor( Team ); // Draw Reticle around visible vehicles foreach DynamicActors(class'Vehicle', V ) { if ( (V==Self) || (V.Health < 1) || V.bDeleteMe || V.GetTeamNum() == Team || !V.IndependentVehicle() ) continue; if ( !class'HUD_Assault'.static.IsTargetInFrontOfPlayer( C, V, ScreenPos, Location, Rotation ) ) continue; if ( !FastTrace( V.Location, Location ) ) continue; C.Font = class'HudBase'.static.GetConsoleFont( C ); VehicleInfoString = V.VehicleNameString $ ":" @ int(VSize(Location-V.Location)*0.01875.f) $ class'HUD_Assault'.default.MetersString; class'HUD_Assault'.static.Draw_2DCollisionBox( C, V, ScreenPos, VehicleInfoString, 1.5f, true ); } } } simulated function DrawWeaponInfo( Canvas C, HUD H ) { local float Charge, tileScaleX, tileScaleY, barOrgX, barOrgY, barSizeX, barSizeY; super.DrawWeaponInfo( C, H ); tileScaleX = C.SizeX / 640.0f; tileScaleY = C.SizeY / 480.0f; if ( Weapon.GetFireMode(0).NextFireTime > Level.TimeSeconds ) // Cooling charge = 1.f - FMin( (Weapon.GetFireMode(0).NextFireTime-Level.TimeSeconds) / Weapon.GetFireMode(0).FireRate, 1.f); else // Power Up charge = 1.f - FMin(Weapon.GetFireMode(0).HoldTime / Weapon.GetFireMode(0).MaxHoldTime, 1.f); if ( charge > 0 ) { barOrgX = RechargeOrigin.X * tileScaleX; barOrgY = RechargeOrigin.Y * tileScaleY; barSizeX = RechargeSize.X * tileScaleX; barSizeY = RechargeSize.Y * tileScaleY; C.DrawColor = class'UT2k4Assault.HUD_Assault'.static.GetGYRColorRamp( charge ); C.DrawColor.A = 96; C.Style = ERenderStyle.STY_Alpha; C.SetPos( barOrgX, barOrgY ); C.DrawTile(Texture'Engine.WhiteTexture',barSizeX,barSizeY*charge, 0.0, 0.0,Texture'Engine.WhiteTexture'.USize,Texture'Engine.WhiteTexture'.VSize*charge); } } // Spawn Explosion FX simulated function Explode( vector HitLocation, vector HitNormal ) { if ( Level.NetMode != NM_DedicatedServer ) ExplosionEffect = Spawn(class'IonCannonDeathEffect', Self,, HitLocation, Rotation); if ( TurretBase != None ) TurretBase.Destroy(); if ( TurretSwivel != None ) TurretSwivel.Destroy(); } static function StaticPrecache(LevelInfo L) { super.StaticPrecache( L ); L.AddPrecacheMaterial( Material'AS_FX_TX.Beams.HotBolt_2' ); L.AddPrecacheMaterial( Material'AS_FX_TX.Beams.HotBolt_3' ); L.AddPrecacheMaterial( Material'AS_FX_TX.Beams.HotBolt_4' ); L.AddPrecacheMaterial( Material'AS_FX_TX.Beams.HotBolt_1' ); L.AddPrecacheMaterial( Material'AS_Weapons_TX.IonCanon.ASIonCannon1' ); L.AddPrecacheMaterial( Material'AS_Weapons_TX.IonCanon.ASIonCannon2' ); // FX L.AddPrecacheMaterial( Material'AW-2004Particles.Weapons.HardSpot' ); L.AddPrecacheMaterial( Material'AW-2004Particles.Energy.AirBlastP' ); L.AddPrecacheMaterial( Material'AW-2004Particles.Energy.PurpleSwell' ); L.AddPrecacheMaterial( Material'ExplosionTex.Framed.exp2_framesP' ); L.AddPrecacheMaterial( Texture'EpicParticles.Flares.SoftFlare' ); L.AddPrecacheMaterial( Texture'EpicParticles.Beams.WhiteStreak01aw' ); L.AddPrecacheMaterial( Texture'AW-2004Particles.Energy.EclipseCircle' ); L.AddPrecacheMaterial( Texture'EpicParticles.Flares.HotSpot' ); L.AddPrecacheMaterial( Material'AW-2004Particles.Weapons.GrenExpl' ); L.AddPrecacheMaterial( Material'AS_FX_TX.Flares.Laser_Flare' ); L.AddPrecacheMaterial( Material'AW-2004Particles.Weapons.PlasmaStar' ); L.AddPrecacheStaticMesh( StaticMesh'AW-2004Particles.Weapons.PlasmaSphere' ); L.AddPrecacheStaticMesh( StaticMesh'AS_Weapons_SM.IonBase' ); L.AddPrecacheStaticMesh( StaticMesh'AS_Weapons_SM.IonSwivel' ); } simulated function UpdatePrecacheStaticMeshes() { Level.AddPrecacheStaticMesh( StaticMesh'AS_Weapons_SM.IonBase' ); Level.AddPrecacheStaticMesh( StaticMesh'AS_Weapons_SM.IonSwivel' ); Level.AddPrecacheStaticMesh( StaticMesh'AW-2004Particles.Weapons.PlasmaSphere' ); super.UpdatePrecacheStaticMeshes(); } simulated function UpdatePrecacheMaterials() { Level.AddPrecacheMaterial( Material'AS_FX_TX.Beams.HotBolt_2' ); Level.AddPrecacheMaterial( Material'AS_FX_TX.Beams.HotBolt_3' ); Level.AddPrecacheMaterial( Material'AS_FX_TX.Beams.HotBolt_4' ); Level.AddPrecacheMaterial( Material'AS_FX_TX.Beams.HotBolt_1' ); Level.AddPrecacheMaterial( Material'AS_Weapons_TX.IonCanon.ASIonCannon1' ); Level.AddPrecacheMaterial( Material'AS_Weapons_TX.IonCanon.ASIonCannon2' ); // FX Level.AddPrecacheMaterial( Material'AW-2004Particles.Weapons.HardSpot' ); Level.AddPrecacheMaterial( Material'AW-2004Particles.Energy.AirBlastP' ); Level.AddPrecacheMaterial( Material'AW-2004Particles.Energy.PurpleSwell' ); Level.AddPrecacheMaterial( Material'ExplosionTex.Framed.exp2_framesP' ); Level.AddPrecacheMaterial( Texture'EpicParticles.Flares.SoftFlare' ); Level.AddPrecacheMaterial( Texture'EpicParticles.Beams.WhiteStreak01aw' ); Level.AddPrecacheMaterial( Texture'AW-2004Particles.Energy.EclipseCircle' ); Level.AddPrecacheMaterial( Texture'EpicParticles.Flares.HotSpot' ); Level.AddPrecacheMaterial( Material'AW-2004Particles.Weapons.GrenExpl' ); Level.AddPrecacheMaterial( Material'AS_FX_TX.Flares.Laser_Flare' ); Level.AddPrecacheMaterial( Material'AW-2004Particles.Weapons.PlasmaStar' ); super.UpdatePrecacheMaterials(); } defaultproperties { RechargeOrigin=(X=620.000000,Y=400.000000) RechargeSize=(X=10.000000,Y=-100.000000) ChargingSound=Sound'AssaultSounds.AssaultRifle.IonPowerUp' TurretBaseClass=Class'UT2k4AssaultFull.ASTurret_IonCannon_Base' TurretSwivelClass=Class'UT2k4AssaultFull.ASTurret_IonCannon_Swivel' RotationInertia=0.900000 RotPitchConstraint=(Min=13184.000000,Max=11500.000000) RotationSpeed=0.500000 CamAbsLocation=(Z=0.000000) CamRelLocation=(X=0.000000,Z=400.000000) CamDistance=(X=-900.000000,Z=0.000000) CamRotationInertia=3.000000 DefaultWeaponClassName="UT2k4AssaultFull.Weapon_Turret_IonCannon" VehicleProjSpawnOffset=(X=925.000000,Y=0.000000,Z=200.000000) bCHZeroYOffset=Falsch bAutoTurret=Falsch bRemoteControlled=Falsch bShowDamageOverlay=Falsch bDrawMeshInFP=Wahr ExitPositions(0)=(X=-125.000000,Y=-200.000000,Z=128.000000) ExitPositions(1)=(X=-125.000000,Y=200.000000,Z=80.000000) EntryPosition=(X=-125.000000,Y=-200.000000,Z=-200.000000) EntryRadius=120.000000 FPCamPos=(X=400.000000,Z=400.000000) ShadowMaxTraceDist=1050.000000 ShadowCullDistance=4500.000000 DriverDamageMult=0.000000 VehiclePositionString="manning an Ion Cannon" VehicleNameString="Ion Cannon" HealthMax=2000.000000 Health=2000 bAlwaysRelevant=Wahr Mesh=SkeletalMesh'AS_VehiclesFull_M.IonCannon' DrawScale=0.660000 AmbientGlow=8 SoundPitch=51 SoundRadius=5000.000000 TransientSoundVolume=1.000000 TransientSoundRadius=5000.000000 CollisionRadius=200.000000 CollisionHeight=300.000000 } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |