• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Triggered damage not giving bounty gold

Status
Not open for further replies.
Level 8
Joined
Mar 17, 2016
Messages
133
Can someone tell me why this doesn't give any gold when a unit is killed by this method, despite it clearly saying "The source unit gets credit for kills resulting from this damage" please? This is the trigger:

  • SC SkyBarrage
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Arial Barrage (SC)
    • Actions
      • Set VariableSet AbilityPointTargeting[13] = (Position of (Triggering unit))
      • Unit - Create 1 DummyUnit 22 for (Owner of (Casting unit)) at AbilityPointTargeting[13] facing Default building facing degrees
      • Set VariableSet DummyTracker[15] = (Last created unit)
      • Unit - Add a 3.00 second Generic expiration timer to DummyTracker[15]
      • Unit - Set level of Arial Barrage Dummy (SC) for DummyTracker[15] to (Level of Arial Barrage (SC) for (Triggering unit))
      • Unit - Order DummyTracker[15] to Neutral Tinker - Cluster Rockets AbilityPointTargeting[13]
      • Custom script: call GameTimeWait(0.66)
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 575.00 of AbilityPointTargeting[13].) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is alive) Equal to True
              • ((Picked unit) belongs to an enemy of (Owner of (Triggering unit)).) Equal to True
              • ((Picked unit) is Magic Immune) Equal to False
            • Then - Actions
              • Unit - Cause (Triggering unit) to damage (Picked unit), dealing ((75.00 x (Real((Level of Arial Barrage (SC) for (Triggering unit))))) + 25.00) damage of attack type Spells and damage type Normal
            • Else - Actions
      • Custom script: call GameTimeWait(0.90)
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 575.00 of AbilityPointTargeting[13].) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is alive) Equal to True
              • ((Picked unit) belongs to an enemy of (Owner of (Triggering unit)).) Equal to True
              • ((Picked unit) is Magic Immune) Equal to False
            • Then - Actions
              • Unit - Cause (Triggering unit) to damage (Picked unit), dealing ((75.00 x (Real((Level of Arial Barrage (SC) for (Triggering unit))))) + 25.00) damage of attack type Spells and damage type Normal
            • Else - Actions
      • Custom script: call GameTimeWait(0.90)
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 575.00 of AbilityPointTargeting[13].) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is alive) Equal to True
              • ((Picked unit) belongs to an enemy of (Owner of (Triggering unit)).) Equal to True
              • ((Picked unit) is Magic Immune) Equal to False
            • Then - Actions
              • Unit - Cause (Triggering unit) to damage (Picked unit), dealing ((75.00 x (Real((Level of Arial Barrage (SC) for (Triggering unit))))) + 25.00) damage of attack type Spells and damage type Normal
            • Else - Actions
      • Custom script: call RemoveLocation(udg_AbilityPointTargeting[13])

Note, the dummy ability does 0 damage (cluster rocket) and even if it did, it should still belong to the player that begins the trigger.
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,517
Not sure, it should definitely work.

Perhaps the problem has to do with another trigger. Do you use a damage engine? Are you 100% sure the bounties are setup properly?

You should create a test trigger with the Event "A unit dies" and display the name of the killing unit.
 
Level 8
Joined
Mar 17, 2016
Messages
133
Thanks for the response. I tried what you said and when I kill something it returns WorldEdit, but when the ability kills it returns nothing. As it turns out, it is the damage engine. I'm not sure how it does it, but I guess even abilities that are not triggered do not return anything when a unit dies to it Fireball. The only way to get gold now is through auto-attacking. Not too sure what to do about this. The damage engine I'm using is this Physical Damage Detection for GUI v1.3.0.0

All I wanted from the damage engine was the ability to detect on damage, rather than when a unit starts an auto attack (to stop exploits). Is there a way that I can simply cut away everything I don't need? Because obviously if this engine breaks my entire map it's not worth it.
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,517
Well, I would use Bribe's Damage Engine since it's up to date and it's the best damage system available. That damage engine you're using hasn't been updated in 5 years.

Damage Engine 5.5.0.0

Also, if your Dummy units cast damaging spells you'll want to make sure that the Dummy unit belongs to the proper player. This way Neutral Hostile isn't getting the kill credit or something.

And depending on your map you may run into the issue of the Dummy Unit getting the kill credit and not the Unit that cast the spell. Say a Hero casts a spell that orders a Dummy unit to cast Storm Bolt on multiple units in an area, you'll probably want the Hero to be considered the source of the damage and not the Dummy, especially if your Hero has some kind of stat like Ability Power that would amplify his spell damage.

This can be done with Bribe's Damage Engine by changing the Source of the damage from the Dummy unit to the Hero.
 
Last edited:
Status
Not open for further replies.
Top