I search for solutions in this order: Past Code, Unreal Source, Wiki, BUF, groups.yahoo, google, screaming at monitor. – RegularX
Difference between revisions of "User:Crusha/UltimateMappingTools/UltimateONSFactory"
(Moved to sub page) |
(First revision of page. Checked for correctness.) |
||
Line 1: | Line 1: | ||
+ | =UltimateONSFactory= | ||
by Crusha K. Rool, thanks to iwanpompier for help at getting the radar to work. | by Crusha K. Rool, thanks to iwanpompier for help at getting the radar to work. | ||
{{infobox class | {{infobox class | ||
− | | class | + | | class = UltimateONSFactory |
+ | | game = UT2004 | ||
+ | | engine = UE2 | ||
+ | | package = UltimateMappingTools | ||
| parent1 = ONSVehicleFactory | | parent1 = ONSVehicleFactory | ||
| parent2 = SVehicleFactory | | parent2 = SVehicleFactory | ||
| parent3 = Actor | | parent3 = Actor | ||
| parent4 = Object | | parent4 = Object | ||
− | + | | custom = yes | |
− | + | ||
− | | custom | + | |
}} | }} | ||
− | An ONS-mapper's jack of all trades device. This allows the mapper to tweak the vehicle balance of the match right down to the last detail. | + | An ONS-mapper's jack of all trades device. This allows the mapper to tweak the vehicle balance of the match right down to the last detail. Allows to specify an individual vehicle list for both teams from which the next vehicle can be chosen randomly or sequentially. Each individual vehicle entry in a list can be further modified, also with the ability to track the vehicle on the RadarMap. |
− | Allows to specify an individual vehicle list for both teams from which the next vehicle can be chosen randomly. | + | |
− | Each individual vehicle entry in a list can be further modified, also with the ability to track the vehicle on the RadarMap. | + | |
− | + | ||
− | + | ||
− | + | ||
+ | ==Properties== | ||
===Property group 'Events'=== | ===Property group 'Events'=== | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
====PreSpawnEvent==== | ====PreSpawnEvent==== | ||
'''Type:''' [[name]] | '''Type:''' [[name]] | ||
− | + | Event to trigger before spawn. Not activated when the vehicle was trigger-spawned. | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
===Property group 'ONSVehicleFactory'=== | ===Property group 'ONSVehicleFactory'=== | ||
Line 46: | Line 26: | ||
'''Type:''' [[int]] | '''Type:''' [[int]] | ||
− | If bReverseBlueTeamDirection, the | + | If bReverseBlueTeamDirection, the Vehicle will not turn by 180 degrees but by this value. |
8192 = 45°; 16384 = 90°; 32768 = 180°; etc.. | 8192 = 45°; 16384 = 90°; 32768 = 180°; etc.. | ||
+ | Negative values will rotate in the opposite direction. | ||
− | + | ===Property group 'UltimateONSFactory'=== | |
− | ===Property group ' | + | ====bCrushable==== |
− | ==== | + | |
'''Type:''' [[bool]] | '''Type:''' [[bool]] | ||
− | + | Allow spawning over colliding actors. | |
− | ==== | + | ====bEnabled==== |
− | '''Type:''' [[ | + | '''Type:''' [[bool]] |
− | + | Factory is triggered "on" at the beginning. | |
− | + | '''Default value:''' True | |
====bIndependentFactory==== | ====bIndependentFactory==== | ||
'''Type:''' [[bool]] | '''Type:''' [[bool]] | ||
− | + | PowerNode has no influence on the factory's activity or team number. | |
− | + | ||
− | + | ||
====bRandomFlip==== | ====bRandomFlip==== | ||
'''Type:''' [[bool]] | '''Type:''' [[bool]] | ||
− | + | Neutral vehicles may face in BlueTeamRotation. | |
− | ==== | + | ====bTriggeredSpawn==== |
− | '''Type:''' [[ | + | '''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. | |
− | + | ====bUniqueVehicle==== | |
− | + | ||
− | ==== | + | |
'''Type:''' [[bool]] | '''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. | ||
− | ==== | + | ====bUseStaticTeams==== |
'''Type:''' [[bool]] | '''Type:''' [[bool]] | ||
− | + | Factory works only for one team. | |
− | ==== | + | ====NotLockedForTeam==== |
− | '''Type:''' [[ | + | '''Type:''' [[byte]] |
− | + | This will always lock the Vehicles for the TeamNum that is NOT entered here. | |
+ | 255 is normal ONS, 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 | ||
====PreSpawnTime==== | ====PreSpawnTime==== | ||
'''Type:''' [[float]] | '''Type:''' [[float]] | ||
− | + | Time before spawn to trigger PrepSpawn-Event and -Effect. | |
'''Default value:''' 2.0 | '''Default value:''' 2.0 | ||
− | |||
− | |||
− | |||
− | |||
− | |||
====RetrySpawnTime==== | ====RetrySpawnTime==== | ||
'''Type:''' [[float]] | '''Type:''' [[float]] | ||
− | + | Interval to wait if spawn area is blocked. | |
'''Default value:''' 1.0 | '''Default value:''' 1.0 | ||
− | ==== | + | ====StaticTeamNum==== |
− | '''Type:''' [[ | + | '''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. | ||
+ | |||
+ | ====VehicleListBlue==== | ||
+ | '''Type:''' [[array]]<{{tl|SpawnedVehicleProperties}}> | ||
+ | |||
+ | List for random vehicle spawn if blue has the factory | ||
====VehicleListRed==== | ====VehicleListRed==== | ||
− | '''Type:''' [[array]]< | + | '''Type:''' [[array]]<{{tl|SpawnedVehicleProperties}}> |
− | List | + | List for random vehicle spawn if red or neutral has the factory |
− | ==== | + | ====VehicleSelectionType==== |
− | '''Type:''' | + | '''Type:''' {{tl|EVehicleSelectionType}} |
− | + | Which method should be used to select the vehicle for spawning. | |
+ | ===Internal variables=== | ||
+ | ====bInitiallyEnabled==== | ||
+ | '''Type:''' [[bool]] | ||
− | + | Needed for Reset(). | |
− | + | ||
− | + | ||
− | + | ====RadarRI==== | |
+ | '''Type:''' {{cl|UltimateONSRadarHUDRI}} | ||
− | + | Takes care of spawning the HUDOverlay on the client. | |
− | + | ||
− | + | ====RandomArrayNumber==== | |
+ | '''Type:''' [[int]] | ||
− | ==== | + | For accessing the properties of the individual vehicle |
+ | |||
+ | ====SequentialArrayNumberRed==== | ||
'''Type:''' [[int]] | '''Type:''' [[int]] | ||
− | + | Same, but in a sequential order. | |
− | ==== | + | ====SequentialArrayNumberBlue==== |
− | '''Type:''' [[ | + | '''Type:''' [[int]] |
− | + | Need seperate ones for Red and Blue. | |
− | ==== | + | ===Default values=== |
− | ''' | + | {| class="list defaults" |
+ | ! Property | ||
+ | ! Value | ||
+ | |- | ||
+ | | [[UE2:Actor properties (UT2004)#DrawType|DrawType]] | ||
+ | | [[UE2:Actor enums (UT2004)#EDrawType|DT_Sprite]] | ||
+ | |} | ||
+ | |||
+ | ==Enums== | ||
+ | ====ESpawnSize==== | ||
+ | The size of the spawneffect particle ring around the vehicle to use. | ||
+ | ;SIZE_None : | ||
+ | ;SIZE_Scorpion : | ||
+ | ;SIZE_Manta : | ||
+ | ;SIZE_Raptor : | ||
+ | ;SIZE_Hellbender : | ||
+ | ;SIZE_Goliath : | ||
+ | ;SIZE_Leviathan : | ||
+ | |||
+ | ====EVehicleSelectionType==== | ||
+ | Which method should be used to select the vehicle for spawning. | ||
+ | ; VST_Random : Random from list, equal chances for everyone. | ||
+ | ; VST_Probability : Use Probability values of the vehicle, so some vehicles are more likely than others. | ||
+ | ; VST_Sequential : Always select the next entry from the list when spawning a new vehicle. | ||
+ | ; VST_OnceRandom : Random as above, just that the choice will be used for the whole match. | ||
+ | ; VST_OnceProbability : Use Probablity as above, just that the choice will be used for the whole match. | ||
+ | |||
+ | ==Structs== | ||
+ | ===SpawnedVehicleProperties=== | ||
+ | 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]]<[[UE2:Vehicle (UT2004)|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. | ||
+ | ; {{tl|ESpawnSize}} SpawnEffectSize : The size of the spawneffect around the vehicle to use. | ||
+ | ; [[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. | ||
+ | ; {{tl|ERadarVehicleVisibility|UltimateRadarVehicleLRI}} 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. | ||
+ | ; [[UE2:Material (UT2004)|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). | ||
+ | |||
+ | ==Functions== | ||
+ | ===Events=== | ||
+ | ====PostBeginPlay==== | ||
+ | {{code|event '''PostBeginPlay''' ()}} | ||
+ | |||
+ | '''Overrides:''' [[UE2:ONSVehicleFactory (UT2004)#PostBeginPlay|ONSVehicleFactory.PostBeginPlay]] | ||
+ | |||
+ | Performs a check to notify the mapper if this actor is useless. | ||
+ | References the one and only VehicleLRIMaster in the map. If it doesn't exist yet, a new one is spawned. | ||
+ | Sets some inherited variables to the correct values, enables the factory if necessary and precaches all the vehicles in the array. | ||
+ | |||
+ | ====PostNetBeginPlay==== | ||
+ | {{code|event '''PostNetBeginPlay''' ()}} | ||
+ | |||
+ | '''Overrides:''' [[UE2:ONSVehicleFactory (UT2004)#PostNetBeginPlay|ONSVehicleFactory.PostNetBeginPlay]] | ||
+ | |||
+ | Activates the factory, either according to the closest ONSPowerNode (uses super function) or with a fixed team number, making the factory effectively independent from a PowerNode. | ||
+ | |||
+ | ====SetInitialState==== | ||
+ | {{code|event '''SetInitialState''' ()}} | ||
+ | |||
+ | '''Overrides:''' [[UE2:Actor events (UT2004)#SetInitialState|Actor.SetInitialState]] | ||
+ | |||
+ | Remove this factory from the PowerCore's dynamic 'CloseActors'-array. | ||
+ | By doing this, destroying the closest Node will no longer disable this factory. | ||
+ | Executing at this point makes sure that the PostNetBeginPlay() of the PowerCore has been called already. | ||
+ | |||
+ | ====Timer==== | ||
+ | {{code|event '''Timer''' ()}} | ||
+ | |||
+ | '''Overrides:''' [[UE2:ONSVehicleFactory (UT2004)#Timer|ONSVehicleFactory.Timer]] | ||
+ | |||
+ | The main function of this actor. It handles when to call which other function. | ||
+ | |||
+ | ====Trigger==== | ||
+ | {{code|event '''Trigger''' ([[UE2:Actor (UT2004)|Actor]] '''Other''', [[UE2:Pawn (UT2004)|Pawn]] '''EventInstigator''')}} | ||
+ | |||
+ | '''Overrides:''' [[UE2:ONSVehicleFactory (UT2004)#Trigger|ONSVehicleFactory.Trigger]] | ||
+ | |||
+ | Either enable or spawn directly if bTriggeredSpawn. | ||
+ | |||
+ | ====UnTrigger==== | ||
+ | {{code|event '''UnTrigger''' ([[UE2:Actor (UT2004)|Actor]] '''Other''', [[UE2:Pawn (UT2004)|Pawn]] '''EventInstigator''')}} | ||
+ | |||
+ | '''Overrides:''' [[UE2:Actor events (UT2004)#UnTrigger|Actor.UnTrigger]] | ||
+ | |||
+ | Disable if not bTriggeredSpawn. | ||
+ | |||
+ | ====VehicleDestroyed==== | ||
+ | {{code|event '''VehicleDestroyed''' ([[UE2:Vehicle (UT2004)|Vehicle]] '''V''')}} | ||
+ | |||
+ | '''Overrides:''' [[UE2:ONSVehicleFactory (UT2004)#VehicleDestroyed|ONSVehicleFactory.VehicleDestroyed]] | ||
+ | |||
+ | VehicleCount gets reduced (if wished) and the LinkedReplicationInfo for the radar is removed, if one for this vehicle existed. | ||
+ | |||
+ | ===Other instance functions=== | ||
+ | ====Activate==== | ||
+ | {{code|function '''Activate''' ([[byte]] '''T''')}} | ||
+ | |||
+ | '''Overrides:''' [[UE2:ONSVehicleFactory (UT2004)#Activate|ONSVehicleFactory.Activate]] | ||
+ | |||
+ | Activation depending on close Nodes. | ||
+ | |||
+ | ====ChooseVehicle==== | ||
+ | {{code|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. | ||
+ | |||
+ | ====Deactivate==== | ||
+ | {{code|function '''Deactivate''' ()}} | ||
+ | |||
+ | '''Overrides:''' [[UE2:ONSVehicleFactory (UT2004)#Deactivate|ONSVehicleFactory.Deactivate]] | ||
+ | |||
+ | Deactivation depending on close Nodes. | ||
+ | |||
+ | ====Reset==== | ||
+ | {{code|function '''Reset''' ()}} | ||
+ | |||
+ | '''Overrides:''' [[UE2:Actor instance functions (UT2004)#Reset|Actor.Reset]] | ||
+ | |||
+ | Adjust this actor if the sides are switched in ONS and deletes all remaining vehicles on the map. | ||
+ | |||
+ | ====SidesAreSwitched==== | ||
+ | {{code|function [[bool]] '''SidesAreSwitched''' ()}} | ||
+ | |||
+ | Just to make the code more surveillable. | ||
+ | |||
+ | ====SpawnBuildEffect==== | ||
+ | {{code|function '''SpawnBuildEffect''' ()}} | ||
+ | |||
+ | '''Overrides:''' [[UE2:ONSVehicleFactory (UT2004)#SpawnBuildEffect|ONSVehicleFactory.SpawnBuildEffect]] | ||
+ | |||
+ | Spawns the BuildEffect emitter. | ||
+ | |||
+ | ====SpawnVehicle==== | ||
+ | {{code|function '''SpawnVehicle''' ()}} | ||
+ | |||
+ | '''Overrides:''' [[UE2:ONSVehicleFactory (UT2004)#SpawnVehicle|ONSVehicleFactory.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. | ||
+ | |||
+ | ====UpdatePrecacheMaterials==== | ||
+ | {{code|simulated function '''UpdatePrecacheMaterials''' ()}} | ||
+ | |||
+ | '''Overrides:''' [[UE2:ONSVehicleFactory (UT2004)#UpdatePrecacheMaterials|ONSVehicleFactory.UpdatePrecacheMaterials]] | ||
+ | |||
+ | Loads all vehicles in the arrays into cache to have fast access during the game. | ||
+ | |||
+ | ====VehicleArrayPrecache==== | ||
+ | {{code|simulated function '''VehicleArrayPrecache''' ()}} | ||
+ | |||
+ | Loads all vehicles in the arrays into cache to have fast access during the game. | ||
+ | |||
+ | |||
+ | |||
+ | =UltimateONSRadarHUDRI= | ||
+ | {{infobox class | ||
+ | | class = UltimateONSRadarHUDRI | ||
+ | | game = UT2004 | ||
+ | | engine = UE2 | ||
+ | | package = UltimateMappingTools | ||
+ | | parent1 = ReplicationInfo | ||
+ | | parent2 = Info | ||
+ | | parent3 = Actor | ||
+ | | parent4 = Object | ||
+ | | custom = yes | ||
+ | }} | ||
+ | {{autogenerated}} | ||
− | + | Creates the HUDOverlay for the Ultimate ONS radar map. For the vehicle stuff | |
+ | and so on. | ||
− | ==== | + | ==Properties== |
+ | ====bCreatedOverlay==== | ||
'''Type:''' [[bool]] | '''Type:''' [[bool]] | ||
− | + | <!-- enter variable description --> | |
− | ==== | + | ====bRadarMutatorEnabled==== |
'''Type:''' [[bool]] | '''Type:''' [[bool]] | ||
− | + | Disable radar functionality in that case. | |
− | === | + | ===Default values=== |
− | + | {| class="list defaults" | |
+ | ! Property | ||
+ | ! Value | ||
+ | |- | ||
+ | | [[UE2:Actor internal variables (UT2004)#NetUpdateFrequency|NetUpdateFrequency]] | ||
+ | | 1.0 | ||
+ | |} | ||
− | + | ==Functions== | |
+ | ===Events=== | ||
+ | ====PostBeginPlay==== | ||
+ | {{code|event '''PostBeginPlay''' ()}} | ||
− | + | '''Overrides:''' [[UE2:Actor events (UT2004)#PostBeginPlay|Actor.PostBeginPlay]] | |
− | ''' | + | |
− | + | <!-- enter event description --> | |
− | ==== | + | ====Tick==== |
+ | {{code|simulated event '''Tick''' ([[float]] '''DeltaTime''')}} | ||
+ | |||
+ | '''Overrides:''' [[UE2:Actor events (UT2004)#Tick|Actor.Tick]] | ||
+ | |||
+ | <!-- enter event description --> | ||
+ | |||
+ | ===Other instance functions=== | ||
+ | ====HasRadarMutator==== | ||
+ | {{code|function [[bool]] '''HasRadarMutator''' ()}} | ||
+ | |||
+ | <!-- enter function description --> | ||
+ | |||
+ | ====HealDamage==== | ||
+ | {{code|function [[bool]] '''HealDamage''' ([[int]] '''Amount''', [[UE2:Controller (UT2004)|Controller]] '''Healer''', [[class]]<[[UE2:DamageType (UT2004)|DamageType]]> '''DamageType''')}} | ||
+ | |||
+ | '''Overrides:''' [[UE2:Actor instance functions (UT2004)#HealDamage|Actor.HealDamage]] | ||
+ | |||
+ | <!-- enter function description --> | ||
+ | |||
+ | |||
+ | |||
+ | =UltimateRadarVehicleHUDOverlay= | ||
+ | {{infobox class | ||
+ | | class = UltimateRadarVehicleHUDOverlay | ||
+ | | game = UT2004 | ||
+ | | engine = UE2 | ||
+ | | package = UltimateMappingTools | ||
+ | | parent1 = HudOverlay | ||
+ | | parent2 = Actor | ||
+ | | parent3 = Object | ||
+ | | custom = yes | ||
+ | }} | ||
+ | {{autogenerated}} | ||
+ | HUDOverlay for UltimateONSFactory | ||
+ | |||
+ | This Overlay displays the location of a Vehicle on the RadarMap in realtime. | ||
+ | |||
+ | ==Properties== | ||
+ | ====ONSHUD==== | ||
+ | '''Type:''' [[UE2:ONSHUDOnslaught (UT2004)|ONSHUDOnslaught]] | ||
+ | |||
+ | <!-- enter variable description --> | ||
+ | |||
+ | ====OnsIconScale==== | ||
'''Type:''' [[float]] | '''Type:''' [[float]] | ||
− | + | <!-- enter variable description --> | |
− | ==== | + | ====PCOwner==== |
+ | '''Type:''' [[UE2:PlayerController (UT2004)|PlayerController]] | ||
+ | |||
+ | <!-- enter variable description --> | ||
+ | |||
+ | ====RadarPosX==== | ||
'''Type:''' [[float]] | '''Type:''' [[float]] | ||
− | + | <!-- enter variable description --> | |
− | ==== | + | ====RadarPosY==== |
− | '''Type:''' [[ | + | '''Type:''' [[float]] |
− | + | <!-- enter variable description --> | |
− | ==== | + | ====RadarRange==== |
'''Type:''' [[float]] | '''Type:''' [[float]] | ||
− | + | <!-- enter variable description --> | |
+ | |||
+ | ====RadarScale==== | ||
+ | '''Type:''' [[float]] | ||
+ | |||
+ | <!-- enter variable description --> | ||
+ | |||
+ | ====RadarTrans==== | ||
+ | '''Type:''' [[float]] | ||
+ | |||
+ | <!-- enter variable description --> | ||
+ | |||
+ | ====VehicleLRIMaster==== | ||
+ | '''Type:''' {{cl|UltimateRadarVehicleLRIMaster}} | ||
+ | |||
+ | <!-- enter variable description --> | ||
+ | |||
+ | ==Functions== | ||
+ | ===Events=== | ||
+ | ====Tick==== | ||
+ | {{code|simulated event '''Tick''' ([[float]] '''DeltaTime''')}} | ||
+ | |||
+ | '''Overrides:''' [[UE2:Actor events (UT2004)#Tick|Actor.Tick]] | ||
+ | |||
+ | <!-- enter event description --> | ||
+ | |||
+ | ===Other instance functions=== | ||
+ | ====bDrawRadar==== | ||
+ | {{code|simulated function [[bool]] '''bDrawRadar''' ()}} | ||
+ | |||
+ | <!-- enter function description --> | ||
+ | |||
+ | ====DrawRadar==== | ||
+ | {{code|simulated function '''DrawRadar''' ([[UE2:Canvas (UT2004)|Canvas]] '''C''', [[float]] '''CenterRadarPosX''', [[float]] '''CenterRadarPosY''', [[float]] '''RadarWidth''', [[UE2:Object structs (UT2004)#Vector|Object.Vector]] '''MapCenter''')}} | ||
+ | |||
+ | <!-- enter function description --> | ||
+ | |||
+ | ====Render==== | ||
+ | {{code|simulated function '''Render''' ([[UE2:Canvas (UT2004)|Canvas]] '''C''')}} | ||
+ | |||
+ | '''Overrides:''' [[UE2:HudOverlay (UT2004)#Render|HudOverlay.Render]] | ||
+ | |||
+ | <!-- enter function description --> |
Revision as of 14:44, 12 October 2011
UltimateONSFactory
by Crusha K. Rool, thanks to iwanpompier for help at getting the radar to work.
Object >> Actor >> SVehicleFactory >> ONSVehicleFactory >> UltimateONSFactory (custom) |
Contents
- 1 UltimateONSFactory
- 1.1 Properties
- 1.1.1 Property group 'Events'
- 1.1.2 Property group 'ONSVehicleFactory'
- 1.1.3 Property group 'UltimateONSFactory'
- 1.1.3.1 bCrushable
- 1.1.3.2 bEnabled
- 1.1.3.3 bIndependentFactory
- 1.1.3.4 bRandomFlip
- 1.1.3.5 bTriggeredSpawn
- 1.1.3.6 bUniqueVehicle
- 1.1.3.7 bUseStaticTeams
- 1.1.3.8 NotLockedForTeam
- 1.1.3.9 PreSpawnTime
- 1.1.3.10 RetrySpawnTime
- 1.1.3.11 StaticTeamNum
- 1.1.3.12 VehicleListBlue
- 1.1.3.13 VehicleListRed
- 1.1.3.14 VehicleSelectionType
- 1.1.4 Internal variables
- 1.1.5 Default values
- 1.2 Enums
- 1.3 Structs
- 1.4 Functions
- 1.1 Properties
- 2 UltimateONSRadarHUDRI
- 3 UltimateRadarVehicleHUDOverlay
- Package:
- UltimateMappingTools
An ONS-mapper's jack of all trades device. This allows the mapper to tweak the vehicle balance of the match right down to the last detail. Allows to specify an individual vehicle list for both teams from which the next vehicle can be chosen randomly or sequentially. Each individual vehicle entry in a list can be further modified, also with the ability to track the vehicle on the RadarMap.
Properties
Property group 'Events'
PreSpawnEvent
Type: name
Event to trigger before spawn. Not activated when the vehicle was trigger-spawned.
Property group 'ONSVehicleFactory'
BlueTeamRotation
Type: int
If bReverseBlueTeamDirection, the Vehicle will not turn by 180 degrees but by this value.
8192 = 45°; 16384 = 90°; 32768 = 180°; etc.. Negative values will rotate in the opposite direction.
Property group 'UltimateONSFactory'
bCrushable
Type: bool
Allow spawning over colliding actors.
bEnabled
Type: bool
Factory is triggered "on" at the beginning.
Default value: True
bIndependentFactory
Type: bool
PowerNode has no influence on the factory's activity or team number.
bRandomFlip
Type: bool
Neutral vehicles may face in BlueTeamRotation.
bTriggeredSpawn
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.
bUniqueVehicle
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.
bUseStaticTeams
Type: bool
Factory works only for one team.
NotLockedForTeam
Type: byte
This will always lock the Vehicles for the TeamNum that is NOT entered here. 255 is normal ONS, 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
PreSpawnTime
Type: float
Time before spawn to trigger PrepSpawn-Event and -Effect.
Default value: 2.0
RetrySpawnTime
Type: float
Interval to wait if spawn area is blocked.
Default value: 1.0
StaticTeamNum
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.
VehicleListBlue
Type: array<SpawnedVehicleProperties>
List for random vehicle spawn if blue has the factory
VehicleListRed
Type: array<SpawnedVehicleProperties>
List for random vehicle spawn if red or neutral has the factory
VehicleSelectionType
Type: EVehicleSelectionType
Which method should be used to select the vehicle for spawning.
Internal variables
bInitiallyEnabled
Type: bool
Needed for Reset().
RadarRI
Type: UltimateONSRadarHUDRI
Takes care of spawning the HUDOverlay on the client.
RandomArrayNumber
Type: int
For accessing the properties of the individual vehicle
SequentialArrayNumberRed
Type: int
Same, but in a sequential order.
SequentialArrayNumberBlue
Type: int
Need seperate ones for Red and Blue.
Default values
Property | Value |
---|---|
DrawType | DT_Sprite |
Enums
ESpawnSize
The size of the spawneffect particle ring around the vehicle to use.
- SIZE_None
- SIZE_Scorpion
- SIZE_Manta
- SIZE_Raptor
- SIZE_Hellbender
- SIZE_Goliath
- SIZE_Leviathan
EVehicleSelectionType
Which method should be used to select the vehicle for spawning.
- VST_Random
- Random from list, equal chances for everyone.
- VST_Probability
- Use Probability values of the vehicle, so some vehicles are more likely than others.
- VST_Sequential
- Always select the next entry from the list when spawning a new vehicle.
- VST_OnceRandom
- Random as above, just that the choice will be used for the whole match.
- VST_OnceProbability
- Use Probablity as above, just that the choice will be used for the whole match.
Structs
SpawnedVehicleProperties
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 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).
Functions
Events
PostBeginPlay
Overrides: ONSVehicleFactory.PostBeginPlay
Performs a check to notify the mapper if this actor is useless. References the one and only VehicleLRIMaster in the map. If it doesn't exist yet, a new one is spawned. Sets some inherited variables to the correct values, enables the factory if necessary and precaches all the vehicles in the array.
PostNetBeginPlay
Overrides: ONSVehicleFactory.PostNetBeginPlay
Activates the factory, either according to the closest ONSPowerNode (uses super function) or with a fixed team number, making the factory effectively independent from a PowerNode.
SetInitialState
Overrides: Actor.SetInitialState
Remove this factory from the PowerCore's dynamic 'CloseActors'-array. By doing this, destroying the closest Node will no longer disable this factory. Executing at this point makes sure that the PostNetBeginPlay() of the PowerCore has been called already.
Timer
Overrides: ONSVehicleFactory.Timer
The main function of this actor. It handles when to call which other function.
Trigger
Overrides: ONSVehicleFactory.Trigger
Either enable or spawn directly if bTriggeredSpawn.
UnTrigger
Overrides: Actor.UnTrigger
Disable if not bTriggeredSpawn.
VehicleDestroyed
Overrides: ONSVehicleFactory.VehicleDestroyed
VehicleCount gets reduced (if wished) and the LinkedReplicationInfo for the radar is removed, if one for this vehicle existed.
Other instance functions
Activate
Overrides: ONSVehicleFactory.Activate
Activation depending on close Nodes.
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.
Deactivate
Overrides: ONSVehicleFactory.Deactivate
Deactivation depending on close Nodes.
Reset
Overrides: Actor.Reset
Adjust this actor if the sides are switched in ONS and deletes all remaining vehicles on the map.
SidesAreSwitched
Just to make the code more surveillable.
SpawnBuildEffect
Overrides: ONSVehicleFactory.SpawnBuildEffect
Spawns the BuildEffect emitter.
SpawnVehicle
Overrides: ONSVehicleFactory.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.
UpdatePrecacheMaterials
Overrides: ONSVehicleFactory.UpdatePrecacheMaterials
Loads all vehicles in the arrays into cache to have fast access during the game.
VehicleArrayPrecache
Loads all vehicles in the arrays into cache to have fast access during the game.
UltimateONSRadarHUDRI
Object >> Actor >> Info >> ReplicationInfo >> UltimateONSRadarHUDRI (custom) |
- Package:
- UltimateMappingTools
This is an auto-generated page and may need human attention. Please remove the {{autogenerated}} tag if the page seems reasonably complete or replace it with the {{expand}} tag if the page is not yet complete. |
Creates the HUDOverlay for the Ultimate ONS radar map. For the vehicle stuff and so on.
Properties
bCreatedOverlay
Type: bool
bRadarMutatorEnabled
Type: bool
Disable radar functionality in that case.
Default values
Property | Value |
---|---|
NetUpdateFrequency | 1.0 |
Functions
Events
PostBeginPlay
Overrides: Actor.PostBeginPlay
Tick
Overrides: Actor.Tick
Other instance functions
HasRadarMutator
HealDamage
Overrides: Actor.HealDamage
UltimateRadarVehicleHUDOverlay
Object >> Actor >> HudOverlay >> UltimateRadarVehicleHUDOverlay (custom) |
- Package:
- UltimateMappingTools
This is an auto-generated page and may need human attention. Please remove the {{autogenerated}} tag if the page seems reasonably complete or replace it with the {{expand}} tag if the page is not yet complete. |
HUDOverlay for UltimateONSFactory
This Overlay displays the location of a Vehicle on the RadarMap in realtime.
Properties
ONSHUD
Type: ONSHUDOnslaught
OnsIconScale
Type: float
PCOwner
Type: PlayerController
RadarPosX
Type: float
RadarPosY
Type: float
RadarRange
Type: float
RadarScale
Type: float
RadarTrans
Type: float
VehicleLRIMaster
Type: UltimateRadarVehicleLRIMaster
Functions
Events
Tick
Overrides: Actor.Tick
Other instance functions
bDrawRadar
DrawRadar
Render
Overrides: HudOverlay.Render