| Home Page | Recent Changes | Preferences

UT Jumper

//=============================================================================
// UT_Jumper.
// Jumper for bots - 
//=============================================================================
class UT_Jumper extends Triggers;

var() bool bOnceOnly;
var() class<Bot> LimitedToClass;
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

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


Category Custom Class

The Unreal Engine Documentation Site

Wiki Community

Topic Categories

Image Uploads

Random Page

Recent Changes

Offline Wiki

Unreal Engine

Console Commands

Terminology

FAQs

Help Desk

Mapping Topics

Mapping Lessons

UnrealEd Interface

UnrealScript Topics

UnrealScript Lessons

Making Mods

Class Tree

Modeling Topics

Chongqing Page

Log In