There is no spoon

User:Crusha/UltimateMappingTools/UltimateRadarMap

From Unreal Wiki, The Unreal Engine Documentation Site
< User:Crusha‎ | UltimateMappingTools
Revision as of 14:56, 12 October 2011 by Crusha (Talk | contribs) (First revision of page, checked for correctness.)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
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.