Core.Object | +--Engine.Actor | +--Engine.Projectile | +--UnrealShare.BioGel | +--UnrealShare.BarrelSludge
void
Timer()
BeginState()
HitWall(vector HitNormal, Actor Wall)
Touch(Actor Other)
TakeDamage(int NDamage, Pawn instigatedBy, Vector hitlocation, vector momentum, name damageType)
00001 //============================================================================= 00002 // BarrelSludge. 00003 //============================================================================= 00004 class BarrelSludge extends BioGel; 00005 00006 function Timer() 00007 { 00008 local GreenGelPuff f; 00009 local int j; 00010 00011 if ( (Mover(Base) != None) && Mover(Base).bDamageTriggered ) 00012 Base.TakeDamage( Damage, instigator, Location, MomentumTransfer * Normal(Velocity), ''); 00013 00014 HurtRadius(damage * Drawscale, 60, 'burned', MomentumTransfer * Drawscale, Location); 00015 f = spawn(class'GreenGelPuff',,,Location + SurfaceNormal*8); 00016 f.DrawScale = DrawScale*2.0; 00017 PlaySound (MiscSound,,3.0*DrawScale); 00018 f.numBlobs = numBio; 00019 if ( numBio > 0 ) 00020 f.SurfaceNormal = SurfaceNormal; 00021 Destroy(); 00022 } 00023 00024 00025 auto state Flying 00026 { 00027 singular function TakeDamage( int NDamage, Pawn instigatedBy, Vector hitlocation, 00028 vector momentum, name damageType ) 00029 { 00030 if ( damageType != 'burned' ) GoToState('Exploding'); 00031 } 00032 00033 00034 function Touch( actor Other ) 00035 { 00036 if( Other != Owner && BarrelSludge(Other)==None ) 00037 GoToState( 'Exploding' ); 00038 } 00039 00040 function HitWall (vector HitNormal, actor Wall) 00041 { 00042 local rotator RandRot; 00043 00044 RandRot = rotator(HitNormal); 00045 RandRot.Roll += 32768; 00046 SetRotation(RandRot); 00047 Super.HitWall(HitNormal, Wall); 00048 } 00049 00050 function BeginState() 00051 { 00052 DrawScale = FRand()*0.4+0.3; 00053 Velocity = VRand() * (50.0*FRand()+80); 00054 Velocity.z += 250; 00055 RandSpin(100000); 00056 LoopAnim('Flying',0.4); 00057 } 00058 } 00059 00060 defaultproperties 00061 { 00062 speed=200.000000 00063 MaxSpeed=1000.000000 00064 Damage=20.000000 00065 MomentumTransfer=15000 00066 RemoteRole=ROLE_DumbProxy 00067 LifeSpan=140.000000 00068 DrawScale=2.000000 00069 CollisionHeight=3.000000 00070 Buoyancy=0.000000 00071 }