UnrealShare
Class Jumper

source: e:\games\UnrealTournament\UnrealShare\Classes\Jumper.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Triggers
         |
         +--UnrealShare.Jumper
Direct Known Subclasses:None

class Jumper
extends Engine.Triggers

//============================================================================= // Jumper. // Creatures will jump on hitting this trigger in direction specified //=============================================================================
Variables
 float JumpZ
 class LimitedToClass
 ScriptedPawn Pending
 bool bOnceOnly


Function Summary
 void Timer()
 void Touch(Actor Other)



Source Code


00001	//=============================================================================
00002	// Jumper.
00003	// Creatures will jump on hitting this trigger in direction specified
00004	//=============================================================================
00005	class Jumper extends Triggers;
00006	
00007	var() bool bOnceOnly;
00008	var() class<scriptedPawn> LimitedToClass;
00009	var ScriptedPawn Pending;
00010	var() float JumpZ;
00011	
00012	function Timer()
00013	{
00014		Pending.SetPhysics(PHYS_Falling);
00015		Pending.Velocity = Pending.GroundSpeed * Vector(Rotation);
00016		if ( JumpZ != 0 )
00017			Pending.Velocity.Z = JumpZ;
00018		else
00019			Pending.Velocity.Z = FMax(100, Pending.JumpZ);
00020		Pending.DesiredRotation = Rotation;
00021		Pending.bJumpOffPawn = true;
00022		Pending.SetFall();
00023	}
00024	
00025	function Touch( actor Other )
00026	{
00027		if ( Other.IsA('ScriptedPawn') 
00028				&& ((LimitedToClass == None) || (Other.Class == LimitedToClass)) )
00029		{
00030			Pending = ScriptedPawn(Other);
00031			SetTimer(0.01, false);
00032			if ( bOnceOnly )
00033				Disable('Touch');
00034		}
00035	}
00036	
00037	defaultproperties
00038	{
00039	     bDirectional=True
00040	}

End Source Code