| 04-23-2007, 01:41 AM | #1 |
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 |
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 |
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 | |
Quote:
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 |
No, Moyack is right. Those specific spells he mentioned do not interrupt the unit's current order. |
| 04-23-2007, 07:37 PM | #6 |
Order a footman to walk and then use defend, youll see what were talking about Ender. |
| 04-23-2007, 07:52 PM | #7 | |
Quote:
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 |
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 | |
Quote:
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 |
You *could* try forcing the UI key hotkey for the ability. Might be workable. Depends on situation though. Unit has to be selected etc. |
