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

Unit Pathing Regions - stuck moving back and forth

Status
Not open for further replies.
Level 9
Joined
Feb 17, 2009
Messages
291
Why does this happen? Let's say you have ten regions chained in triggers, #1 ordering to amove to #2, etc. (I doubt there is a need to show such a massive amt of triggers, that's literally all they do)

And then they just "patrol" back and forth between two of the regions until someone comes up and kills them, or forever. Whichever comes first.

It doesn't always happen, and that's what makes me crazy. In fact, it works about 95 percent of the time. I can't find a predictable pattern. As my AoS project draws closer to the public beta phase it's pretty obvious this stupid bug needs to get stomped out permanently. Pathfinding stuck issues have always been around for me, especially when they cast spells.

Super grateful for any advice~
 
Last edited:
Level 9
Joined
Feb 17, 2009
Messages
291
Well, they're practically all the same. Since there's about 30 of them, I'll just pick a few...

  • Scourge Top 2
    • Events
      • Unit - A unit enters lll PATHING lll Pathing Top 12 <gen>
      • Unit - A unit enters lll PATHING lll Pathing Top 13 <gen>
      • Unit - A unit enters lll PATHING lll Pathing Top 14 <gen>
    • Conditions
      • (Owner of (Triggering unit)) Equal to Player 7 (Green)
    • Actions
      • Set AA_LEAK_Points = (Center of lll PATHING lll Pathing Top 11 <gen>)
      • Unit - Order (Triggering unit) to Attack-Move To AA_LEAK_Points
      • Custom script: call RemoveLocation(udg_AA_LEAK_Points)
  • Scourge Top 3
    • Events
      • Unit - A unit enters lll PATHING lll Pathing Top 09 <gen>
      • Unit - A unit enters lll PATHING lll Pathing Top 10 <gen>
      • Unit - A unit enters lll PATHING lll Pathing Top 11 <gen>
    • Conditions
      • (Owner of (Triggering unit)) Equal to Player 7 (Green)
    • Actions
      • Set AA_LEAK_Points = (Center of lll PATHING lll Pathing Top 08 <gen>)
      • Unit - Order (Triggering unit) to Attack-Move To AA_LEAK_Points
      • Custom script: call RemoveLocation(udg_AA_LEAK_Points)
That's it. The others are just the same, some with multiple region events, some with just one. I have a bunch of square regions drawn at key spots along each path to "catch" spellcasters and just generally keep them flowing good.

Again, it USUALLY works great. As stupid-simple as these are, I'm at a loss. How could they patrol between two regions when they're NEVER told to move backward, only forward toward the other side of the map
 
Level 18
Joined
Nov 21, 2012
Messages
835
Some spell cancels orders life roots or teleportation for example. If casted on player(7) unit it will stop.
Are you issuing orders to those units? It may overwrite previous attack-move order.
To "catch" spell casters you can use unit finishes casting an ability event and then reorder attack-move. For this you have to write next target location for each unit when they enters monitored regions. Above 2 triggers you show looks fine for me (I'm using GetEnteringUnit but this souldnt be a problem)
 
Level 9
Joined
Feb 17, 2009
Messages
291
Well, I redid the regions/triggers recently (they were poorly organized/named by someone else years ago) and this began. The formula is exactly the same as before. :\

P1 and P7 have no issue running across the whole map on attack move, and I think if you "lure" them into the next region in front or behind, they'll reset and continue on their way.

If you are right, my only guess would be reducing the number of regions? It's worth noting that some paths have more than others, so that's not even really a shot in the dark.
 
Level 9
Joined
Feb 17, 2009
Messages
291
I don't see ignore unit command. I see ignore guard position, which doesn't sound similar to me at all. Is that what you're referring to?

Edit: lol yeah, tried that. It is useless, now all three paths' troops beeline to the middle path.
 
Last edited:
Status
Not open for further replies.
Top