My program doesn't have bugs. It just develops random features.

Difference between revisions of "UE2:ONSVehicleFactory (UT2004)"

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
(Auto-generated page)
 
m (added descriptions)
 
Line 6: Line 6:
 
| abstract = yes
 
| abstract = yes
 
}}
 
}}
{{autogenerated}}
+
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.
<!-- enter class description -->
+
 
 +
Onslaught vehicle factories only have basic support for other game modes. They statically associate themselves with the nearest {{cl|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 {{cl|ASVehicleFactory}} instead and for [[Jailbreak]] the special [[jdn:JBVehicleFactory|JBVehicleFactory]] subclasses.
  
 
==Properties==
 
==Properties==
Line 14: Line 15:
 
'''Type:''' [[bool]]
 
'''Type:''' [[bool]]
  
<!-- enter variable description -->
+
Set this to <code>True</code> to let vehicles spawned for the blue team face the opposite direction.
  
 
====RespawnTime====
 
====RespawnTime====
 
'''Type:''' [[float]]
 
'''Type:''' [[float]]
  
<!-- enter variable description -->
+
How long it takes before a destroyed vehicle is respawned.
  
 
'''Default value:''' 15.0
 
'''Default value:''' 15.0
Line 27: Line 28:
 
'''Type:''' [[bool]]
 
'''Type:''' [[bool]]
  
<!-- enter variable description -->
+
Whether the factory is currently active and will respawn destroyed vehicles.
  
 
====BlueBuildEffectClass====
 
====BlueBuildEffectClass====
 
'''Type:''' [[class]]<{{cl|Emitter}}>
 
'''Type:''' [[class]]<{{cl|Emitter}}>
  
<!-- enter variable description -->
+
The spawn effect for blue team vehicles.
  
 
'''Default value:''' [[Types#Class|Class]]'{{cl|ONSVehicleBuildEffect|Onslaught}}'
 
'''Default value:''' [[Types#Class|Class]]'{{cl|ONSVehicleBuildEffect|Onslaught}}'
Line 39: Line 40:
 
'''Type:''' [[bool]]
 
'''Type:''' [[bool]]
  
<!-- enter variable description -->
+
''(not used)''
  
 
====bPreSpawn====
 
====bPreSpawn====
 
'''Type:''' [[bool]]
 
'''Type:''' [[bool]]
  
Neither the vehicle or build effect have been spawned yet
+
Set when the factory doesn't have any vehicle and hasn't created the spawn effect yet.
  
 
====BuildEffect====
 
====BuildEffect====
 
'''Type:''' {{cl|Emitter}}
 
'''Type:''' {{cl|Emitter}}
  
<!-- enter variable description -->
+
The currently playing spawn effect.
  
 
====LastSpawned====
 
====LastSpawned====
 
'''Type:''' {{cl|Vehicle}}
 
'''Type:''' {{cl|Vehicle}}
  
<!-- enter variable description -->
+
The last vehicle spawned at this factory.
  
 
====PreSpawnEffectTime====
 
====PreSpawnEffectTime====
 
'''Type:''' [[float]]
 
'''Type:''' [[float]]
  
<!-- enter variable description -->
+
How long to wait between playing the spawn effect and actually spawning the vehicle.
  
 
'''Default value:''' 2.0
 
'''Default value:''' 2.0
Line 66: Line 67:
 
'''Type:''' [[class]]<{{cl|Emitter}}>
 
'''Type:''' [[class]]<{{cl|Emitter}}>
  
<!-- enter variable description -->
+
The spawn effect for red team vehicles.
  
 
'''Default value:''' [[Types#Class|Class]]'{{cl|ONSVehicleBuildEffect|Onslaught}}'
 
'''Default value:''' [[Types#Class|Class]]'{{cl|ONSVehicleBuildEffect|Onslaught}}'
Line 73: Line 74:
 
'''Type:''' [[int]]
 
'''Type:''' [[int]]
  
<!-- enter variable description -->
+
The factory's current team number.
  
 
===Default values===
 
===Default values===
Line 91: Line 92:
 
'''Overrides:''' {{tl|PostBeginPlay|Actor|events}}
 
'''Overrides:''' {{tl|PostBeginPlay|Actor|events}}
  
<!-- enter event description -->
+
Performs [[precaching]] of the vehicle resources.
  
 
====PostNetBeginPlay====
 
====PostNetBeginPlay====
Line 98: Line 99:
 
'''Overrides:''' {{tl|PostNetBeginPlay|Actor|events}}
 
'''Overrides:''' {{tl|PostNetBeginPlay|Actor|events}}
  
<!-- enter function description -->
+
Associates the factory with the nearest {{cl|GameObjective}} in non-Onslaught game modes and activates it for that objective's initial defending team.
  
 
====Timer====
 
====Timer====
Line 105: Line 106:
 
'''Overrides:''' {{tl|Timer|Actor|events}}
 
'''Overrides:''' {{tl|Timer|Actor|events}}
  
<!-- enter function description -->
+
Creates the spawn effect or actually spawns the vehicle.
  
 
====Trigger====
 
====Trigger====
Line 112: Line 113:
 
'''Overrides:''' {{tl|Trigger|SVehicleFactory}}
 
'''Overrides:''' {{tl|Trigger|SVehicleFactory}}
  
<!-- enter event description -->
+
''(ignored)''
  
 
====VehicleDestroyed====
 
====VehicleDestroyed====
Line 119: Line 120:
 
'''Overrides:''' {{tl|VehicleDestroyed|SVehicleFactory}}
 
'''Overrides:''' {{tl|VehicleDestroyed|SVehicleFactory}}
  
<!-- enter event description -->
+
Prepares for spawning a new vehicle.
  
 
===Other instance functions===
 
===Other instance functions===
Line 125: Line 126:
 
{{code|function '''Activate''' ([[byte]]&nbsp;'''T''')}}
 
{{code|function '''Activate''' ([[byte]]&nbsp;'''T''')}}
  
<!-- enter function description -->
+
Activates the factory for the specified team and starts spawning vehicles for that team.
  
 
====Deactivate====
 
====Deactivate====
 
{{code|function '''Deactivate''' ()}}
 
{{code|function '''Deactivate''' ()}}
  
<!-- enter function description -->
+
Stops spawning vehicles.
  
 
====SpawnBuildEffect====
 
====SpawnBuildEffect====
 
{{code|function '''SpawnBuildEffect''' ()}}
 
{{code|function '''SpawnBuildEffect''' ()}}
  
<!-- enter function description -->
+
Creates the spawn effect.
  
 
====SpawnVehicle====
 
====SpawnVehicle====
 
{{code|function '''SpawnVehicle''' ()}}
 
{{code|function '''SpawnVehicle''' ()}}
  
<!-- enter function description -->
+
Spawns a vehicle. If the spawn area is blocked by any players, they will receive a corresponding notification and spawning is delayed.
  
 
====UpdatePrecacheMaterials====
 
====UpdatePrecacheMaterials====
Line 147: Line 148:
 
'''Overrides:''' {{tl|UpdatePrecacheMaterials|Actor|instance functions}}
 
'''Overrides:''' {{tl|UpdatePrecacheMaterials|Actor|instance functions}}
  
<!-- enter function description -->
+
[[Precaching|Precaches]] the spawn effect and vehicle resources.
  
 
====ValidateSpawnLocation====
 
====ValidateSpawnLocation====
 
{{code|function [[bool]]&nbsp;'''ValidateSpawnLocation''' ([[float]]&nbsp;'''Radius''')}}
 
{{code|function [[bool]]&nbsp;'''ValidateSpawnLocation''' ([[float]]&nbsp;'''Radius''')}}
  
<!-- enter function description -->
+
Returns true unless any {{cl|Pawn}}s are found within the specified radius around the factory.

Latest revision as of 08:21, 8 April 2010

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.