• 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.

[Trigger] Help with buff trigger

Status
Not open for further replies.
Level 3
Joined
Jun 25, 2006
Messages
32
I need a trigger that when a unit has a certain buff, it will receive 100/200/300 more damage when attacked by the caster of the buff.
 
Level 4
Joined
Dec 30, 2006
Messages
84
I dont have WE opened right now...

Trigger should look something like this:
Event:
Unit is attacked
Condition:
Action:

If Unit have a buff <your BUFF> then cause attacking unit to damage attacked unit for 100xlevel of <your ability>


That MAY work. I am not sure.
 
Level 3
Joined
Jun 25, 2006
Messages
32
However I want specifically the caster to deal the extra damage not just any unit.

  • Death Sentence
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Attacking unit) Equal to (Triggering unit)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Attacked unit) has buff Death Sentence ) Equal to True
        • Then - Actions
          • Unit - Order (Triggering unit) to damage (Attacked unit) for (100.00 x (Real((Level of Death Sentence for (Triggering unit))))) using attack type Hero and damage type Normal.
        • Else - Actions
I tried this and it didn't work!
 
Last edited by a moderator:
Level 11
Joined
Jul 12, 2005
Messages
764
Sure it won't work!
(Attacking unit) Equal to (Triggering unit)
This will only be true if a unit attacks himself..

If only one hero has this spell, it is simple.
  • Death Sentence
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Triggering unit) has buff Death Sentence) equal to true
    • Actions
      • Unit - Order (Attacking unit) to damage (Triggering unit) for (100.00 x (Real((Level of Death Sentence for (Attacking unit))))) using attack type Hero and damage type Normal.
 
Level 3
Joined
May 4, 2007
Messages
66
But this will bug if some other units are near caster, they will also cause extra damage. Condition like this would help:

  • (Level of (abil that gives ure buff) for (Triggering unit)) Greater than 0
But this can also bug if some other unit has same spell...
 
Level 8
Joined
Sep 13, 2006
Messages
431
But this will bug if some other units are near caster, they will also cause extra damage. Condition like this would help:

  • (Level of (abil that gives ure buff) for (Triggering unit)) Greater than 0
But this can also bug if some other unit has same spell...

That's unneccessary, as the trigger deals (level) x 100. If level is zero, it deals 0 x 100 (= 0) extra damage. That would, however, make it so the trigger did not run every single time the unit was attacked...

Pask: the problem is, he wants just that one casting unit to damage. If there are more than one unit with the spell, all will deal extra damage. This is a bit of a predicament, and I don't really know of any easy way to solve this problem...
 
Level 11
Joined
Jul 12, 2005
Messages
764
So now the real question is, should we take the time to try to make it usable for only the casting unit, for the good of mapmakers around the world?... uh, just kidding about that whole last part, but seriously, should we see what we can come up with to make it work how it was originally supposed to?
Well, I know how we could make it work properly, but it'd be in JASS (with local triggers it's not that hard)
 
Level 8
Joined
Sep 13, 2006
Messages
431
Jass forces you to innovate too, but just on things that are actually a challenge ><

Lol, nice. I would dispute that statement, but in such a JASS-heavy community, there can be no reasoning. We'll just stick with saying that using GUI to do 'difficult' things that are 'simple' in JASS has helped me to gain a much more expansive and comprehensive knowledge of in both areas.

Now, I'm just waiting for Blizzard to release SCII with an entirely new scripting language just to screw over all the JASS addicts out there. Cheers...

:thumbs_up:
 
Status
Not open for further replies.
Top