I am not that expert in.. this.. But I think a call to state sleep will work. And then it awakes or goes back. For example:- DTR-Respawn-TNT-Crate
TNTCrateRespawn wrote:class TNTCrateRespawn extends CrateExplosiveSmall;
var() float ReSpawnTime;
var vector RespawnLocation;
state Exploding {
// ----------------------------------------------------------------------
// Exploding state
// ----------------------------------------------------------------------
ignores Explode;
function Timer() {
local Pawn apawn;
local float damageRadius;
local Vector dist;
if ( Level.NetMode != NM_Standalone ) {
damageRadius = (explosionRadius / gradualHurtSteps) * gradualHurtCounter;
for ( apawn = Level.PawnList; apawn != None; apawn = apawn.nextPawn ) {
if ( apawn.IsA('DeusExPlayer') ) {
dist = apawn.Location - Location;
if ( VSize(dist) <damageRadius>= gradualHurtSteps)
GotoState('Sleeping');
}
Begin:
// stagger the HurtRadius outward using Timer()
// do five separate blast rings increasing in size
gradualHurtCounter = 1;
gradualHurtSteps = 5;
bHidden = True;
SetCollision(False, False, False);
SetTimer(0.5/float(gradualHurtSteps), True);
}
//=============================================================================
// Sleeping state: Sitting hidden waiting to respawn.
State Sleeping
{
ignores Touch;
function BeginState() {
bHidden = true;
}
Begin:
Sleep( ReSpawnTime );
//PlaySound(RespawnSound);
// Used to be the commented out line but all PlaySpawnEffect does is return
// 0.3. Dunno!
//Sleep( Level.Game.PlaySpawnEffect(self) );
Sleep( 0.3 );
bHidden = false;
HitPoints=20;
bStasis=True;
SetCollision(True, True, True);
SetLocation(RespawnLocation);
GoToState('Active');
}
function PostBeginPlay()
{
Super.PostBeginPlay();
RespawnLocation = Location;
}
As you can see, it goes to state sleeping at function explode, rather than destroying. And it set's a sleep timer which works with RespawnTime.
I am not that sure how will you manage to do it.. but adding "goto state" sleeping after each expression might do the trick. Good luck.