Always snap to grid

UE2:ONSVehicleFactory (UT2004)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UT2004 Object >> Actor >> SVehicleFactory >> ONSVehicleFactory
Package: 
Onslaught
Direct subclasses:
ONSArtilleryFactory, ONSAttackCraftFactory, ONSBomberFactory, ONSDualAttackCraftFactory, ONSHoverCraftFactory, ONSMASFactory, ONSPRVFactory, ONSRVFactory, ONSShockTankFactory, ONSTankFactory
Known custom subclasses:
Crusha/UltimateMappingTools/UltimateONSFactory, Crusha/UltimateMappingTools

The base class of all vehicle factories for the Onslaught game mode. It is automatically associated to the closest power node or power core, which makes sure the vehicles spawned at this factory match the node/core's team. Spawning vehicles are initially team-locked. Team-locked vehicles will be destroyed if the associated power node is destroyed.

Onslaught vehicle factories only have basic support for other game modes. They statically associate themselves with the nearest GameObjective and spawn vehicles for that objective's initial defending team, even if the actual defending team differs from that. This isn't a problem in VCTF, but will cause problems in Assault. The Onslaught vehicle factories also do not check for round restarts (in Onslaught this is handled by the power nodes and cores), so they may not respawn vehicles correctly at the start of a new round. For Assault maps use ASVehicleFactory instead and for Jailbreak the special JBVehicleFactory subclasses.

Properties

Property group 'ONSVehicleFactory'

bReverseBlueTeamDirection

Type: bool

Set this to True to let vehicles spawned for the blue team face the opposite direction.

RespawnTime

Type: float

How long it takes before a destroyed vehicle is respawned.

Default value: 15.0

Internal variables

bActive

Type: bool

Whether the factory is currently active and will respawn destroyed vehicles.

BlueBuildEffectClass

Type: class<Emitter>

The spawn effect for blue team vehicles.

Default value: Class'Onslaught.ONSVehicleBuildEffect'

bNeverActivate

Type: bool

(not used)

bPreSpawn

Type: bool

Set when the factory doesn't have any vehicle and hasn't created the spawn effect yet.

BuildEffect

Type: Emitter

The currently playing spawn effect.

LastSpawned

Type: Vehicle

The last vehicle spawned at this factory.

PreSpawnEffectTime

Type: float

How long to wait between playing the spawn effect and actually spawning the vehicle.

Default value: 2.0

RedBuildEffectClass

Type: class<Emitter>

The spawn effect for red team vehicles.

Default value: Class'Onslaught.ONSVehicleBuildEffect'

TeamNum

Type: int

The factory's current team number.

Default values

Property Value
DrawType DT_Mesh

Functions

Events

PostBeginPlay

simulated event PostBeginPlay ()

Overrides: Actor.PostBeginPlay

Performs precaching of the vehicle resources.

PostNetBeginPlay

event PostNetBeginPlay ()

Overrides: Actor.PostNetBeginPlay

Associates the factory with the nearest GameObjective in non-Onslaught game modes and activates it for that objective's initial defending team.

Timer

event Timer ()

Overrides: Actor.Timer

Creates the spawn effect or actually spawns the vehicle.

Trigger

event Trigger (Actor Other, Pawn EventInstigator)

Overrides: SVehicleFactory.Trigger

(ignored)

VehicleDestroyed

event VehicleDestroyed (Vehicle V)

Overrides: SVehicleFactory.VehicleDestroyed

Prepares for spawning a new vehicle.

Other instance functions

Activate

function Activate (byte T)

Activates the factory for the specified team and starts spawning vehicles for that team.

Deactivate

function Deactivate ()

Stops spawning vehicles.

SpawnBuildEffect

function SpawnBuildEffect ()

Creates the spawn effect.

SpawnVehicle

function SpawnVehicle ()

Spawns a vehicle. If the spawn area is blocked by any players, they will receive a corresponding notification and spawning is delayed.

UpdatePrecacheMaterials

simulated function UpdatePrecacheMaterials ()

Overrides: Actor.UpdatePrecacheMaterials

Precaches the spawn effect and vehicle resources.

ValidateSpawnLocation

function bool ValidateSpawnLocation (float Radius)

Returns true unless any Pawns are found within the specified radius around the factory.