class naliorb extends projectile; #exec OBJ LOAD FILE=Textures\Nalieffect.utx PACKAGE=FsPack.Nalieffect #exec AUDIO IMPORT FILE="SOUNDS\naliprophet\light3.WAV" NAME="light3" GROUP="NaliProphet" var Norb n; var SpriteBallchild sbc; var BlackSmoke bsm; var bool bexploded; simulated function Destroyed() { if (n!=none) n.destroy(); super.Destroyed(); } simulated function PostBeginPlay() { Super.PostbeginPlay(); bexploded=false; if ( Level.NetMode != NM_DedicatedServer ) { n=spawn(class'norb',self); if(n!=none) n.setowner(self); DesiredRotation = RotRand(); RotationRate.Yaw = 2000000*FRand() - 1000000; RotationRate.Pitch = 2000000*FRand() - 1000000; RotationRate.Roll = 2000000*FRand() - 1000000; bFixedRotationDir=True; PlaySound( SpawnSound, SLOT_Misc,5.0 ); PlaySound( SpawnSound, SLOT_Interact,5.0 ); PlaySound( SpawnSound, SLOT_None,5.0 ); } } auto state Flying { simulated function ProcessTouch( Actor Other, Vector HitLocation ) { local vector momentum; if(bexploded) return; if ((naliorb(Other) == none) && (nalisphere(Other) == none) && (Gproj(Other) == none) && (Other != Instigator) && (naliprophet(Other)==none) ) { momentum = MomentumTransfer * Normal(Velocity); if ( Role == ROLE_Authority ) Other.TakeDamage(Damage, instigator, Location, momentum, 'zapped'); PlaySound( ImpactSound, SLOT_Misc,5.0,,,0.7); PlaySound( ImpactSound, SLOT_Interact,5.0,,,0.7); PlaySound( ImpactSound, SLOT_None,5.0,,,0.7); if ( Level.NetMode != NM_DedicatedServer ) { sbc=spawn(class'SpriteBallchild',,,HitLocation); if (sbc != none) { sbc.drawscale=10*FRand()+5; sbc.NetPriority=5.0; } if ( Level.bHighDetailMode ) { bsm = spawn(class'BlackSmoke',,,HitLocation); bsm.DrawScale = 30; } } Destroy(); } } simulated function TakeDamage( int NDamage, Pawn instigatedBy, Vector hitlocation, vector momentum, name damageType ) { if(bexploded) return; if ( NDamage > 10 ) Explode(HitLocation,Normal(HitLocation-Location)); } simulated singular function Explode(vector HitLocation, vector HitNormal) { local vector start; local rotator SpawnDir; local int i; local miniorb m; bexploded=true; PlaySound( ImpactSound, SLOT_Misc,5.0,,,0.7); PlaySound( ImpactSound, SLOT_Interact,5.0,,,0.7); PlaySound( ImpactSound, SLOT_None,5.0,,,0.7); if ( Level.NetMode != NM_DedicatedServer ) { sbc=spawn(class'SpriteBallchild',,,HitLocation + HitNormal*16); if (sbc != none) { sbc.drawscale=10*FRand()+5; sbc.NetPriority=5.0; } if ( Level.bHighDetailMode ) { bsm = spawn(class'BlackSmoke',,,HitLocation + HitNormal*16); bsm.DrawScale = 30; } } BlowUp(HitLocation); if(Role == ROLE_Authority) { for (i=0; i<8; i++) { start = HitLocation + 5 * HitNormal + 4 * VRand(); SpawnDir= Rotator(Start - HitLocation); m=Spawn(class'miniorb',,,Start,Rotator(Start - HitLocation)); if (m!=none && instigator !=none) m.instigator=instigator; } } Destroy(); } function BlowUp(vector HitLocation) { HurtRadius(Damage,350.0, 'zapped', MomentumTransfer, HitLocation ); MakeNoise(1.0); } simulated function Landed( vector HitNormal ) { HitWall( HitNormal, none ); } simulated function HitWall( vector HitNormal, actor Wall ) { SetPhysics(PHYS_None); super.HitWall( HitNormal, Wall ); } function BeginState() { if ( ScriptedPawn(Instigator) != None ) Speed = ScriptedPawn(Instigator).ProjectileSpeed; Velocity = Vector(Rotation) * Speed; Velocity.z += 220; } } defaultproperties { bProjTarget=true CollisionRadius=32.000000 CollisionHeight=32.000000 speed=1100.000000 MaxSpeed=1200.000000 Damage=40.000000 //70 RemoteRole=ROLE_SimulatedProxy LifeSpan=999.000000 bBounce=false DrawScale=0.75 DrawType=DT_Mesh Mesh=LodMesh'ORB' Texture=FireTexture'pearl' Skin=FireTexture'pearl' Style=STY_Normal MomentumTransfer=90000 AmbientSound=sound'fspack.naliprophet.light3' SoundVolume=255.000000 LightType=LT_Steady LightEffect=LE_None LightBrightness=64 LightHue=23 LightSaturation=0 LightRadius=64 Lightcone=128 Lightperiod=32 VolumeBrightness=64 ImpactSound=sound'UnrealI.Cannon.CannonExplode' SpawnSound=sound'UnrealShare.General.FatRingSound' Physics=PHYS_Falling bUnlit=true }