I see that DamageType subclasses have some variables but I can't find out where they are accessed from. From what I can see, GameInfo and Pawn doesn't even check for the name of a DamageType class but just for a name, then why DamageType's name has been converted to a localized variable? Unless there's something I don't know about the variable "name" in Actor.uc...
PlayDying() is the only function in Pawn.uc that changes the animation depending on a given "damage type" name, the behaviour is hardcoded, so how am I supposed to create a new Damage Type without creating a Pawn subclass?
I was thinking to check the "damage type" name from within Mutator.uc's PreventDeath(), but that wouldn't have sense with the function name.
How am I supposed to create a new Damage Type?
-
- Godlike
- Posts: 1196
- Joined: Mon Aug 31, 2015 10:31 pm
How am I supposed to create a new Damage Type?
"Your stuff is known to be buggy and unfinished/not properly tested"
-
- Godlike
- Posts: 2644
- Joined: Fri Sep 25, 2015 9:01 pm
- Location: moved without proper hashing
Re: How am I supposed to create a new Damage Type?
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():
and I set this for example in Basemutator's function ScoreKill():
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";
Code: Select all
Killer.Died(None, 'TeamKill', Killer.Location);
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
-
- Godlike
- Posts: 1196
- Joined: Mon Aug 31, 2015 10:31 pm
Re: How am I supposed to create a new Damage Type?
Ok so, the DamageType class is not used anywhere, the localized "name" is actually a localized String in TournamentGameInfo: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():and I set this for example in Basemutator's function ScoreKill():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";
Code: Select all
Killer.Died(None, 'TeamKill', Killer.Location);
Spoiler
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;
#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;
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 .
"Your stuff is known to be buggy and unfinished/not properly tested"