• 🏆 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!

Invulnerability similar to Big Bad Voodoo - Buff Check

Status
Not open for further replies.
Level 6
Joined
Aug 12, 2007
Messages
201
I wanted to make an ability similar to Big Bad Voodoo because the spell itself is unstable and unreliable beyond useless for me. Right now I have a modified aura on a building, and a trigger as follows:

  • InvulnerableBuff
    • Events
    • Conditions
      • ((Triggering unit) has buff Protected ) Equal to True
    • Actions
      • Unit - Make (Triggering unit) Invulnerable
But I have two major problems with this. One, I have no idea what kind of event I should use since there is no Unit - Gains a Buff event, and two, how do I remove it because there is no Unit - Looses a Buff event either. And I can't simply remove invulnerability from every unit that does not have Protected on them as it would break all sorts of other invulnerability granting effects and spells. Any insight would be appreciated.
 
Well, use
  • Trigger1
  • Events
    • Unit - A unit starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to X
  • Actions
    • Set Caster1 = (Triggering unit)
    • Unit - Make (Caster1) Invulnerable
    • Countdown Timer - Start Timer1 as a one-shot timer that will expire in X seconds (X= the duration of the spell)
  • Timer
  • Events
    • Time - Timer1 expires
  • Conditions
  • Actions
    • Unit - Make (Caster1) vulnerable
 
Oh, so you want it for every unit around to make them invulnerable?
If so, then, add to Trigger1 the action "Trigger - Turn on Trigger3 <gen>", use the triggers i said, plus this:
  • trigger3
  • Events
    • Time - Every 1.00 seconds of game-time
  • Conditions
  • Actions
    • Set Point1 = (Position of (Caster1))
    • Set BuffGroup = (Units within 500.00 of (Point1) matching ((Matching unit) is a structure equal to False) and (Matching unit) belongs to an ally of (Owner of (Caster1)) Equal to True)
    • Unit Group - Pick every unit in (BuffGroup) and do (Actions)
      • Loop - Actions
        • If/ then/ else
          • If (Conditions)
            • (Picked unit) has (your buff) Equal to True
          • Then (Actions)
            • Unit - Make (Picked unit) Invulnerable
            • Unit - Add (Picked unit) to (BuffedAlreadyGroup)
    • Unit Group - Pick up every unit in (BuffedAlreadyGroup) and do (Actions)
      • Loop - Actions
        • If/ Then/ Else
          • If (Conditions)
            • (Picked unit) has (your buff) Equal to False
          • Then (Actions)
            • Unit - Make (Picked unit) vulnerable
            • Unit - Remove (Picked unit) from (BuffedAlreadyGroup)
    • Custom script: call RemoveLocation (udg_Point1)
    • Custom script: call DestroyGroup (udg_BuffGroup)
Finally, in the second trigger i gave you (when the timer expires), add the action Trigger - Turn off Trigger3 <gen>
 
Level 6
Joined
Aug 12, 2007
Messages
201
Alright thanks, I'll try that. But if I have more then one of these things going on at once, I can't simply set the the point of the caster, should I start it with a pick all units of type caster and go from there?
 
Hm, no, that would require MUI. MUI isn't involved with Pick up every unit of the same type :S
Currently, GUI triggering envolves indexing. I no longer make spells, because i am waiting for the 1.24 patch release, since all of the coding the current GUI spellmaking will be out-of-date, after the release. For more info, this one will illuminate you: http://www.hiveworkshop.com/forums/...s-101/1-24s-effect-on-maps-and-spells-134193/
 
Level 6
Joined
Aug 12, 2007
Messages
201
I'm not sure I understand, even after reading that. Is the 1.24 patch release going to completely restructure how Warcraft 3 does triggers in some way?
 
Status
Not open for further replies.
Top