Gah - a solution with more questions. – EntropicLqd

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[edit]

Property group 'ONSVehicleFactory'[edit]

bReverseBlueTeamDirection[edit]

Type: bool

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

RespawnTime[edit]

Type: float

How long it takes before a destroyed vehicle is respawned.

Default value: 15.0

Internal variables[edit]

bActive[edit]

Type: bool

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

BlueBuildEffectClass[edit]

Type: class<Emitter>

The spawn effect for blue team vehicles.

Default value: Class'Onslaught.ONSVehicleBuildEffect'

bNeverActivate[edit]

Type: bool

(not used)

bPreSpawn[edit]

Type: bool

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

BuildEffect[edit]

Type: Emitter

The currently playing spawn effect.

LastSpawned[edit]

Type: Vehicle

The last vehicle spawned at this factory.

PreSpawnEffectTime[edit]

Type: float

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

Default value: 2.0

RedBuildEffectClass[edit]

Type: class<Emitter>

The spawn effect for red team vehicles.

Default value: Class'Onslaught.ONSVehicleBuildEffect'

TeamNum[edit]

Type: int

The factory's current team number.

Default values[edit]

Property Value
DrawType DT_Mesh

Functions[edit]

Events[edit]

PostBeginPlay[edit]

simulated event PostBeginPlay ()

Overrides: Actor.PostBeginPlay

Performs precaching of the vehicle resources.

PostNetBeginPlay[edit]

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[edit]

event Timer ()

Overrides: Actor.Timer

Creates the spawn effect or actually spawns the vehicle.

Trigger[edit]

event Trigger (Actor Other, Pawn EventInstigator)

Overrides: SVehicleFactory.Trigger

(ignored)

VehicleDestroyed[edit]

event VehicleDestroyed (Vehicle V)

Overrides: SVehicleFactory.VehicleDestroyed

Prepares for spawning a new vehicle.

Other instance functions[edit]

Activate[edit]

function Activate (byte T)

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

Deactivate[edit]

function Deactivate ()

Stops spawning vehicles.

SpawnBuildEffect[edit]

function SpawnBuildEffect ()

Creates the spawn effect.

SpawnVehicle[edit]

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[edit]

simulated function UpdatePrecacheMaterials ()

Overrides: Actor.UpdatePrecacheMaterials

Precaches the spawn effect and vehicle resources.

ValidateSpawnLocation[edit]

function bool ValidateSpawnLocation (float Radius)

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