I'm a doctor, not a mechanic

Difference between revisions of "Legacy:Message Placeholder"

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
m (created anchor)
m (Undo revision 46359 by SeriousBarbie (talk))
 
Line 35: Line 35:
 
Only <code>%o</code> is parsed but <code>%k</code> must be included for it to work, it will be removed with no replacement.
 
Only <code>%o</code> is parsed but <code>%k</code> must be included for it to work, it will be removed with no replacement.
  
=== <span ID="ZoneInfo"></span>ZoneInfo ===
+
===ZoneInfo ===
  
 
Set DamageType to 'SpecialDamage'. <code>%k</code> must be included, otherwise the death message will be blank in the game.
 
Set DamageType to 'SpecialDamage'. <code>%k</code> must be included, otherwise the death message will be blank in the game.

Latest revision as of 16:02, 2 September 2016

Message placeholders are special escape codes that insert data from the game into strings. The most common example of these is the death messages, that say, for example:

The Great Zaganza got ripped into tiny pieces by Hortense.

Of course, the Unreal Engine doesn't store that string, since it doesn't know the players will be called "The Great Zaganza" and "Hortense". It stores the string

%o got ripped into tiny pieces by %k

The %o and %k are placeholders, and when the string is used, they will be replaced with meaningful content: in this case, the names of players.

Death Messages in UT[edit]

These can be used in the DeathMessage variable in the Weapon (UT) class and as SpecialDamageString of the GameInfo (UT) when using 'SpecialDamage' as damage type.

Placeholder Description
%k Killer's name
%w Weapon the killer was holding while the other player died.
%o Victim's name

Each placeholder may only appear once.

SpecialEvent[edit]

Custom death messages for SpecialEvent only work in the KillInstigator InitialState. Set DamageType to 'SpecialDamage'.

Only %o is parsed but %k must be included for it to work, it will be removed with no replacement.

ZoneInfo[edit]

Set DamageType to 'SpecialDamage'. %k must be included, otherwise the death message will be blank in the game.

They DO work without %o, but it doesn't look nice. -GeniusDex

Zones using death messages[edit]

The noted types of ZoneInfos are only examples, as far as i know every ZoneInfo can be killing. -GeniusDex

Please add other triggers and zones that use death messages.

Related UT Topics[edit]

Placeholders in UT2003[edit]

In UT2003 only the placeholders %k (killer) and %o (victim) are used in death messages.

However, there are several placeholders usable in TeamSay messages. They only work in team games and only with the TeamSay, not the Say command. The placeholders are not case-sensitive.

Placeholder Description
%A amount of adrenaline ("xx Adrenaline")
%H amount of health ("xx Health")
%L current location (near game objectives or "pickups with inventory items on a pickup base", i.e. usually weapons, but not health, shield or double damage)
%S amount of shield ("xx Shield")
%W currently selected weapon
%% the "%" character (used e.g. as "%%w" to display "%w" instead of the weapon name)

With the TTM 2003 mod there are also "%P" and "%G" ("pickups" and "guns") to display nearby (non-)weapon pickups. Mods can add their own variables from their Mutator, GameInfo and/or Controller classes via the ParseChatPercVar() function.

Related UT2003 Topics[edit]