HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Ordering Unit without Stopping it

04-23-2007, 01:41 AM#1
EnderA
Is there any way to trigger a unit to cast a spell without causing it to cancel any previous orders? When a player casts an non-targeted spell it generally doesn't cancel the unit's orders, but when I've tried to trigger a spell, I can't seem to emulate that.
04-23-2007, 02:16 AM#2
Dil999
You cant order it to use a targeted spell without canceling its orders. I would suggest either making it cast and then reordering it, or using a dummy unit.
04-23-2007, 02:31 AM#3
moyack
If you want that effect, you must make your spell based on any of the following spells: Berserk, Defend, Magical Defense, Mana Shield, Immolation, Divine Shield, Bear form.

As you can see, these orders affect only the caster, so I don't know if this can be helpful.
04-23-2007, 07:49 AM#4
EnderA
Quote:
Originally Posted by moyack
If you want that effect, you must make your spell based on any of the following spells: Berserk, Defend, Magical Defense, Mana Shield, Immolation, Divine Shield, Bear form.

As you can see, these orders affect only the caster, so I don't know if this can be helpful.

Actually, from my experience it doesn't matter what spell a trigger is using. If a trigger orders a unit to do something, it will cancel the unit's previous orders.

To test, I created a spell that (when manually casted) did not cancel the unit's orders. When a trigger told the unit to cast it (using "Order (Unit) to (Untargeted Unit Order)"), it canceled the unit's orders.

I was wondering if there was another method of ordering the unit to do something that would maintain previous orders, not interrupting them. Perhaps something in JASS, or another trigger that I hadn't seen. Apparently there is not.
04-23-2007, 07:16 PM#5
Pyrogasm
No, Moyack is right. Those specific spells he mentioned do not interrupt the unit's current order.
04-23-2007, 07:37 PM#6
Dil999
Order a footman to walk and then use defend, youll see what were talking about Ender.
04-23-2007, 07:52 PM#7
blu_da_noob
Quote:
Originally Posted by Pyrogasm
No, Moyack is right. Those specific spells he mentioned do not interrupt the unit's current order.

I'm pretty sure there was a thread a while back where someone had the same problem. With manashield no less (which is just like immo in this). So this guy might very well be right.
04-23-2007, 08:15 PM#8
Rising_Dusk
Jass/GUI issued orders will make a unit forget its current order.
Only if you click the lil' command button icon will it not interrupt current orders.
04-24-2007, 03:44 AM#9
EnderA
Quote:
Originally Posted by Rising_Dusk
Jass/GUI issued orders will make a unit forget its current order.
Only if you click the lil' command button icon will it not interrupt current orders.

Exactly.

In-game player issued orders (with no target) do not change any previous orders given to the unit - it will continue to do what it was previously doing after completing the untargeted cast.

So the case of a player ordering a footman to walk, then ordering it to defend will work as you described. Any untargeted ability will work that way - Metamorphosis, Starfall, Cannibalize, untargeted summons, etc. The unit will just wait until the spell is finished before it moves on.

However, triggered orders (ones where JASS/GUI code/triggers literally order the specified unit to do something) make the specified unit forget its current order, even if the new order is untargeted.
04-24-2007, 02:12 PM#10
blu_da_noob
You *could* try forcing the UI key hotkey for the ability. Might be workable. Depends on situation though. Unit has to be selected etc.