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

[Spell] Buff Priority - I have receipts for everything!

Status
Not open for further replies.
Level 24
Joined
Feb 9, 2009
Messages
1,787
I have an ability that places a temporary buff on a unit, if the unit is damaged it will consume the buff and heal it for X amount.

I have multiple variants of this ability that can be cast, only one should fire and heal the target unit, and I would be absolutely pleased as punch if it were to be in order that I choose, either by what order they were last cast or by that of an arbitrary value (lowest buff duration, highest heal value, etc.)

Example:
UnitB casts 10 second BuffB on Footman, UnitA casts 60 second BuffA on Footman.

So with the effect already defined in my opening, BuffB should take priority over BuffA, however if the cast order is reversed and BuffA is cast before BuffB, BuffA Should fire!


ETA: I'm no stranger to Variables, hurt me plenty with your suggestions, but efficiency should take priority!
 
Last edited:
Status
Not open for further replies.
Top