Cogito, ergo sum

Legacy:ComboTrigger

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UT2003 :: Actor >> Triggers >> Trigger >> ComboTrigger (custom)

A custom trigger class that begins an adrenaline Combo on the player who touches it.

This class simply demonstrates:

  • Working with Triggers
  • How combos work (you'll get only the initial effect at your feet if you don't have enough adrenaline)

Source Code[edit]

//=============================================================================
// ComboTrigger.
//=============================================================================
class ComboTrigger extends Trigger
	placeable;
 
var Combo myCombo;
 
function Touch( actor Other )
{
	super.Touch(Other);
 
	if( IsRelevant( Other ) )
	{
		if( xPawn(Other) != None ) {
			xPawn(Other).Controller.Adrenaline = 1;
 
			xPawn(Other).DoCombo(class'ComboBerserk');
			myCombo = xPawn(Other).CurrentCombo;
			myCombo.AdrenalineCost = 0;
		}
	}
}

Related Topics[edit]