I search for solutions in this order: Past Code, Unreal Source, Wiki, BUF, groups.yahoo, google, screaming at monitor. – RegularX

UE2:SpecialVehicleObjective (UT2004)

From Unreal Wiki, The Unreal Engine Documentation Site
Revision as of 02:13, 2 June 2009 by Wormbo (Talk | contribs) (added descriptions and usage info)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
UT2004 Object >> Actor >> NavigationPoint >> PathNode >> RoadPathNode >> SpecialVehicleObjective
Package: 
UnrealGame

SpecialVehicleObjectives are used to mark the end of special paths that a vehicle is required to reach, but have something a vehicle cannot get (like a pickup). Bots will only consider following one of these paths if it is enabled and the bot is controlling a vehicle of one the allowed classes. When they reach this point, they will exit the vehicle and continue to the associated actor on foot.

To get an idea of possible uses, have a look at ONS-Torlan: There's a SpecialVehicleObjective on the tower because the Redeemer (and Super Shield Pack) up there can only be reached using a Raptor.

Usage

Due to the way (un)triggering and resetting affects SpecialVehicleObjectives, there doesn't seem to be any use for them other than telling bots how to reach pickups.

If you have a super pickup that can't (or shouldn't) be reached on foot, e.g. because it's up high, place a SpecialVehicleObjective near the pickup. Match the pickup's Tag and the SpecialVehicleObjective's AssociatedActorTag to specify the destination object. Also match the pickup's Event and the SpecialVehicleObjective's Tag to properly enable the SpecialVehicleObjective when the pickup is available.

Properties

Property group 'SpecialVehicleObjective'

AccessibleVehicleClasses

Type: array<class<Vehicle> >

Classes of vehicles that are capable of reaching this point.

AssociatedActorTag

Type: name

Tag of the actor this special vehicle objective belongs to.

MaxDist

Type: float

If greater than 0, bots will never go here unless they are already this close

Internal variables

AssociatedActor

Type: Actor

The actor this special vehicle objective belongs to. (Set in PostBeginPlay.)

bEnabled

Type: bool

Whether this SpecialVehicleObjective is currently reachable. Disabled on Trigger and Reset, enabled on Untrigger if there's an AssociatedActor.

NextSpecialVehicleObjective

Type: SpecialVehicleObjective

The next item in the linked list of SpecialVehicleObjective, which starts with UnrealMPGameInfo.SpecialVehicleObjectives.

TeamOwner

Type: Pawn

Array size: 4

AI pawns currently headed to this point

Default values

Property Value
bNotBased True

Functions

Events

PostBeginPlay

event PostBeginPlay ()

Overrides: NavigationPoint.PostBeginPlay

Initializes the AssociatedActor and SpecialVehicleObjectives/NextSpecialVehicleObjective linked list.

Trigger

event Trigger (Actor Other, Pawn EventInstigator)

Overrides: Actor.Trigger

Disables this SpecialVehicleObjective.

Untrigger

event Untrigger (Actor Other, Pawn EventInstigator)

Overrides: Actor.UnTrigger

Enables this SpecialVehicleObjective, but only if its AssociatedActor is set.

Other instance functions

IsAccessibleTo

function bool IsAccessibleTo (Pawn BotPawn)

Returns whether this SpecialVehicleObjective is accessible to the specified Pawn. Takes bEnabled, MaxDist and AccessibleVehicleClasses into account.

Reset

function Reset ()

Overrides: Actor.Reset

Disables this SpecialVehicleObjective.