Core.Object | +--Engine.Actor | +--Engine.Effects | +--RuneI.LokiHealthTrail
WeaponSwipe
Swipe
class
SwipeClass
float
amplitude
time
void
PreBeginPlay()
simulated
Tick(float DeltaTime)
00001 //============================================================================= 00002 // LokiHealthTrail. 00003 //============================================================================= 00004 class LokiHealthTrail expands Effects; 00005 00006 var() class<WeaponSwipe> SwipeClass; 00007 var WeaponSwipe Swipe; 00008 var float time; 00009 var float amplitude; 00010 00011 function PreBeginPlay() 00012 { 00013 local actor Spark; 00014 local actor Part; 00015 00016 Super.PreBeginPlay(); 00017 00018 time = 0; 00019 00020 Swipe = Spawn(SwipeClass, self,, Location,); 00021 Swipe.BaseJointIndex = 0; 00022 Swipe.OffsetJointIndex = 1; 00023 Swipe.SystemLifeSpan = -1; 00024 Swipe.SwipeSpeed = 2; 00025 00026 AttachActorToJoint(Swipe, 1); 00027 00028 Part = Spawn(class'LokiHealthSystem', self); 00029 AttachActorToJoint(Part, 0); 00030 00031 SetPhysics(PHYS_None); 00032 Enable('Tick'); 00033 } 00034 00035 simulated function Tick(float DeltaTime) 00036 { 00037 local vector loc; 00038 local float xRate, yRate; 00039 00040 time += DeltaTime; 00041 00042 xRate = cos(time * Velocity.X) * amplitude; 00043 yRate = sin(time * Velocity.X) * amplitude; 00044 00045 loc.X = Owner.Location.X + xRate; 00046 loc.Y = Owner.Location.Y + yRate; 00047 loc.Z = Location.Z + DeltaTime * Velocity.Z; 00048 00049 SetLocation(loc); 00050 } 00051 00052 defaultproperties 00053 { 00054 SwipeClass=Class'RuneI.WeaponSwipeGreen' 00055 DrawType=DT_SkeletalMesh 00056 Skeletal=SkelModel'weapons.InvisibleShort' 00057 }