[Trigger] Damage Detection Problem...

Status
Not open for further replies.
Level 5
Joined
Nov 21, 2014
Messages
151
I have the damage detection system but can I make it so that it only works on basic attacks and not abilities, such as aoe??? thanks in advance :ogre_love::ogre_love:
 
Level 5
Joined
Nov 21, 2014
Messages
151
Impossible.
Or, well. Impossible to do flawlessly.

You can filter out physical damage in the new DDSs, so if you got no abilities with physical damage that would work.
Though some units basic attacks do magic damage so that would not work either.

I'd advice against trying to do this.

Well the point is, I have an ability that is AOE and deals damage per second, but it procs this passive like crazy...
 
Level 7
Joined
Oct 19, 2015
Messages
286
If you trigger the AoE ability, you can make it so that your other ability that uses damage detection ignores triggered damage.
 
Level 5
Joined
Nov 21, 2014
Messages
151
If you trigger the AoE ability, you can make it so that your other ability that uses damage detection ignores triggered damage.

It places a big circle on the groudn that deals damage/ second to all enemies inside, can I make the damage detection only ignore the damage from that ability and not the rest? If that's the case that would be more than perfect :goblin_jawdrop:
 
Level 7
Joined
Oct 19, 2015
Messages
286
If the damage is triggered then you can tag it however you like, so yes you can make your other spell ignore triggered damage from this spell but not triggered damage from other spells. To tag a damage packet, we usually set a global variable to some value before dealing damage and then set it back to its previous value after dealing damage. Something like this:
JASS:
function UnitDamageTargetTagged takes unit source, widget target, real damage, ..., integer tag returns nothing
    local integer temp = udg_damageTag
    set udg_damageTag = tag
    call UnitDamageTarget( source, target, damage, ... )
    set udg_damageTag = temp
endfunction
 
Level 5
Joined
Nov 21, 2014
Messages
151
If the damage is triggered then you can tag it however you like, so yes you can make your other spell ignore triggered damage from this spell but not triggered damage from other spells. To tag a damage packet, we usually set a global variable to some value before dealing damage and then set it back to its previous value after dealing damage. Something like this:
JASS:
function UnitDamageTargetTagged takes unit source, widget target, real damage, ..., integer tag returns nothing
    local integer temp = udg_damageTag
    set udg_damageTag = tag
    call UnitDamageTarget( source, target, damage, ... )
    set udg_damageTag = temp
endfunction

I can only do gui trigers idk how to do custom text :/
I know how to make a trigger custom text, but I don't understand it that well ..
 
Level 13
Joined
Jan 2, 2016
Messages
978
Simplest thing you can do is disable the trigger, responsible for the passive effect, and then re-enable it:
Event: A unit starts the effect of ability
Condition: Ability being cast equal to your ability
Actions: Turn-off The passive trigger <gen>
Damage the units you want
Turn-on The passive trigger <gen>
 
Last edited:
Level 5
Joined
Nov 21, 2014
Messages
151
And how does one implement this? Also disabling the trigger wouldn't work since what if another player has the passive too? Then while the other is using the ability he won't get any triggers from the passive :ogre_icwydt:
 
Level 5
Joined
Nov 21, 2014
Messages
151
What does your trigger currently look like with the normal damage detection? I can show you how to make it use Damage Engine with spell damage disregarded.

See attachments, btw thanks a lot!! :ogre_love::ogre_love:
 

Attachments

  • trigger.PNG
    trigger.PNG
    21.9 KB · Views: 60
Level 13
Joined
Jan 2, 2016
Messages
978
And how does one implement this? Also disabling the trigger wouldn't work since what if another player has the passive too? Then while the other is using the ability he won't get any triggers from the passive :ogre_icwydt:

Yeah... NO :p
This will disable the trigger for like 0.000001 seconds (maybe few more 0s). :D
I can't really imagine anyone needing the passive in that exact moment.
 
  • Flames lvl 1
    • Events
      • Game - DamageEvent becomes Equal to 1.00
    • Conditions
      • IsDamageSpell Equal to False
      • (DamageEventTarget belongs to an enemy of (Owner of DamageEventSource)) Equal to True
      • (DamageEventSource has buff Flames of Azzinoth (level 1)) Equal to True
      • (Unit-type of DamageEventSource) Equal to Doom Lord
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 11) Equal to 1
        • Then - Actions
          • Set FlameLoc = (Position of DamageEventTarget)
          • Unit - Create 1 Flames of Azzinoth (Level 1) for (Owner of DamageEventSource) at FlameLoc facing Default building facing degrees
          • Unit - Add a 30.00 second Generic expiration timer to (Last created unit)
          • Custom script: call RemoveLocation(udg_FlameLoc)
        • Else - Actions
To install Damage Engine, I have included a video on the same page where you can download it from. It is found in the "how to install" section: http://www.hiveworkshop.com/forums/spells-569/gui-damage-engine-v3-6-0-1-a-201016/
Also, in the future when you want to share triggers: http://www.hiveworkshop.com/forums/miscellaneous-tutorials-456/how-easily-post-triggers-163285/
 
Level 5
Joined
Nov 21, 2014
Messages
151
Yeah... NO :p
This will disable the trigger for like 0.000001 seconds (maybe few more 0s). :D
I can't really imagine anyone needing the passive in that exact moment.

If you read what I said earlier you'd know that the AOE you place down is active for about 20 seconds so that's why i said that..
 
Level 5
Joined
Nov 21, 2014
Messages
151
  • Flames lvl 1
    • Events
      • Game - DamageEvent becomes Equal to 1.00
    • Conditions
      • IsDamageSpell Equal to False
      • (DamageEventTarget belongs to an enemy of (Owner of DamageEventSource)) Equal to True
      • (DamageEventSource has buff Flames of Azzinoth (level 1)) Equal to True
      • (Unit-type of DamageEventSource) Equal to Doom Lord
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 11) Equal to 1
        • Then - Actions
          • Set FlameLoc = (Position of DamageEventTarget)
          • Unit - Create 1 Flames of Azzinoth (Level 1) for (Owner of DamageEventSource) at FlameLoc facing Default building facing degrees
          • Unit - Add a 30.00 second Generic expiration timer to (Last created unit)
          • Custom script: call RemoveLocation(udg_FlameLoc)
        • Else - Actions
To install Damage Engine, I have included a video on the same page where you can download it from. It is found in the "how to install" section: http://www.hiveworkshop.com/forums/spells-569/gui-damage-engine-v3-6-0-1-a-201016/
Also, in the future when you want to share triggers: http://www.hiveworkshop.com/forums/miscellaneous-tutorials-456/how-easily-post-triggers-163285/

You're truly amazing.... :goblin_good_job::thumbs_up::thumbs_up::grin: +REP!
 
Level 13
Joined
Jan 2, 2016
Messages
978
If you read what I said earlier you'd know that the AOE you place down is active for about 20 seconds so that's why i said that..

Well, you have your problem solved, but just so you know for the future, you could do it like this too:
loop actions:
turn off trigger
deal damage
turn on trigger
wait 1.00 seconds

This way the trigger wouldn't be off for the full durations :p
 
Level 5
Joined
Nov 21, 2014
Messages
151
Well, you have your problem solved, but just so you know for the future, you could do it like this too:
loop actions:
turn off trigger
deal damage
turn on trigger
wait 1.00 seconds

This way the trigger wouldn't be off for the full durations :p

I don't like waiting... It screws with things, I rather do it mp friendly. but k
 
Level 13
Joined
Jan 2, 2016
Messages
978
Well, I never saw the code of your spell (even if you've posted it - I've missed it) to know how exactly your trigger looks like. I simply assumed you used a wait, since you use GUI..
It would look the same with periodic events or timers tho - turn off trigger, deal damage, turn on trigger..
 
Status
Not open for further replies.
Top