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

Units casting support spell on units that doesnt have the buff

Status
Not open for further replies.
Level 5
Joined
Mar 27, 2008
Messages
107
Basically there's Priests continually spawning and I want them to cast Inner Fire on allied units around them that doesn't have the buff already, and if the buff is removed or runs out, they cast again. Just as if a real player was controlling them. Heal is already on default active ability so that's not an option. And ofc i want to avoid them all using their ability on 1 single target at the same time.

Any help appreciated. Thanks!
 
Level 31
Joined
Jun 27, 2008
Messages
2,557
I guess you will have to constantly check all units with certain condition around the priest. Once Inner Fire is cast on ally, add it to some kind of unit group and set the condition for checking to exclude units in that group. Once Inner Fire is over, removed the unit from that group.
 

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,183
I'd try this.
  • herp derp
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to ability
      • ((Target unit of ability being cast) has buff Inner Fire) Equal to True
    • Actions
      • Unit - Order (Triggering unit) to Stop
this only works if the event fire before the spell is cast, and I am not sure about that. So as said, try it.
 
Level 5
Joined
Mar 27, 2008
Messages
107
I guess you will have to constantly check all units with certain condition around the priest. Once Inner Fire is cast on ally, add it to some kind of unit group and set the condition for checking to exclude units in that group. Once Inner Fire is over, removed the unit from that group.

ํYeah I've tried doing it this way, but there are several priest units spawning at the same time continually. So id have to locate 1 priest unit, make him cast inner flame on one unit that doesn't have it. Locate a second priest make him cast inner flame on another unit that doesn't have it etc. etc.. And make this happen at the same time (I can live with a very short delay though).
And I don't know how to make this work with triggers.
 
Level 11
Joined
Dec 19, 2012
Messages
411
You could use custom triggered spell with the heal ability. Since you enabled the units can have short delay, so use periodic event, 1st check the condition if the units have inner fire buff, if yes, move to else-actions with heal actions. ( Then the unit's heal ability could remove unless you want to check heal ability level)
 
Status
Not open for further replies.
Top