Core.Object | +--Engine.Actor | +--Engine.ParticleSystem | +--RuneI.MushroomPuff
int
LifeCount
void
HitWall(vector HitNormal, Actor Wall)
PreBeginPlay()
RemoveCloud()
Timer()
00001 //============================================================================= 00002 // MushroomPuff. 00003 //============================================================================= 00004 class MushroomPuff expands ParticleSystem; 00005 00006 var int LifeCount; 00007 00008 function PreBeginPlay() 00009 { 00010 LifeCount = 4; 00011 SetTimer(0.33, true); 00012 } 00013 00014 function Timer() 00015 { 00016 local actor Victim; 00017 00018 foreach VisibleActors(class 'Actor', Victim, 50, Location) 00019 { 00020 if(Victim != self) 00021 { 00022 Victim.JointDamaged(2, Pawn(Owner), Location, vect(0, 0, 0), 'magic', 0); 00023 } 00024 } 00025 00026 // Remove the zombie breath cloud after a specified amount of time 00027 LifeCount--; 00028 if(LifeCount <= 0) 00029 RemoveCloud(); 00030 } 00031 00032 function HitWall(vector HitNormal, actor Wall) 00033 { 00034 RemoveCloud(); 00035 } 00036 00037 function RemoveCloud() 00038 { 00039 SetTimer(0, false); 00040 Velocity = vect(0, 0, 0); 00041 SetPhysics(PHYS_None); 00042 bOneShot = true; 00043 bSystemOneShot = true; 00044 } 00045 00046 defaultproperties 00047 { 00048 ParticleCount=20 00049 ParticleTexture(0)=Texture'RuneFX.ZombieBreath' 00050 ShapeVector=(X=4.000000,Y=4.000000,Z=4.000000) 00051 ScaleMin=0.600000 00052 ScaleMax=0.800000 00053 ScaleDeltaX=0.200000 00054 ScaleDeltaY=0.200000 00055 LifeSpanMin=0.300000 00056 LifeSpanMax=0.800000 00057 AlphaStart=60 00058 bAlphaFade=True 00059 bApplyGravity=True 00060 GravityScale=0.015000 00061 Style=STY_AlphaBlend 00062 ScaleGlow=2.000000 00063 CollisionRadius=10.000000 00064 CollisionHeight=10.000000 00065 bCollideWorld=True 00066 }