Legacy:ForceScoreReset

From Unreal Wiki, The Unreal Engine Documentation Site
Revision as of 16:11, 5 April 2006 by Blip2 (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Just a nice bit of code if you ever want to reset the Team Scores of an Assault game

//=============================================================================
// ASForceScoreReset.
//=============================================================================
class ASForceScoreReset extends Triggers
	placeable;

function Trigger( actor Other, pawn EventInstigator )
{
	ASGameInfo(Level.Game).Teams[0].Score = 0;
	ASGameInfo(Level.Game).Teams[1].Score = 0;
}

All you have to do is trigger this when to round begins (a scripted trigger with a trigger event as its first value will do) or just set the objects tag to BeginRound (not tested)