class nalisphere extends projectile; #exec OBJ LOAD FILE=Textures\Nalieffect.utx PACKAGE=FsPack.Nalieffect #exec AUDIO IMPORT FILE="SOUNDS\naliprophet\light3.WAV" NAME="light3" GROUP="NaliProphet" #exec mesh IMPORT MESH=orb ANIVFILE=MODELS\naliprophet\orb_a.3d DATAFILE=MODELS\naliprophet\orb_d.3d X=0 Y=0 Z=0 #exec MESH ORIGIN MESH=orb X=0 Y=0 Z=0 YAW=64 #exec MESH SEQUENCE MESH=orb SEQ=All STARTFRAME=0 NUMFRAMES=1 #exec MESH SEQUENCE MESH=orb SEQ=Still STARTFRAME=0 NUMFRAMES=1 var Nsphere n; 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'Nsphere',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 ) spawn(class'NExplo',,,HitLocation); 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; 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 ) spawn(class'NExplo',,,HitLocation + HitNormal*16); if( Role == ROLE_Authority && Instigator!=None && Instigator.Class==Class'NaliProphet' ) { for (i=0; i<8; i++) { start = HitLocation + 5 * HitNormal + 4 * VRand(); SpawnDir= Rotator(Start - HitLocation); Spawn(class'GProj',,,Start,Rotator(Start - HitLocation)); } } BlowUp(HitLocation); Destroy(); } simulated function Landed( vector HitNormal ) { HitWall( HitNormal, none ); } function BlowUp(vector HitLocation) { HurtRadius(Damage,280.0, 'zapped', MomentumTransfer, HitLocation ); MakeNoise(1.0); } function BeginState() { if ( Role == ROLE_Authority ) Velocity = Vector(Rotation) * Speed; } } defaultproperties { bProjTarget=true CollisionRadius=32.000000 CollisionHeight=32.000000 speed=800.000000 MaxSpeed=1000.000000 Damage=25 //40.000000 RemoteRole=ROLE_SimulatedProxy LifeSpan=9.000000 bBounce=false DrawScale=0.75 DrawType=DT_Mesh Mesh=LodMesh'ORB' Texture=FireTexture'pearl_2' //PURPLE Skin=FireTexture'pearl_2' Style=STY_Normal MomentumTransfer=90000 AmbientSound=sound'fspack.naliprophet.light3' SoundVolume=255.000000 LightType=LT_Steady LightEffect=LE_None LightBrightness=64 LightHue=200 LightSaturation=0 LightRadius=64 Lightcone=200 Lightperiod=32 VolumeBrightness=64 ImpactSound=sound'UnrealI.Cannon.CannonExplode' SpawnSound=sound'UnrealShare.General.FatRingSound' bUnlit=true }