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

Auto cast ability that will cast by itself?

Status
Not open for further replies.
Factory could trigger unit enters playable map area, then filter the unit-type (better to have a unit-type for this Factory). It is an easier workaround.

Otherwise, you could do what you mentioned in the first post; giving something negative health regen. Just make sure the heal ability only targets Self.
 
Level 9
Joined
Mar 27, 2009
Messages
309
I've tried that factory spell before, the only problem is you end up with 15,000+ units that were automatically removed by the end of the game, thats a lot of leaks.

Perhaps it would be easier just to do a pick all units and clean the temp variables, would be easier to sync as well.
 
Level 12
Joined
May 20, 2009
Messages
822
If you're going to have the Autocast on by default, when the unit finishes training index the unit. When they turn the Autocast off, deindex them. When they turn it on, index them again.

After that, the best thing you can do is just check every so-often if the unit's current order is equal to the order of the spell...Although for some spells this won't work properly.
 

EdgeOfChaos

E

EdgeOfChaos

Maybe I am misunderstanding, but do you just mean this field?
dea.jpg
 
Status
Not open for further replies.
Top