How to do that? till now i have the timer etc set, but i just don't know how to make it explode as the target reaches 255 fatness. Till now i got this:
Code: Select all
var bool bLighting;
var float DelayTime;
Var pawn p;
Function PostBeginPlay()
{
Super.postbeginplay();
SetTimer(1.0,True);
}
/////////////////////////////////////////////////////
auto state Flying
{
simulated function ProcessTouch( Actor Other, Vector HitLocation )
{
local int hitdamage;
local vector hitDir;
if (Other != instigator && StingerProjectile(Other) == none)
{
if ( Role == ROLE_Authority )
{
hitDir = Normal(Velocity);
if ( FRand() < 0.2 )
hitDir *= 5;
Other.TakeDamage(damage, instigator,HitLocation,
(MomentumTransfer * hitDir), 'shot');
}
Destroy();
}
}
simulated function HitWall( vector HitNormal, actor Wall )
{
Super.HitWall(HitNormal, Wall);
if (FRand()> RandRot;
if( Region.zone.bWaterZone )
Velocity=0.7*Velocity;
}
}
///////////////////////////////////////////////////////
simulated function Explode(vector HitLocation, vector HitNormal)
{
}
simulated function AnimEnd()
{
Destroy();
}
//