• 🏆 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!
  • ✅ HD Level Design Contest #1 POLL is now OPEN! Check out the stunning visuals of the final entries. 🔗Click here to cast your vote!

Help with auto-cast ability..

Not open for further replies.
Level 2
Jan 22, 2008
You know how in Island Defense, you can activate the Auto-Cast ability which allows you steal gold from the Titan? How would I create a similar effect? I tried Searing Arrows but doesn't seem to work.
Level 4
Dec 14, 2004
Try the same thing with any auto cast ability that isn't attack related. Not because that's the problem, but it will just be better if it doesn't have to be an attack.

What are you trying to do so far, because it would just simply be a when unit casts event and then you take gold from owning player of titan and add the same amount to owning player of triggering unit.

You're familiar with what a dummy spell is right?? when you take away all non-triggered effects from a spell??
Level 29
Jul 29, 2007
Well I already told you the theorical part.

You use the "A unit is issued a order" event. Now check if the order was your ability ON ID (go check whats your ON/OFF ID in the object manager). If it is, you set a boolean's value to be true.

Now, whenever that unit attacks with its boolean true - do your actions.

When the unit is issued the "OFF" order, you make the boolean false.
You'll also need a trigger to detect if the unit has mana or not and disable it according to that.

If you want it to look good you will also need a Hit Detection system (not recommnded in GUI).
If you want it to be MUI (any unit can cast it at any time) and not PUI (one unit per player), you must use JASS.

[Edit] Don't listen to this nonsense I just wrote !

When a unit is issued the ON order, you change its custom value to someNumber (some number...), now whenever a unit attacks with that custom value - you do your actions.

When he is issued the off/has no mana, you change his custom value to something else.

You can also go to the Dummy Unit thread in the triggers forum and check the full thread.

Another solution would be to search it, since im sure it was answerd more then 2 times.
Not open for further replies.