Barbie wrote:All occurrences I know use the data type
Name for DamageType but not the sub classes of Actor>DamageType.
In my MonsterHunt version I have introduced two new DamageTypes and use them in MonsterHunt.GetDeathMsgSuicide():
- Code: Select all
if (DamageType == 'TeamKill')
DeathMsg = " was sentenced to death because of team kill";
else if (DamageType == 'FriendlyFire')
DeathMsg = " died on too much friendly fire";
and I set this for example in Basemutator's function ScoreKill():
- Code: Select all
Killer.Died(None, 'TeamKill', Killer.Location);
Ok so, the DamageType class is not used anywhere, the localized "name" is actually a localized String in TournamentGameInfo:
class TournamentGameInfo extends GameInfo;
#exec AUDIO IMPORT FILE="Sounds\Generic\Resp2a.wav" NAME="Resp2A" GROUP="General"
var(DeathMessage) localized string DeathMessage[32]; // Player name, or blank if none.
var(DeathMessage) localized string DeathModifier[5];
var(DeathMessage) localized string MajorDeathMessage[8];
var(DeathMessage) localized string HeadLossMessage[2];
var(DeathMessage) localized string DeathVerb;
var(DeathMessage) localized string DeathPrep;
var(DeathMessage) localized string DeathTerm;
var(DeathMessage) localized string ExplodeMessage;
var(DeathMessage) localized string SuicideMessage;
var(DeathMessage) localized string FallMessage;
var(DeathMessage) localized string DrownedMessage;
var(DeathMessage) localized string BurnedMessage;
var(DeathMessage) localized string CorrodedMessage;
var(DeathMessage) localized string HackedMessage;
var(DeathMessage) localized string MortarMessage;
var(DeathMessage) localized string MaleSuicideMessage;
var(DeathMessage) localized string FemaleSuicideMessage;
while the DamageEffect is spawned and hardcoded in ScriptedPawn.PlayHit() and UnrealIPlayer.PlayHit(). I couldn't find the effect spawning in PlayerPawn.
Also an effect is spawned in ScriptedPawn.PlayDeathHit() and UnrealIPlayer.PlayDeathHit() that depends on the Region.Zone variables, which gives a sense to the "damage" related variables in ZoneInfo.uc .