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 00098 00099 00100 00101 00102 00103 00104 00105 00106 00107 00108 00109 00110 00111 00112 00113 00114 |
//============================================================================= // projectileLaserBeam.uc // $Author: Aleiby $ // $Date: 12/12/02 5:57p $ // $Revision: 7 $ //============================================================================= class projectileLaserBeam extends U2Projectile; #exec OBJ LOAD File=..\System\ParticleRes\LaserRifleFX_new.u var ParticleSalamander Sal; var ParticleSalamander TwistA,TwistB; var PulseLineGenerator Tracer; simulated event PostBeginPlay() { Super.PostBeginPlay(); if( bDeleteMe ) return; if( Level.NetMode!=NM_DedicatedServer ) { Sal = ParticleSalamander( class'ParticleGenerator'.static.CreateNew( Self, ParticleSalamander'LaserRifleFX_new.ParticleSalamander66', Location ) ); Sal.SetBase( Self ); TwistA = ParticleSalamander( class'ParticleGenerator'.static.CreateNew( Self, ParticleSalamander'LaserRifleFX_new.ParticleSalamander1', Location ) ); TwistA.SetBase( Self ); TwistB = ParticleSalamander( class'ParticleGenerator'.static.CreateNew( Self, ParticleSalamander'LaserRifleFX_new.ParticleSalamander1', Location ) ); TwistB.SetBase( Self ); Tracer = PulseLineGenerator( class'ParticleGenerator'.static.CreateNew( Self, PulseLineGenerator'LaserRifleFX_new.PulseLineGenerator0', Location ) ); Tracer.SetBase( Self ); } SetTimer(0.12,false); } event Timer() { Velocity = Vector(Rotation) * 6000; LifeSpan = VSize(Tracer.Connections[0].End - Location) / 6000; // so we don't overshoot -- it looks very bad. } simulated function SetEndpoint( vector Loc ) { if( bDeleteMe ) return; if (!Tracer) return; if (Tracer.Connections.length!=1) Tracer.Connections.length = 1; Tracer.Connections[0].StartActor = Tracer; Tracer.Connections[0].End = Loc; SetRotation( rotator(Loc-Location) ); Sal.SetRotation( rotator(-vector(Rotation)) ); //backwards TwistA.SetRotation( Sal.Rotation ); TwistB.SetRotation( Sal.Rotation + rot(0,0,32768) ); } simulated event Destroyed() { Super.Destroyed(); if( Sal!=None ) { Sal.ParticleDestroy(); Sal.SetPhysics(PHYS_None); Sal.LightType = LT_None; Sal = None; } if( TwistA!=None ) { TwistA.Destroy(); TwistA = None; } if( TwistB!=None ) { TwistB.Destroy(); TwistB = None; } if( Tracer!=None ) { Tracer.Destroy(); Tracer = None; } } simulated function ExplodeEx( CheckResult Hit ) { //don't do anything fancy. Destroy(); } defaultproperties { MaxSpeed=6000.000000 DrawType=DT_None LifeSpan=3.000000 AmbientRotationRate=(Roll=600000) UseReticleOnEvents(0)="UseReticleText" UseReticleOnEvents(1)="UseReticleCorners" UseReticleOnEvents(2)="UseReticleTopBars" ProximityReticleOnEvents(0)="ProximityReticleCorners" ProximityReticleOnEvents(1)="ProximityReticleTopBars" } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |