From Unreal Wiki, The Unreal Engine Documentation Site
Jump to navigation Jump to search

by Crusha K. Rool, thanks to iwanpompier for help at getting the radar to work.

UT2004 Object >> Actor >> SVehicleFactory >> UltimateVCTFFactory (custom)

Ultimate Factory for VCTF, giving the mapper more control over vehicle balancing and the functionality of the vehicle itself. Vehicles can be tracked as well, if an UltimateRadarMap Actor is placed in the map.


Property group 'Events'


Type: name

Event to trigger before spawn. Not activated when the vehicle was trigger-spawned.

Property group 'UltimateVCTFFactory'


Type: bool

Vehicle may be rotated by the AlternativeRotation.


Type: int

If bRandomFlip, the Vehicle may spawn rotated by this value.

8192 = 45°; 16384 = 90°; 32768 = 180°; etc.. Negative values will rotate in the opposite direction.


Type: bool

Uses the TeamNum of the closest GameObjective.


Type: bool

Allow spawning over colliding actors.


Type: bool

Factory is triggered "on" at the beginning.

Default value: True


Type: bool

If True, this factory will immediately spawn a vehicle when being triggered.

If False, triggering will enable the factory and untriggering will disable it.


Type: bool

Factory spawns only a limited number of vehicles, there will be no second one when they are destroyed. MaxVehicleCount determines the number of vehicles that can be spawned.


Type: byte

This will always lock the Vehicles for the TeamNum that is NOT entered here. 255 is normal, 0 will always lock this for Blue, 1 always for Red.

(Hack for Minigun turrets - it makes pretty much only sense to use this with them at the team's Core)

Default value: 255


Type: float

Time before spawn to trigger PrepSpawn-Event and -Effect.

Default value: 2.0


Type: float

Interval to wait if spawn area is blocked.

Default value: 1.0


Type: byte

0= red, 1= blue, 255= neutral / none

TeamNums are switched automatically on Reset, if necessary. This is primarily used in combination with bIndependentFactory.


Type: array<SpawnedVehicleProperties>

List for random vehicle spawn.


Type: EVehicleSelectionType

Which method should be used to select the vehicle for spawning.

Internal variables


Type: bool

Needed for Reset().


Type: bool

Neither the vehicle or build effect have been spawned yet


Type: Vehicle

The last vehicle that has been spawned.


Type: int

For accessing the properties of the individual vehicle


Type: int

Same, but in a sequential order.


Type: UltimateRadarMap

The UltimateRadarMap Actor in the map. If none is there, no radar tracking is available.

Default values

Property Value
DrawType DT_Sprite



The size of the spawneffect particle ring around the vehicle to use.



Which method should be used to select the vehicle for spawning.

Random from list, equal chances for everyone.
Use Probability values of the vehicle, so some vehicles are more likely than others.
Always select the next entry from the list when spawning a new vehicle.
Random as above, just that the choice will be used for the whole match.
Use Probablity as above, just that the choice will be used for the whole match.



A load of customization and you need to do it for every entry in the list and for red and blue separately. But it pays out.

class<Vehicle> Vehicle 
The vehicle that is spawned with this entry.
int Health 
Give the spawned Vehicle a custom Health value. 0 will use the Vehicle's default.
float SpawnProbability 
Used with bUseSpawnProbability. You can enter whatever you like, just the relative difference between the entries counts.
name VehicleSpawnedEvent 
Tag to be triggered upon spawning of this particular vehicle (additionally to the one of the factory itself). The vehicle will be the instigator.
name VehicleDestroyedEvent 
Tag to be triggered upon destruction of the vehicle. Vehicle must be a subclass of ONSVehicle for this to happen.
ESpawnSize SpawnEffectSize 
The size of the spawneffect around the vehicle to use.
bool bCanCarryFlag 
This vehicle can carry the flag.
bool bEjectDriver 
Eject driver when vehicle gets destroyed instead of killing him.
bool bEnterringDoesNotUnlock 
Vehicle is not unlocked when a player enters it.
float SpawnProtectionTime 
The vehicle is shielded from any damage for this many seconds after spawn (spawn protection is lift immediately when a driver enters). 0 disables this, -1 means the vehicle is protected until someone enters it.
bool bChangeMaxDesireability 
If True, use a custom MaxDesirability value to tell bots if they should use the vehicle or not.
float MaxDesireability 
Default values are: Scorpion - 0.4; Hellbender - 0.5; Raptor, Cicada, Manta, SPMA, Paladin - 0.6; Goliath, Ion Tank - 0.8; Leviathan - 2.0. Go figure what matches your vehicle best.
bool bTrackVehicleOnRadar 
The vehicle's location will be shown in realtime on the RadarMap.
bool bRadarVisibleToDriver 
Should the vehicle be shown on the radar to it's driver? Only useful if you have a large delay between the updates and want to estimate where your team sees you on the radar.
bool bRadarNeutralWhenEmpty 
If true, the vehicle is drawn with white team color when it's left.
bool bRadarHideWhenEmpty 
If true, the vehicle is not drawn when it's empty.
UltimateRadarVehicleLRI.ERadarVehicleVisibility RadarVehicleVisibility 
Here you set to which players the vehicle is shown on the RadarMap.
float RadarOwnerUpdateTime 
How many seconds have to pass before the location of vehicle is updated for the owning team.
float RadarEnemyUpdateTime 
Same as above, just for enemies.
bool bRadarFadeWithOwnerUpdateTime 
If True, the icon on the radar map will interpolate between opaque and translucent as time passes between location updates on the radar.
bool bRadarFadeWithEnemyUpdateTime 
If False, the icon will always stay fully opaque.
Material RadarTexture 
The texture that represents the vehicle on the radar. It should have an alpha channel and be set to TC_Clamp. A bunch of vehicle textures for the radar are delivered in the texture package that comes with this toolset.
float RadarTextureScale 
The image will be scaled by this factor.
int RadarTextureRotationOffset 
The image will be rotated by this (in Rotation Units), in case your texture doesn't face the right way (up is the direction the vehicle is driving to).




event PostBeginPlay ()

Overrides: Actor.PostBeginPlay

Performs a check to notify the mapper if this actor is useless. References the UltimateRadarMap if it exists. Sets some inherited variables to the correct values, enables the factory if necessary and precaches all the vehicles in the array.


event PostNetBeginPlay ()

Overrides: Actor.PostNetBeginPlay

Activates the factory, either according to the closest GameObjective or with a fixed team number.


event Timer ()

Overrides: Actor.Timer

The main function of this actor. It handles when to call which other function.


event Trigger (Actor Other, Pawn EventInstigator)

Overrides: SVehicleFactory.Trigger

Either enable or spawn directly if bTriggeredSpawn.


event UnTrigger (Actor Other, Pawn EventInstigator)

Overrides: Actor.UnTrigger

Disable if not bTriggeredSpawn.


event VehicleDestroyed (Vehicle V)

Overrides: SVehicleFactory.VehicleDestroyed

VehicleCount gets reduced (if wished) and the LinkedReplicationInfo for the radar is removed, if one for this vehicle existed.

Other instance functions


function Activate (byte T)

Activate the Factory.


function ChooseVehicle ()

Sets the VehicleClass to a Vehicle from the currently valid array. The class can be chosen randomly or sequential. In any case is RandomArrayNumber the index of the chosen entry in the array, so that we can find the matching properties for this vehicle when it's spawned.


function Reset ()

Overrides: Actor.Reset

Adjust this actor if the sides are switched in ONS and deletes all remaining vehicles on the map.


function SpawnBuildEffect ()

Spawns the BuildEffect emitter.


function SpawnVehicle ()

Spawns the chosen VehicleClass and applies the properties from the matching entry in the array. The creation of a LinkedReplicationInfo for the radar is also handled here, if necessary.

If the ChooseVehicle function chose an entry with an empty vehicle class, then the Timer is set back to the length of a RespawnTime to try it again.


simulated function UpdatePrecacheMaterials ()

Overrides: Actor.UpdatePrecacheMaterials

Loads all vehicles in the arrays into cache to have fast access during the game.


simulated function VehicleArrayPrecache ()

Loads all vehicles in the arrays into cache to have fast access during the game.