• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Solved] Odd Unit Damage Issue

Status
Not open for further replies.
In the below trigger a unit is spawned, and a unit is given an ability when an attack occurs. This works correctly.

The problem is this:
When the Pulse Generator moves within what looks like 250 range the trigger runs as if the building had been attacked.

So the condition that the attacking unit be a Pulse Generator seems to be ignored?

I have tried using vanilla units in place of the Pulse Generator with the same result.

  • Quakebash
    • Events
      • Game - GDD_Event becomes Equal to 0.00
    • Conditions
      • (Unit-type of GDD_DamageSource) Equal to Pulse Generator
      • (GDD_DamagedUnit is A structure) Equal to True
      • (Level of Life Regeneration Aura (Quakebash) for GDD_DamagedUnit) Equal to 0
      • (Owner of GDD_DamageSource) Not equal to (Owner of GDD_DamagedUnit)
    • Actions
      • Set Quakebash_Point = (Position of GDD_DamagedUnit)
      • Set Quakebash_Group = (Units within 250.00 of Quakebash_Point matching (((Matching unit) is A structure) Equal to True))
      • Unit Group - Pick every unit in Quakebash_Group and do (Actions)
        • Loop - Actions
          • Unit - Add Life Regeneration Aura (Quakebash) to (Picked unit)
      • Unit - Create 1 Dummy (Geyser) for Neutral Passive at Quakebash_Point facing Default building facing degrees
      • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation (udg_Quakebash_Point)
      • Custom script: call DestroyGroup (udg_Quakebash_Group)
 
Last edited:
Level 45
Joined
Feb 27, 2007
Messages
5,578
Sounds like an error with GDD rather than your trigger. I don't see a reason it should do that unless your ability gives negative life regen to enemies and that counts as damage for the system (seems unlikely though). Perhaps GDD_DamageSource isn't being set properly?
 
I have:

-Changed the Source damage unit to a vanilla Berserker
-Re-imported the system: GUI-Friendly Damage Detection v1.2.1
-Changed the dummy spell from Life Regeneration to Reveal

No change. Have I discovered a bug with the system?

Edit: I have determined that the unit used for GDD_DamageSource is irrelevant.

Edit 2: Changing the condition to target organic units does not produce the same error. I think it's a bug in how the system deals with structures. Can this be corrected?
 
Last edited:
Level 45
Joined
Feb 27, 2007
Messages
5,578
If you can get ahold of the system maker they might have a clue why it is happening. Otherwise I could look at the code in a bit.

Not an actual solution for your map if you have other things coded to use GDD, but there are other Gui-friendly DDS in the resource section (people seem to like Lookng_For_Help's). Try importing a different DDS and editing your trigger to use it instead. If you get the same bug then it's probably something related to the game engine or how Unit Damaged events work that doesn't play nice with structures. If the bug disappears then it can probably be corrected in GDD.
 
Level 8
Joined
Jan 28, 2016
Messages
486
I'm not sure how to explain this but there's an odd case where units will trigger a zero damage "attack" when they approach a target. If you use some debugging to display the damage taken of a tower for example, it will occasionally return 0.000 right as the attacker gets within attack range. It usually happens on auto-attacks as well.
 
  • Like
Reactions: Kam
I'm not sure how to explain this but there's an odd case where units will trigger a zero damage "attack" when they approach a target. If you use some debugging to display the damage taken of a tower for example, it will occasionally return 0.000 right as the attacker gets within attack range. It usually happens on auto-attacks as well.

I suspected something like that. Do you know of a way to correct the system?
 
Status
Not open for further replies.
Top