Gah - a solution with more questions. – EntropicLqd

Difference between revisions of "User:Crusha/UltimateMappingTools/UltimateRadarMap"

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
(First revision of page, checked for correctness.)
 
(Added related helper classes with autogenerated descriptions.)
 
Line 121: Line 121:
  
 
Returns True if a loaded Mutator affects the radar and thus we should rather disable ourselves. It is only checked if "Radar" is in the GroupName of the Mutator.
 
Returns True if a loaded Mutator affects the radar and thus we should rather disable ourselves. It is only checked if "Radar" is in the GroupName of the Mutator.
 +
 +
 +
 +
 +
{{infobox class
 +
| class = UltimateRadarMapHUDOverlay
 +
| game = UT2004
 +
| engine = UE2
 +
| package = UltimateMappingTools
 +
| parent1 = HudOverlay
 +
| parent2 = Actor
 +
| parent3 = Object
 +
| custom = yes
 +
}}
 +
{{autogenerated}}
 +
 +
Shows the Radar Map in the player's HUD.
 +
 +
==Properties==
 +
====bMapDisabled====
 +
'''Type:''' [[bool]]
 +
 +
Can be toggled by the player.
 +
 +
====bShowEnemyObjectiveCarrier====
 +
'''Type:''' [[bool]]
 +
 +
<!-- enter variable description -->
 +
 +
====bShowNonClassifiedGameObjectives====
 +
'''Type:''' [[bool]]
 +
 +
<!-- enter variable description -->
 +
 +
====bShowOwnObjectiveCarrier====
 +
'''Type:''' [[bool]]
 +
 +
<!-- enter variable description -->
 +
 +
====bTrackVehiclesOnRadar====
 +
'''Type:''' [[bool]]
 +
 +
<!-- enter variable description -->
 +
 +
====IconScale====
 +
'''Type:''' [[float]]
 +
 +
<!-- enter variable description -->
 +
 +
====MapCenterLocation====
 +
'''Type:''' [[UE2:Object structs (UT2004)#Vector|Object.Vector]]
 +
 +
<!-- enter variable description -->
 +
 +
====Objectives====
 +
'''Type:''' [[array]]<[[UE2:GameObjective (UT2004)|GameObjective]]>
 +
 +
<!-- enter variable description -->
 +
 +
====PCOwner====
 +
'''Type:''' [[UE2:PlayerController (UT2004)|PlayerController]]
 +
 +
<!-- enter variable description -->
 +
 +
====RadarPosX====
 +
'''Type:''' [[float]]
 +
 +
<!-- enter variable description -->
 +
 +
====RadarPosY====
 +
'''Type:''' [[float]]
 +
 +
<!-- enter variable description -->
 +
 +
====RadarRange====
 +
'''Type:''' [[float]]
 +
 +
<!-- enter variable description -->
 +
 +
====RadarScale====
 +
'''Type:''' [[float]]
 +
 +
<!-- enter variable description -->
 +
 +
====RadarTrans====
 +
'''Type:''' [[float]]
 +
 +
<!-- enter variable description -->
 +
 +
====VehicleLRIMaster====
 +
'''Type:''' {{cl|UltimateRadarVehicleLRIMaster}}
 +
 +
The manager of all radar-related vehicle replication. There should be only one at a time.
 +
 +
==Functions==
 +
===Events===
 +
====BeginPlay====
 +
{{code|simulated event '''BeginPlay''' ()}}
 +
 +
'''Overrides:''' [[UE2:Actor events (UT2004)#BeginPlay|Actor.BeginPlay]]
 +
 +
<!-- enter event description -->
 +
 +
====PostBeginPlay====
 +
{{code|simulated event '''PostBeginPlay''' ()}}
 +
 +
'''Overrides:''' [[UE2:Actor events (UT2004)#PostBeginPlay|Actor.PostBeginPlay]]
 +
 +
<!-- enter event description -->
 +
 +
====Tick====
 +
{{code|simulated event '''Tick''' ([[float]]&nbsp;'''DeltaTime''')}}
 +
 +
'''Overrides:''' [[UE2:Actor events (UT2004)#Tick|Actor.Tick]]
 +
 +
<!-- enter event description -->
 +
 +
===Other instance functions===
 +
====bDrawRadar====
 +
{{code|simulated function [[bool]]&nbsp;'''bDrawRadar''' ()}}
 +
 +
<!-- enter function description -->
 +
 +
====DrawRadar====
 +
{{code|simulated function '''DrawRadar''' ([[UE2:Canvas (UT2004)|Canvas]]&nbsp;'''C''', [[float]]&nbsp;'''CenterRadarPosX''', [[float]]&nbsp;'''CenterRadarPosY''', [[float]]&nbsp;'''RadarWidth''', [[UE2:Object structs (UT2004)#Vector|Object.Vector]]&nbsp;'''MapCenter''')}}
 +
 +
<!-- enter function description -->
 +
 +
====Render====
 +
{{code|simulated function '''Render''' ([[UE2:Canvas (UT2004)|Canvas]]&nbsp;'''C''')}}
 +
 +
'''Overrides:''' [[UE2:HudOverlay (UT2004)#Render|HudOverlay.Render]]
 +
 +
<!-- enter function description -->
 +
 +
====ToggleRadarMap====
 +
{{code|function '''ToggleRadarMap''' ()}}
 +
 +
<!-- enter function description -->
 +
 +
 +
 +
 +
{{infobox class
 +
| class = UltimateRadarMapInteraction
 +
| game = UT2004
 +
| engine = UE2
 +
| package = UltimateMappingTools
 +
| parent1 = Interaction
 +
| parent2 = Interactions
 +
| parent3 = Object
 +
| custom = yes
 +
}}
 +
{{autogenerated}}
 +
 +
Used by the UltimateRadarMapHUDOverlay to toggle the RadarMap on or off
 +
with F12.
 +
 +
==Properties==
 +
====ParentRadarMapHUDOverlay====
 +
'''Type:''' {{cl|UltimateRadarMapHUDOverlay}}
 +
 +
Set by the HUDOverlay that created us.
 +
 +
==Functions==
 +
===Exec functions===
 +
====ToggleRadarMap====
 +
{{code|exec function '''ToggleRadarMap''' ()}}
 +
 +
<!-- enter function description -->

Latest revision as of 15:04, 12 October 2011

UT2004 Object >> Actor >> Info >> UltimateRadarMap (custom)
Package: 
UltimateMappingTools

Place this Actor in the map to be able to display an ONSlaught-like RadarMap in the HUD in any gametype you wish.

Supported are CTF gametypes (CTF, CTF4, VCTF), BR gametypes (BR, BR4, Bombing Spree Mutator), Domination (DOM, Triple Domination) and Assault. Supported means, that those will display the GameObjectives properly for that gametype. Unsupported gametypes can still be set to show all currently active GameObjectives or just simply show the RadarMap to give some feedback about your location.

In order to display a RadarMap you have to set one up in the LevelProperties as you would do in ONS.

Properties

Property group 'UltimateRadarMap'

bShowOwnObjectiveCarrier

Type: bool

Shows the location of the own flag/bomb carrier (i.e. your teammember that stole the enemy flag) on radar.

Default value: True

bShowEnemyObjectiveCarrier

Type: bool

Shows the location of the enemy flag/bomb carrier on radar.

bShowNonClassifiedGameObjectives

Type: bool

Shows GameObjectives on the radar that are neither Flags, nor DomintationPoints, nor Bombs, nor BombDeliveries. I.e. Assault Objectives.

Default value: True


bUseActorLocationAsMapCenter

Type: bool

If true, the map center is not assumed to be at 0,0,0 but at the location of this Actor. This way you don't have to adjust the entire rest of your map to match the center of the editor.

Default value: True

Internal variables

bAddedOverlay

Type: bool

The HUDOverlay has been added by Tick() already.

bDisabled

Type: bool

Some Mutator wants us disabled, so we obey.

bHasRadarVehicles

Type: bool

If no UltimateVehicleFactories are in the match or none of them has a vehicle that should be shown on the radar, we can tell the HUDOverlay to save some performance by skipping that check.

Default values

Property Value
bNoDelete True
NetUpdateFrequency 1.0
RemoteRole ROLE_SimulatedProxy

Functions

Events

BeginPlay

event BeginPlay ()

Overrides: Actor.BeginPlay

Check for Radar Mutators and disable us if one is found or if we are in an ONS map since that one already has a radar map.

PostBeginPlay

simulated event PostBeginPlay ()

Overrides: Actor.PostBeginPlay

Check if there are vehicles that should be tracked on the radar.

Tick

simulated event Tick (float DeltaTime)

Overrides: Actor.Tick

Used on clients to spawn the HUDOverlay.

Other instance functions

HealDamage

function bool HealDamage (int Amount, Controller Healer, class<DamageTypeDamageType)

Overrides: Actor.HealDamage

Hack:

If some Mutator knows about us but doesn't want to deal with our variables and functions in particular because he doesn't want to compile us with him, he can use this method.

By calling this very basic function that exists in the Actor class, he can use a plain A.IsA('UltimateRadarMap') and then A.HealDamage() to disable the radar stuff.

I simply assume that no code out there would ever attempt to heal damage on an unknown Info class for whatever reason. But to be absolutely sure, the Amount must be less than 0. ;)

It's recommend to make this happen before PostBeginPlay().

MutatorCheck

function bool MutatorCheck ()

Returns True if a loaded Mutator affects the radar and thus we should rather disable ourselves. It is only checked if "Radar" is in the GroupName of the Mutator.



UT2004 Object >> Actor >> HudOverlay >> UltimateRadarMapHUDOverlay (custom)
Package: 
UltimateMappingTools


Shows the Radar Map in the player's HUD.

Properties

bMapDisabled

Type: bool

Can be toggled by the player.

bShowEnemyObjectiveCarrier

Type: bool


bShowNonClassifiedGameObjectives

Type: bool


bShowOwnObjectiveCarrier

Type: bool


bTrackVehiclesOnRadar

Type: bool


IconScale

Type: float


MapCenterLocation

Type: Object.Vector


Objectives

Type: array<GameObjective>


PCOwner

Type: PlayerController


RadarPosX

Type: float


RadarPosY

Type: float


RadarRange

Type: float


RadarScale

Type: float


RadarTrans

Type: float


VehicleLRIMaster

Type: UltimateRadarVehicleLRIMaster

The manager of all radar-related vehicle replication. There should be only one at a time.

Functions

Events

BeginPlay

simulated event BeginPlay ()

Overrides: Actor.BeginPlay


PostBeginPlay

simulated event PostBeginPlay ()

Overrides: Actor.PostBeginPlay


Tick

simulated event Tick (float DeltaTime)

Overrides: Actor.Tick


Other instance functions

bDrawRadar

simulated function bool bDrawRadar ()


DrawRadar

simulated function DrawRadar (Canvas C, float CenterRadarPosX, float CenterRadarPosY, float RadarWidth, Object.Vector MapCenter)


Render

simulated function Render (Canvas C)

Overrides: HudOverlay.Render


ToggleRadarMap

function ToggleRadarMap ()



UT2004 Object >> Interactions >> Interaction >> UltimateRadarMapInteraction (custom)
Package: 
UltimateMappingTools


Used by the UltimateRadarMapHUDOverlay to toggle the RadarMap on or off with F12.

Properties

ParentRadarMapHUDOverlay

Type: UltimateRadarMapHUDOverlay

Set by the HUDOverlay that created us.

Functions

Exec functions

ToggleRadarMap

exec function ToggleRadarMap ()