class SchlonzRaptorGun extends ONSAttackCraftGun; #exec AUDIO IMPORT FILE="Sounds\Fire.wav" NAME="Fire" GROUP="Raptor" #exec AUDIO IMPORT FILE="Sounds\Rocket.wav" NAME="Rocket" GROUP="Raptor" #exec AUDIO IMPORT FILE="Sounds\Bombs.wav" NAME="Bombs" GROUP="Raptor" #exec AUDIO IMPORT FILE="Sounds\Levi.wav" NAME="Levi" GROUP="Raptor" #exec AUDIO IMPORT FILE="Sounds\Iii.wav" NAME="Iii" GROUP="Raptor" var class BombClass; var int iFireMode; state ProjectileFireMode { function Fire(Controller C) { local ONSAttackCraftMissle M; local ONSMASRocketProjectile R; local Vehicle V, Best; local float CurAim, BestAim, BestDist; local bool bIsBot; bIsBot = false; if( Instigator.PlayerReplicationInfo != None ) if( Instigator.PlayerReplicationInfo.bBot ) bIsBot = true; switch( iFireMode ) { case 1: // normal Raptor if (Vehicle(Owner) != None && Vehicle(Owner).Team < 2) ProjectileClass = TeamProjectileClasses[Vehicle(Owner).Team]; else ProjectileClass = TeamProjectileClasses[0]; if( PlayerController( C ) != None ) PlayerController( C ).ClientPlaySound(Sound'ONSVehicleSounds-S.LaserSounds.Laser01',True,0.4,SLOT_Misc); // FireSoundClass=Sound'ONSVehicleSounds-S.LaserSounds.Laser01'; Super.Fire(C); break; case 2: // normal AltFire if( bIsBot ) M = ONSAttackCraftMissle(SpawnProjectile(AltFireProjectileClass, True)); else M = SchlonzRaptorGunMissle(SpawnProjectile(class'SchlonzUT.SchlonzRaptorGunMissle', True)); if (M != None) { if (AIController(Instigator.Controller) != None) { V = Vehicle(Instigator.Controller.Enemy); if (V != None && (V.bCanFly || V.IsA('ONSHoverCraft')) && Instigator.FastTrace(V.Location, Instigator.Location)) M.SetHomingTarget(V); } else { BestAim = MinAim; for (V = Level.Game.VehicleList; V != None; V = V.NextVehicle) { // if ((V.bCanFly || V.IsA('ONSHoverCraft')) && V != Instigator && Instigator.GetTeamNum() != V.GetTeamNum()) if ( V != Instigator && Instigator.GetTeamNum() != V.GetTeamNum()) { CurAim = Normal(V.Location - WeaponFireLocation) dot vector(WeaponFireRotation); if (CurAim > BestAim && Instigator.FastTrace(V.Location, Instigator.Location)) { Best = V; BestAim = CurAim; } } } if (Best != None) M.SetHomingTarget(Best); } } if( PlayerController( C ) != None ) PlayerController( C ).ClientPlaySound(Sound'ONSVehicleSounds-S.AVRiL.AvrilFire01',True,0.13,SLOT_Misc); break; case 3: // now a little bombing spawn(BombClass,,, Location - ((CollisionHeight + BombClass.default.CollisionHeight) * vect(0,0,2)), rotator(vect(0,0,-1))); //Self.PlayOwnedSound( Sound'WeaponSounds.ShockRifle.ShockRifleAltFire', SLOT_None,,,,,false); // Self.PlayOwnedSound( Sound'WeaponSounds.FlakCannon.FlakCannonAltFire', SLOT_None,,,,,false); if( PlayerController( C ) != None ) PlayerController( C ).ClientPlaySound(Sound'WeaponSounds.FlakCannon.FlakCannonAltFire',True,0.4,SLOT_Misc); break; case 4: // and the leviathan missile R = ONSMASRocketProjectile( SpawnProjectile( class'OnslaughtFull.ONSMASRocketProjectile', False ) ); if( R != None ) { if( AIController(C) != None ) { R.HomingTarget = C.Enemy; } else { BestAim = 0.975000; R.HomingTarget = C.PickTarget( BestAim, BestDist, vector(WeaponFireRotation), WeaponFireLocation, 30000.000000 ); } if( PlayerController( C ) != None ) PlayerController( C ).ClientPlaySound(Sound'WeaponSounds.RocketLauncher.RocketLauncherFire',True,0.5,SLOT_Misc); } break; } } function AltFire(Controller C) { local bool bIsBot; bIsBot = false; iFireMode += 1; if( iFireMode > 4 ) iFireMode = 1; if( Instigator.PlayerReplicationInfo != None ) if( Instigator.PlayerReplicationInfo.bBot ) bIsBot = true; if( bIsBot && iFireMode > 2 ) iFireMode = 1; // bots don't bomb.... switch( iFireMode ) { case 1: Instigator.ClientMessage( "Raptor FireMode: Normal Fire"); if( bIsBot ) FireInterval=0.250000; // Bots fire just a litte slower... else FireInterval=0.150000; // and Player's a little faster if( PlayerController( C ) != None ) PlayerController( C ).ClientPlaySound(Sound'SchlonzUT.Raptor.Fire',True,3.0,SLOT_Misc); // FireSoundClass=Sound'ONSVehicleSounds-S.LaserSounds.Laser01'; break; case 2: Instigator.ClientMessage( "Raptor FireMode: Rocket"); if( bIsBot ) FireInterval=3.000000; // Bots fire just a litte slower... else FireInterval=1.000000; // and Player's a little faster if( PlayerController( C ) != None ) PlayerController( C ).ClientPlaySound(Sound'SchlonzUT.Raptor.Rocket',True,3.0,SLOT_Misc); // FireSoundClass=Sound'ONSVehicleSounds-S.AVRiL.AvrilFire01'; break; case 3: Instigator.ClientMessage( "Raptor FireMode: Bombing"); FireInterval=0.500000; if( PlayerController( C ) != None ) PlayerController( C ).ClientPlaySound(Sound'SchlonzUT.Raptor.Bombs',True,3.0,SLOT_Misc); // FireSoundClass=SoundGroup'WeaponSounds.FlakCannon.FlakCannonAltFire'; break; case 4: Instigator.ClientMessage( "Raptor FireMode: Leviathan"); FireInterval=0.500000; if( PlayerController( C ) != None ) PlayerController( C ).ClientPlaySound(Sound'SchlonzUT.Raptor.Levi',True,3.0,SLOT_Misc); // FireSoundClass=SoundGroup'WeaponSounds.RocketLauncher.RocketLauncherFire'; break; } } } defaultproperties { AltFireInterval=0.500000; iFireMode = 1; BombClass=class'SchlonzUT.SchlonzRaptorBomb'; bFullVolume=true; SoundOcclusion=OCCLUSION_NONE; AltFireSoundVolume=255; FireSoundClass=NONE; }