Core.Object | +--Engine.Actor | +--Engine.ParticleSystem | +--RuneI.Fire | +--RuneI.PawnFire
float
DamagePerSecond
ElapsedTime
void
PostBeginPlay()
Tick(float DeltaTime)
//TODO: Could make a single particle system that spawns particles at AttachParent joints // for more centralized control
00001 //============================================================================= 00002 // PawnFire. 00003 //============================================================================= 00004 class PawnFire expands Fire; 00005 00006 00007 var() float DamagePerSecond; 00008 var float ElapsedTime; 00009 00010 00011 function PostBeginPlay() 00012 { 00013 LifeSpan=RandRange(3, 4); 00014 } 00015 00016 //TODO: Could make a single particle system that spawns particles at AttachParent joints 00017 // for more centralized control 00018 function Tick(float DeltaTime) 00019 { 00020 ElapsedTime += DeltaTime; 00021 00022 if (AttachParent != None) 00023 { 00024 if (ElapsedTime > 1) 00025 { 00026 ElapsedTime = 0; 00027 00028 // Skinnify victim 00029 if (AttachParent.IsA('Pawn')||AttachParent.IsA('Carcass')) 00030 { 00031 if(!AttachParent.IsA('PlayerPawn') && AttachParent.DesiredFatness > 90) 00032 AttachParent.DesiredFatness -= 1; 00033 00034 // Damage victim 00035 AttachParent.JointDamaged(DamagePerSecond, Pawn(Owner), AttachParent.Location, vect(0,0,0), 'fire', AttachParentJoint); 00036 if (AttachParent.bDeleteMe) 00037 SetTimer(0, false); 00038 } 00039 00040 } 00041 00042 // Darken victim 00043 if (AttachParent.Skeletal!=None && AttachParent.NumJoints() > 4) 00044 { 00045 if(AttachParent.ScaleGlow > 0.25) 00046 AttachParent.ScaleGlow -= 0.05 * DeltaTime; 00047 } 00048 else 00049 { 00050 if(AttachParent.ScaleGlow > 0.25) 00051 AttachParent.ScaleGlow -= 0.4 * DeltaTime; 00052 } 00053 } 00054 } 00055 00056 defaultproperties 00057 { 00058 DamagePerSecond=1.000000 00059 ParticleCount=8 00060 ShapeVector=(X=8.000000,Y=8.000000) 00061 VelocityMin=(Z=50.000000) 00062 VelocityMax=(Z=120.000000) 00063 ScaleMax=1.100000 00064 LifeSpanMax=0.600000 00065 bStasis=False 00066 }