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?
- PrinceOfFunky
- Godlike
- Posts: 1204
- Joined: Mon Aug 31, 2015 10:31 pm
How am I supposed to create a new Damage Type?
Some of the stuff I created:
Mods: VisualStreamPlayer, TeamColorOverlay, FunkyMoves, CommandSystem, FunkyPointer, AdvancedMutator, CommandEvent, ParticleSystem, LifeSucks
Gametypes: UTRoyale, UnrealRace
Hacks : Create/Write files with UScript, Read files with UScript, Running files with UScript
Maps: CTF-(POF)-Escher_Fix, CTF-(NotYet)HyperBlast, DM-(NotYet)Condemned, CTF-StalwartXS, UR-Hyperblast, DM-3072-ItalyKinda, DOM-NRMC-Cathode, CTF-TAMC-UnderPressure
Concepts: RabbitHole, Builder gun, HeatMap, Playable arcade cabinet, Stalwartception, Non Conventional Weapons, MainFrame
Memes: Meme#1, Meme#2
Mods: VisualStreamPlayer, TeamColorOverlay, FunkyMoves, CommandSystem, FunkyPointer, AdvancedMutator, CommandEvent, ParticleSystem, LifeSucks
Gametypes: UTRoyale, UnrealRace
Hacks : Create/Write files with UScript, Read files with UScript, Running files with UScript
Maps: CTF-(POF)-Escher_Fix, CTF-(NotYet)HyperBlast, DM-(NotYet)Condemned, CTF-StalwartXS, UR-Hyperblast, DM-3072-ItalyKinda, DOM-NRMC-Cathode, CTF-TAMC-UnderPressure
Concepts: RabbitHole, Builder gun, HeatMap, Playable arcade cabinet, Stalwartception, Non Conventional Weapons, MainFrame
Memes: Meme#1, Meme#2
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);
"If Origin not in center it be not in center." --Buggie
- PrinceOfFunky
- Godlike
- Posts: 1204
- 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 .
Some of the stuff I created:
Mods: VisualStreamPlayer, TeamColorOverlay, FunkyMoves, CommandSystem, FunkyPointer, AdvancedMutator, CommandEvent, ParticleSystem, LifeSucks
Gametypes: UTRoyale, UnrealRace
Hacks : Create/Write files with UScript, Read files with UScript, Running files with UScript
Maps: CTF-(POF)-Escher_Fix, CTF-(NotYet)HyperBlast, DM-(NotYet)Condemned, CTF-StalwartXS, UR-Hyperblast, DM-3072-ItalyKinda, DOM-NRMC-Cathode, CTF-TAMC-UnderPressure
Concepts: RabbitHole, Builder gun, HeatMap, Playable arcade cabinet, Stalwartception, Non Conventional Weapons, MainFrame
Memes: Meme#1, Meme#2
Mods: VisualStreamPlayer, TeamColorOverlay, FunkyMoves, CommandSystem, FunkyPointer, AdvancedMutator, CommandEvent, ParticleSystem, LifeSucks
Gametypes: UTRoyale, UnrealRace
Hacks : Create/Write files with UScript, Read files with UScript, Running files with UScript
Maps: CTF-(POF)-Escher_Fix, CTF-(NotYet)HyperBlast, DM-(NotYet)Condemned, CTF-StalwartXS, UR-Hyperblast, DM-3072-ItalyKinda, DOM-NRMC-Cathode, CTF-TAMC-UnderPressure
Concepts: RabbitHole, Builder gun, HeatMap, Playable arcade cabinet, Stalwartception, Non Conventional Weapons, MainFrame
Memes: Meme#1, Meme#2