I love the smell of UnrealEd crashing in the morning. – tarquin

Legacy:UT Jumper

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
//=============================================================================
// UT_Jumper.
// Jumper for bots - 
//=============================================================================
class UT_Jumper extends Triggers;
 
var() bool bOnceOnly;
var() class<Bot> LimitedToClass< SEMI >
var Bot Pending;
var() float JumpZ;
 
function Timer()
{
	Pending.SetPhysics(PHYS_Falling);
	Pending.Velocity = Pending.GroundSpeed * Vector(Rotation);
	if ( JumpZ != 0 )
		Pending.Velocity.Z = JumpZ;
	else
		Pending.Velocity.Z = FMax(100, Pending.JumpZ);
	Pending.DesiredRotation = Rotation;
	Pending.bJumpOffPawn = true;
	Pending.SetFall();
}
 
function Touch( actor Other )
{
	if ( Other.IsA('Bot') 
			&& ((LimitedToClass == None) || (Other.Class == LimitedToClass)) )
	{
		Pending =Bot(Other);
		SetTimer(0.01, false);
		if ( bOnceOnly )
			Disable('Touch');
	}
}
 
defaultproperties
{
     bDirectional=True
}

Discussion[edit]

SabbathCat: I'm not entirely sure how useful this is, seeing how you can actually change the class from within Ued itself. Ah well, it does work though, with a UT_Jumper and a Kicker style PathNode setup (LiftExit > LiftCenter /UT_Jumper > LiftExit ), I've managed to get bots to pull of wall-slides, which was cool. :)!

SabbathCat: Yeah, just figured, the standard Jumper doesn't actually appear to let you choose the class you want it to make "jump". :( Good news then, this script DOES have a purpose. :)

Related Topics[edit]