AI Unit won't attack after using Wind Walk

Sungazer

New Member
Reaction score
0
I'm working on a map where a player has a computer-controlled ally who gains control of their units during combat (think Legion TD.)

One of these units has Wind Walk, which it will cast, but then it completely stops attacking and refuses to attack at this point. I even made two triggers which:

1) Order the unit to wind walk. Works fine.

2) Order the unit to attack another unit. It will target/face the unit, get within attack range, and then just sit there. It won't attack and break Wind Walk and do the backstab damage. What the hell is going on?

I've played dota AI maps where the AI heroes use WW against you, and the AI uses WW against you when you play the BM in regular melee mode. So why can't I order a unit to Wind Walk? I even tried using the Blademaster unit and ordering it to Wind Walk and attack, no dice.

Test it yourself if you don't believe me! :p

Any help appreciated, rep all around of course
 

Tylarion

New Member
Reaction score
1
Maybe he stops attacking because he casts windwalk again?

You should post your trigger, so we can help you better.
 

Sungazer

New Member
Reaction score
0
I guess I didn't make myself 100% clear.

My triggers were just an optional sort of test.

Try this:

1) Make one of the players a "Computer" and put it on the same Force as a User player, and make sure they are allies

2) Create a Blademaster for the Allied Computer player and teach it WW

3) Make it fight enemies

4) It will Wind Walk, disappear, and then refuse to attack to break out of it

5) It can still receive regular orders and behaves normally otherwise, it is not acting like it is "stuck" casting WW over and over

6) You can do this without triggers, just let the "AI" run the unit, it will eventually WW itself, but then won't attack to break itself out

Hope that makes my problem a bit clearer. The unit behaves this way with or without triggers. I simply made a trigger to see if I could "force" the unit to attack a nearby unit, and still no dice.
 

SouLEDGE

Damn you advanced calculus
Reaction score
75
Try Setting your unit to a variable to test it? Test is with the variable before and after it uses wind-walk. If it still doesn't want to attack it could be the wind-walk buff - like the shadowmeld buff - stops the unit from auto-targetting and it could prevent a triggered attack
Can't test it myself, PC is broken... again... 3rd time this month...
 

Sungazer

New Member
Reaction score
0
Try Setting your unit to a variable to test it? Test is with the variable before and after it uses wind-walk. If it still doesn't want to attack it could be the wind-walk buff - like the shadowmeld buff - stops the unit from auto-targetting and it could prevent a triggered attack
Can't test it myself, PC is broken... again... 3rd time this month...

This seems to be exactly what's going on, as Meld/Invisibility/Wind Walk probably use the same hard-coded process.

As far as your suggestion, I did stick the unit in a variable. In fact...

Trigger:
  • Learn WW
    • Events
      • Player - Player 1 (Red) types a chat message containing -ww as An exact match
    • Conditions
    • Actions
      • Hero - Learn skill for p1_squad_0[1]: Wind Walk


Trigger:
  • Attack WW
    • Events
      • Player - Player 1 (Red) types a chat message containing -wa as An exact match
    • Conditions
    • Actions
      • Unit - Order p1_squad_0[1] to Attack p2_squad_0[1]


p1_squad_0[] & p2_squad_0[] are unit arrays

Those are the two triggers I was using to test. The first trigger works fine, the second trigger "wants to work": The unit moves to and faces the unit that it's supposed to attack, but then just stands there, in Wind Walk.

As I said, this behavior is consistent with what you're saying about Meld.

Edit: I just went back and tested the 2nd trigger prior to the unit being Wind Walked, and it works fine. As soon as it gains Wind Walk, it displays the behavior I described above. If this *is* hard-coded, how the hell do they do it in those dota AI maps? Is there a JASS function that gets around this?

Oh, and sorry to hear about your machine ;\
 

susubu

New Member
Reaction score
0
i have the same problem.

i have 2 suggestions for you. 1 is to give the unit another insta-cast ability (like immolation or item ability) to break windwalk then remove it immediately. 2 is to make a dummy spell based on either "invisibility" or "permanent invisibility" and not use windwalk at all.
i'm not sure how dota ai does it but anyways hope this helps.
edit:
actually just tried action:remove specific buff and that ended up working
 

Ashlebede

New Member
Reaction score
43
As far as I know, not breaking the wind walk if the target moved too much is normal wind walk behavior. In Hero Line Wars, it can be rather frustrating, too.

What happens is your hero is ordered to attack the unit. It moves within melee range, but if, by the time he gets there, the target moved, it seems that he'll just stand there and wait. You have to re-order the unit to attack the target.

Solution : periodic events and/or timers. Just renew the order to make sure the windwalked hero does attack the target.
 

Whoareyou.

New Member
Reaction score
24
Hmm, your typing messages stuff works right?, cuz if I was doing this trigger I would just do like
A Unit Enters [Region]

Order [Unit] to Attack [Units in Region]
Order [Unit] to Use [WW]
Im not sure because I haven't opened WE lately, I'll check tommorow.
 

Whoareyou.

New Member
Reaction score
24
Hmm, your typing messages stuff works right?, cuz if I was doing this trigger I would just do like
A Unit Enters [Region]

Order [Unit] to Attack [Units in Region]
Order [Unit] to Use [WW]
Im not sure because I haven't opened WE lately, I'll check tommorow.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top