[r2210+]A_DamageMaster not functioning properly
Moderator: GZDoom Developers
Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
- Major Cooke
- Posts: 8206
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: GZBoomer Town
- Contact:
[r2210+]A_DamageMaster not functioning properly
I have used A_SpawnItemEx("Damager",0,0,0,0,0,0,0,48) (no position check, and set master) and I have the damager set up so it will deal damage when hit. The monster that spawns it has a DamageFactor "Normal", 0.0 and DamageFactor "Weakness", 1.0.
When the Damager actor is shot, it calls A_DamageMaster(5,"Weakness") but it doesn't appear to be doing anything, even if I set the spawner's health to 5, it won't hurt it.
In version 2181, it worked just fine, but now it's not working anymore. I also haven't made any changes to it since, so I'm trying out a few revisions to see if I can find which one for sure is the latest that was working properly.
The flags the master has:
MONSTER
+BOSSDEATH
+BOSS
+GHOST
+NOICEDEATH
+DONTRIP
+FULLVOLACTIVE
+FULLVOLDEATH
+DONTMORPH
+NOFEAR
The flags the "damager" has:
Monster
-COUNTKILL
+NOGRAVITY
+DONTFALL
+NOICEDEATH
+GHOST
When the Damager actor is shot, it calls A_DamageMaster(5,"Weakness") but it doesn't appear to be doing anything, even if I set the spawner's health to 5, it won't hurt it.
In version 2181, it worked just fine, but now it's not working anymore. I also haven't made any changes to it since, so I'm trying out a few revisions to see if I can find which one for sure is the latest that was working properly.
The flags the master has:
MONSTER
+BOSSDEATH
+BOSS
+GHOST
+NOICEDEATH
+DONTRIP
+FULLVOLACTIVE
+FULLVOLDEATH
+DONTMORPH
+NOFEAR
The flags the "damager" has:
Monster
-COUNTKILL
+NOGRAVITY
+DONTFALL
+NOICEDEATH
+GHOST
- Major Cooke
- Posts: 8206
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: GZBoomer Town
- Contact:
Re: [r2210+]A_DamageMaster not functioning properly
It should also be noted that A_KillMaster/Children/Siblings works just fine, yet when I set A_DamageMaster/Children/Siblings with an equivelant of their health, it still doesn't do anything to them.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49223
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: [r2210+]A_DamageMaster not functioning properly
Example, please!
- Major Cooke
- Posts: 8206
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: GZBoomer Town
- Contact:
Re: [r2210+]A_DamageMaster not functioning properly
Code: Select all
actor SuperZombieMan : ZombieMan
{
health 20
painchance 0
MONSTER
+FLOORCLIP
+GHOST
DamageFactor "Normal", 0.0
DamageFactor "Weakness", 1.0
states
{
Missile:
POSS E 0 A_SpawnItemEx("Damager",0,0,0,0,0,0,0,48)
POSS E 10 A_FaceTarget
POSS F 8 A_CustomMissile("MiniRocket",32,0,0)
POSS E 8
Goto See
}
}
actor Damager
{
Monster
Health 1000000
PainChance 255
-COUNTKILL
-SOLID
+NOGRAVITY
+DONTFALL
+NOICEDEATH
+GHOST
+NOTARGET
States
{
Spawn:
TNT1 A 70
Stop
Pain:
TNT1 A 0 A_UnSetShootable
TNT1 A 0 A_Print("Dealt 20")
TNT1 A 50 A_DamageMaster(20,"Weakness")
Stop
}
}
actor MiniRocket : Rocket
{
+FORCERADIUSDMG
+THRUGHOST
Damage 0
Scale 0.45
States
{
Death:
MISL B 4 bright A_Explode(3,32,0)
MISL C 3 bright
MISL D 2 bright
Stop
}
}
- NeuralStunner
-
- Posts: 12328
- Joined: Tue Jul 21, 2009 12:04 pm
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
- Location: capital N, capital S, no space
- Contact:
Re: [r2210+]A_DamageMaster not functioning properly
Tip: Use flag constants for readability.
Have you tried commenting out the DamageFactor "Normal"? That's the keyword used by the Protection Powerup to affect all damage - it may be that it's overriding all other DamageTypes. (I'm not saying this would be a solution, but it may help find the cause.)
Have you tried commenting out the DamageFactor "Normal"? That's the keyword used by the Protection Powerup to affect all damage - it may be that it's overriding all other DamageTypes. (I'm not saying this would be a solution, but it may help find the cause.)
- Major Cooke
- Posts: 8206
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: GZBoomer Town
- Contact:
Re: [r2210+]A_DamageMaster not functioning properly
no check position(32) + set master(16) = 48 combined.
The thing is, it's supposed to prevent all damagetypes except for anything else specified. Commenting out the damagefactor "Normal", 0.0 would only make him vulnerable to everything. I only want him vulnerable to damagetype "weakness", which is called by the child. Sadly, this doesn't seem to be working. I even had it use an A_Explode method, and zombie attacked the "damager" oddly enough to show it had been "hit" with the A_Explode, but it acts as if though he has +NODAMAGE on or something...
Graf, would an actor property of damagefactor "Normal", 0.0 enable the +NODAMAGE flag by default?
The thing is, it's supposed to prevent all damagetypes except for anything else specified. Commenting out the damagefactor "Normal", 0.0 would only make him vulnerable to everything. I only want him vulnerable to damagetype "weakness", which is called by the child. Sadly, this doesn't seem to be working. I even had it use an A_Explode method, and zombie attacked the "damager" oddly enough to show it had been "hit" with the A_Explode, but it acts as if though he has +NODAMAGE on or something...
Graf, would an actor property of damagefactor "Normal", 0.0 enable the +NODAMAGE flag by default?
- NeuralStunner
-
- Posts: 12328
- Joined: Tue Jul 21, 2009 12:04 pm
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
- Location: capital N, capital S, no space
- Contact:
Re: [r2210+]A_DamageMaster not functioning properly
Actors are not supposed to enter pain states or infight from zero-damage attacks, so it looks like something is only partially registering...
Hmm, it's not working for direct attacks either. I have Imps set as 1.0x damage from the "Bullet" type, (one I specified on the bullet weapons) and 0.0x from "Normal". "Normal" damage apparently covers everything.
In the meantime, you can use [wiki]DamageThing[/wiki] like a codepointer in Decorate. You'd have to use a existing [wiki=Damage_types]Damage Type[/wiki], but you could pick something odd like "Massacre" (MOD 1000).
Hmm, it's not working for direct attacks either. I have Imps set as 1.0x damage from the "Bullet" type, (one I specified on the bullet weapons) and 0.0x from "Normal". "Normal" damage apparently covers everything.

In the meantime, you can use [wiki]DamageThing[/wiki] like a codepointer in Decorate. You'd have to use a existing [wiki=Damage_types]Damage Type[/wiki], but you could pick something odd like "Massacre" (MOD 1000).
Last edited by NeuralStunner on Sun Mar 21, 2010 12:29 pm, edited 1 time in total.
- Major Cooke
- Posts: 8206
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: GZBoomer Town
- Contact:
Re: [r2210+]A_DamageMaster not functioning properly
I'll try the switching of the damagefactor placements, but the rest of the stuff... No. I don't want to have to compile an ACS script just to get it working, because it was working just fine until I updated my zdoom/gzdoom.
- NeuralStunner
-
- Posts: 12328
- Joined: Tue Jul 21, 2009 12:04 pm
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
- Location: capital N, capital S, no space
- Contact:
Re: [r2210+]A_DamageMaster not functioning properly
No script needed. Just use it directly:
Nevermind swapping the lines, no luck. I tried. (See edit above.)
Code: Select all
TROO H 4 DamageThing (0,1000)
- Major Cooke
- Posts: 8206
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: GZBoomer Town
- Contact:
Re: [r2210+]A_DamageMaster not functioning properly
Hmm... That might work. However I'd still like this to be investigated by the developers for sure.
- NeuralStunner
-
- Posts: 12328
- Joined: Tue Jul 21, 2009 12:04 pm
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
- Location: capital N, capital S, no space
- Contact:
Re: [r2210+]A_DamageMaster not functioning properly
More testing done. I tried the following lines:
So, setting "Bullet" damage to 100 should more or less counteract the 1% from "Normal", right? No, actually hitting the Imp with a single bullet results in an instagib.
This had the same result:
But! This works as expected:
Obviously one 10,000th is an extremely minute increase, and the Health system wrks in whole numbers regardless. It seems like the engine is ignoring any DamageFactor of 1, treating it like "unspecified". So it appears the problem is with the DamageFactor property and not the DamageMaster function.
Code: Select all
DamageFactor "Normal", 0.01
DamageFactor "Bullet", 100
This had the same result:
Code: Select all
DamageFactor "Normal", 0.0
DamageFactor "Bullet", 100
Code: Select all
DamageFactor "Normal", 0.0
DamageFactor "Bullet", 1.0001
- Major Cooke
- Posts: 8206
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: GZBoomer Town
- Contact:
Re: [r2210+]A_DamageMaster not functioning properly
...OH! Thanks mate.
Anyway, Graf, could you look into this?
Anyway, Graf, could you look into this?
- DBThanatos
- Posts: 3101
- Joined: Fri Apr 14, 2006 3:17 pm
- Location: in "the darkness that lurks in our mind"
Re: [r2210+]A_DamageMaster not functioning properly
Well, this topic (especifically this post) helps a lot understanding how the damage types works for "normal" and others.
- Major Cooke
- Posts: 8206
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: GZBoomer Town
- Contact:
Re: [r2210+]A_DamageMaster not functioning properly
Yeah, but still, this was working just fine until recently... *scratches back of head*
Looking back at the actor properties, I do see we can attempt "DamageFactor 0.0", albeit when I tried to add DamageFactor "Weakness", 1.0 it seemed to have overwritten the first one...
Looking back at the actor properties, I do see we can attempt "DamageFactor 0.0", albeit when I tried to add DamageFactor "Weakness", 1.0 it seemed to have overwritten the first one...
Last edited by Major Cooke on Sun Mar 21, 2010 2:15 pm, edited 1 time in total.
- NeuralStunner
-
- Posts: 12328
- Joined: Tue Jul 21, 2009 12:04 pm
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
- Location: capital N, capital S, no space
- Contact:
Re: [r2210+]A_DamageMaster not functioning properly
That is, how it's supposed to work. For some reason the explicit 1.0 setting doesn't seem to be overriding the 0.0 any more.