• 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] 'Stack' decaying after a certain amount of time/Easer way to MUI spell

Status
Not open for further replies.
Level 2
Joined
Jul 8, 2017
Messages
17
Hello there, I'm new around here.

I got 2 problems that I need help with:

1. I'm currently trying to create an 'aura' that gives AS bonuses to the Hero when his ally units die and heals the bearer for 10% of their max HP. This bonus stacks and drops after a certain amount of time individually (10 seconds). So far, I have accomplished the first half as the AS bonuses are properly stacking (via increasing the level of Endurance Aura per allied unit death). Trigger I've used is here:

  • The Sentinels Sorrow Red
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Owner of (Triggering unit)) Equal to Player 1 (Red)
    • Actions
      • Set Location3 = (Position of (Triggering unit))
      • Set DetectGroup1 = (Units within 900.00 of Location3)
      • Unit Group - Pick every unit in DetectGroup1 and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Picked unit)) Equal to The Sentinel's Sorrow
              • (Owner of (Picked unit)) Equal to Player 1 (Red)
              • (Level of The Sentinel's Sorrow for (Picked unit)) Equal to 1
            • Then - Actions
              • Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + ((Max life of (Triggering unit)) x 0.10))
              • Unit - Set level of The Sentinel's Sorrow Aura for (Picked unit) to ((Level of The Sentinel's Sorrow Aura for (Picked unit)) + 1)
            • Else - Actions
      • Custom script: call DestroyGroup (udg_DetectGroup1)
      • Custom script: call RemoveLocation (udg_Location3)
If it leaks, I'm ashamed...

The problem I keep facing continuously is trying to get those 'stacks' to individually decay slowly over. I've tried using the wait function but it seems to crash onto itself as it doesn't reduce it as planned. Is there any possible way to do this? If so, does it require me overdoing the trigger for the spell (pls no, spent 6 hours figuring this out)?

2. Is there any way possible to make this MUI without having to specify each of the events for specific players more 11 times?

Thanks in advance!
 
Last edited:
Level 2
Joined
Jul 8, 2017
Messages
17
Sorry for the late reply.

Yeah, I was aiming for it to be MUI. Seems like I'll either look for the Unit Indexer or learn hashtables. Thanks guys!
 
Status
Not open for further replies.
Top