• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[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