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

Orders in a row without canceling order before it

Status
Not open for further replies.
Level 13
Joined
Mar 24, 2010
Messages
950
What is the script I can run that will make a unit ordered to use wind walk but not stop other orders before it?
So i have a AI unit ordered to cast a spell on a unit but then either before or instantly after i want it to cast wind walk but when i do that with gui it stops the wind walk order. I know there is a way to make a unit do that without interrupting its current order but forget. :/
(this should work with WW and divine shield as these can be used without interrupting orders or channeling)
 
Last edited:
Level 13
Joined
Mar 24, 2010
Messages
950
but then it has to wait for the full cast animation to happen, i need it to simulate a user doing it which can basically almost cast the 2 spells at the exact same time. there has to be a way to trigger this?
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,538
Alright, I was messing around with this and I found some really weird interactions.
  • Test
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Attacked unit) Equal to Lich 0000 <gen>
    • Actions
      • Unit - Set Unit: Lich 0000 <gen>'s Real Field: Animation - Cast Backswing ('ucbs') to Value: 0.00
      • Unit - Set Unit: Lich 0000 <gen>'s Real Field: Animation - Cast Point ('ucpt') to Value: 0.00
      • Unit - Order Lich 0000 <gen> to Undead Lich - Frost Nova (Attacking unit)
      • Unit - Order Lich 0000 <gen> to Orc Blademaster - Wind Walk.
      • Wait 1.00 seconds
      • Unit - Set Unit: Lich 0000 <gen>'s Real Field: Animation - Cast Backswing ('ucbs') to Value: 1.10
      • Unit - Set Unit: Lich 0000 <gen>'s Real Field: Animation - Cast Point ('ucpt') to Value: 0.40
So the above trigger works with a few conditions:
1) The Wait is long enough (even with 0.00 cast point/backswing the Wait is needed)

2) You set the caster's Art - Cast Backswing and Cast Point to 0.00 seconds (At least during the time it takes to cast these spells)

3) The Frost Nova ability is learned manually. That means you can't set the starting level of Frost Nova under the Abilities tab (when you double click a pre-placed unit). Why that's not allowed I have no idea.
Also, I didn't test if it would work for abilities added through triggers, so that may cause problems as well.
 

Attachments

  • Frost Nova Wind Walk Test.w3m
    16.9 KB · Views: 21
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
This does not solve the topic creator's problem? Wind Walk is an immediate order so can be issued by the player even while a unit has any number of other orders queued without interrupting them. In StarCraft II one can explicitly issue or queue orders and there is explicit support for such "immediate" abilities. In Warcraft III I do not think this is possible even though the game supports the mechanics for player issued orders.

A good example of this is the SWAT Aftermath sprint ability. This is based on windwalk. You can order your hero to move to the target location and then activate sprint (windwalk) without interrupting the move order.
 
Level 13
Joined
Mar 24, 2010
Messages
950
Yeah sorry guys none of these will quite work i dont think, if it has a wait time in there even more than 0sec's it wont really work right. :/ Not sure how to make this work.. I even tried using the game force player to press W hotkey to simulate a player action but that didnt work at all.
 
Last edited:

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,538
Yeah sorry guys none of these will quite work i dont think, if it has a wait time in there even more than 0sec's it wont really work for what i need. :/ Not sure how to make this work.. I even tried using the game force player to press W hotkey to simulate a player action but that didnt work at all, not sure why..
You can add Permanent Invisibility to the Hero and use a Dummy ability to represent the buff. The backstab bonus damage could then be done with a Damage Engine.

The only thing you'd miss out on is the collision. Unfortunately, we don't really have control over unit pathing besides turning it On or Off. As far as I know, Wind Walk is the only way to create that "phasing" movement (aka no collision with non-structure units). There may be another way though.
 
Level 21
Joined
Mar 29, 2020
Messages
1,237
why wouldn't this work?:

- unit casts unit-target channel ability
- wait if necessary (and if so save all necessary variables...)
- dummy casts frost nova on target of ability being cast
- make triggering unit cast windwalk (hidden version that the unit learns when learning the channel ability)

this way the wait wouldn't happen between both abilities (frost nova and WW), it would just be the casting time.
 
Level 13
Joined
May 10, 2009
Messages
868
Well, I wanted to provide a simple solution for you, but in the end it's turned into a bunch of triggers (4) for just a simple thing. Anyway, I'll still post it here and you can check it out if you're interested in it. Of course, it's far from perfect and it has its own flaws too, but it doesn't stop any further orders.

The main idea is to add wind walk to a specific item type. Abilities cast under this situation won't affect the target unit orders at all. Though, the problem is that items don't support abilities with multiple levels (i.e. hero abilities), we can't dynamically remove/add abilities to items (the new natives seem to be broken too), wind walk mana cost won't be taken into account if cast via item pick up. Also, item and unit abilities doesn't share cooldowns.

I managed to fix most of these problems, but the abilities not sharing cooldowns is the toughest to deal with as we don't have an action which forces an ability to go in cooldown state on 1.28, and Exhume Corpses breaks wind walk buff.

- make triggering unit cast windwalk (hidden version that the unit learns when learning the channel ability)
Ordering units to cast wind walk via trigger breaks their order queue.
 
Last edited:
Level 21
Joined
Mar 29, 2020
Messages
1,237
Ordering units to cast wind walk via trigger breaks their order queue.

I meant like this:

why wouldn't this work?:

- unit casts unit-target channel ability
- wait if necessary (and if so save all necessary variables...)
- dummy casts frost nova on target of ability being cast
- make triggering unit cast windwalk (hidden version that the unit learns when learning the channel ability)

this way the wait wouldn't happen between both abilities (frost nova and WW), it would just be the casting time.

wind walk is casted last and after a wait so it doesn't matter that it breaks the queue. is there a reason this wouldn't work?
 
Status
Not open for further replies.
Top