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 |
/****************************************************************************** PoltergeistTank Creation date: 2012-08-14 13:34 Last change: $Id$ Copyright © 2012, Wormbo Website: http://www.koehler-homepage.de/Wormbo/ Feel free to reuse this code. Send me a note if you found it helpful or want to report bugs/provide improvements. Please ask for permission first, if you intend to make money off reused code. ******************************************************************************/ class PoltergeistTank extends HoverTank; //============================================================================= // Imports //============================================================================= #exec obj load file=EnergyTankMesh.ukx package=WVHoverTankV2.Poltergeist #exec obj load file=EnergyTankSkins.utx package=WVHoverTankV2.Skins #exec texture import file=Textures\PoltergeistIcon.dds group=HUD alpha=1 lodset=5 function bool NeedToTurn(vector TargetLocation) { if (VSize(TargetLocation - Location) < 1500 && Normal(TargetLocation - Location) dot Normal(vector(Weapons[ActiveWeapon].CurrentAim) >> Weapons[ActiveWeapon].Rotation) > 0.5) return false; // can fire a shockwave, so should be able to hit as long as not too far off return Super.NeedToTurn(TargetLocation); } function ShouldTargetMissile(Projectile P) { local AIController C; local vector PredictedLocation; local float PredictedDist; if (ActiveWeapon >= Weapons.Length) return; C = AIController(Controller); PredictedLocation = P.Location + P.Velocity * (0.5 + Weapons[ActiveWeapon].FireCountDown); if (C != None && C.Skill >= 3.0 && (C.Enemy == None || !C.LineOfSightTo(C.Enemy) || Normal(C.Enemy.Location - Location) dot Normal(PredictedLocation - Location) > 0.5)) { // where will the projectile be at the earliest point we could fire a shockwave? PredictedDist = VSize(P.Location - Location) - VSize(P.Velocity) * (0.5 + Weapons[ActiveWeapon].FireCountDown); if (PredictedDist > 200 && PredictedDist < 1500) { ShootMissile(P); } } } //============================================================================= // Default values //============================================================================= defaultproperties { DriverWeapons[0] = (WeaponClass=Class'PoltergeistCannon',WeaponBone=MainCannonAttach) MinVehicleDistance = -100.0 // nothing wrong with bumping into enemy if can use shockwave Mesh = SkeletalMesh'PoltergeistMesh' RedSkin = Shader'EnergyTankShaderRed' BlueSkin = Shader'EnergyTankShaderBlue' RanOverDamageType = class'DamTypePoltergeistRoadkill' CrushedDamageType = class'DamTypePoltergeistPancake' FPCamPos=(X=-25,Y=-32,Z=200) FPCamViewOffset=(X=90,Y=0,Z=0) //bFPNoZFromCameraPitch=True TPCamLookat=(X=-50,Y=0,Z=0) TPCamWorldOffset=(X=0,Y=0,Z=300) TPCamDistance=375 MaxGroundSpeed = 800.0 VehiclePositionString = "in a Poltergeist" VehicleNameString = "Poltergeist" VehicleDescription = "Poltergeists are appearant manifestations of invisible, but noisy, disruptive or destructive entities. This hover tank certainly is a destructive entity when it uses its heat ray and energy shock wave." VehicleIcon = (Material=Texture'PoltergeistIcon',X=1,Y=1,SizeX=126,SizeY=62,bIsGreyScale=true) // makes UTPlus happier bShowChargingBar = True DisintegrationEffectClass = class'PoltergeistExplosionEffect' } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |