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 |
//============================================================================= // FM_SpaceFighter_AltFire //============================================================================= class FM_SpaceFighter_AltFire extends ProjectileFire; function DoFireEffect() { // Get Rocket spawn location if ( ASVehicle_SpaceFighter(Instigator) != None ) ProjSpawnOffset = ASVehicle_SpaceFighter(Instigator).GetRocketSpawnLocation(); MyDoFireEffect(); } function MyDoFireEffect() { local Vector Start, X,Y,Z; Instigator.MakeNoise(1.0); GetAxes(Instigator.Rotation, X, Y, Z); Start = MyGetFireStart(X, Y, Z); SpawnProjectile(Start, Instigator.Rotation); } function Projectile SpawnProjectile(vector Start, rotator Dir) { local PROJ_SpaceFighter_Rocket P; local Vehicle Target; P = PROJ_SpaceFighter_Rocket(super.SpawnProjectile(Start, Dir)); if ( P != None && ASVehicle_SpaceFighter_Skaarj(Instigator) != None ) // hack for Skaarj SF damagetype P.MyDamageType = class'DamTypeSpaceFighterMissileSkaarj'; if ( P != None && ASVehicle_SpaceFighter(Instigator) != None ) { if ( Instigator.Controller.IsA('PlayerController') ) Target = ASVehicle_SpaceFighter(Instigator).CurrentTarget; else if ( Instigator.Controller.IsA('Bot') && Instigator.Controller.Enemy != None && (Bot(Instigator.Controller).Skill > FRand() * 5.f) ) { // very basic AI to target enemies... Target = Vehicle(Instigator.Controller.Enemy); } } // Check that Target is directly visible if ( Target != None && Normal(Target.Location - Instigator.Location) Dot Vector(Instigator.Rotation) > 0 && Weapon.FastTrace( Target.Location, Instigator.Location ) ) { P.HomingTarget = Target; Target.NotifyEnemyLockedOn(); } return P; } simulated function vector MyGetFireStart(vector X, vector Y, vector Z) { return Instigator.Location + X*ProjSpawnOffset.X + Y*ProjSpawnOffset.Y + Z*ProjSpawnOffset.Z; } simulated function bool AllowFire() { return true; } //============================================================================= // defaultproperties //============================================================================= defaultproperties { ProjSpawnOffset=(Z=-25.000000) bSplashDamage=Wahr bSplashJump=Wahr bRecommendSplashDamage=Wahr bModeExclusive=Falsch TweenTime=0.000000 FireSound=Sound'AssaultSounds.HumanShip.HnShipFire02' FireForce="RocketLauncherFire" FireRate=4.000000 AmmoClass=Class'UT2k4Assault.Ammo_Dummy' ShakeRotTime=2.000000 ShakeOffsetMag=(X=-20.000000) ShakeOffsetRate=(X=-1000.000000) ShakeOffsetTime=2.000000 ProjectileClass=Class'UT2k4AssaultFull.PROJ_SpaceFighter_Rocket' BotRefireRate=0.500000 WarnTargetPct=0.900000 } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |