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

Pathing problem

Status
Not open for further replies.

Esa

Esa

Level 4
Joined
Nov 10, 2010
Messages
79
Hi!

I need help fixing some pathing problem I have, as my units doesn't appear to be following it completely. I will link all my triggers related to pathing in the specific map in this thread.


  • Events
    • Time - Every 25.00 seconds of game time
  • Conditions
  • Actions
    • Set Temp_Point = (Center of Scourge Base West <gen>)
    • Unit - Create 3 Ghoul for Player 11 (Dark Green) at Temp_Point facing 270.00 degrees
    • Custom script: call RemoveLocation (udg_Temp_Point)
This is the spawning trigger, that one works fine.

  • Events
    • Unit - A unit enters Scourge Base West <gen>
    • Unit - A unit enters West WP7 <gen>
    • Unit - A unit enters West WP6 <gen>
    • Unit - A unit enters West WP5 <gen>
    • Unit - A unit enters West WP4 <gen>
    • Unit - A unit enters West WP3 <gen>
    • Unit - A unit enters West WP2 <gen>
    • Unit - A unit enters West WP1 <gen>
  • Conditions
    • (Owner of (Entering unit)) Equal to Player 11 (Dark Green)
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Scourge Base West <gen> contains (Triggering unit)) Equal to True
      • Then - Actions
        • Unit - Order (Triggering unit) to Attack-Move To (Center of West WP7 <gen>)
      • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (West WP7 <gen> contains (Triggering unit)) Equal to True
      • Then - Actions
        • Unit - Order (Triggering unit) to Attack-Move To (Center of West WP6 <gen>)
      • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (West WP6 <gen> contains (Triggering unit)) Equal to True
      • Then - Actions
        • Unit - Order (Triggering unit) to Attack-Move To (Center of West WP5 <gen>)
      • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (West WP5 <gen> contains (Triggering unit)) Equal to True
      • Then - Actions
        • Unit - Order (Triggering unit) to Attack-Move To (Center of West WP4 <gen>)
      • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (West WP4 <gen> contains (Triggering unit)) Equal to True
      • Then - Actions
        • Unit - Order (Triggering unit) to Attack-Move To (Center of West WP3 <gen>)
      • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (West WP3 <gen> contains (Triggering unit)) Equal to True
      • Then - Actions
        • Unit - Order (Triggering unit) to Attack-Move To (Center of West WP2 <gen>)
      • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (West WP2 <gen> contains (Triggering unit)) Equal to True
      • Then - Actions
        • Unit - Order (Triggering unit) to Attack-Move To (Center of West WP1 <gen>)
      • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (West WP1 <gen> contains (Triggering unit)) Equal to True
      • Then - Actions
        • Unit - Order (Triggering unit) to Attack-Move To (Center of Night Elf West Spawn <gen>)
      • Else - Actions
And this is the movement trigger, where they appear to stop at West WP7 for some reason I can't understand. I have a creep revival trigger as well, but I don't think that should interfere with this as that trigger has a condition that the mobs are neutral hostile.

I have similar triggers for east and north, where I have the same problem with the east trigger. They appear to be stopping on one point.
 
Level 15
Joined
Oct 16, 2010
Messages
941
  • (West WP1 <gen> contains (Triggering unit)) Equal to True
This might be causing problems b/c it's registering the unit entering slightly too early at times. I would create a different trigger for each region so you don't have to run the condition and see if it works (it should).
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
Yeah, when a unit enters a region, the region still doesn't contain the unit.

Raven0's solution will work. Another option is to create an overlapping region for every region:

Regions.jpg


Use the inner region for "unit enters a region" and the outer for "region contains a unit".
 

Esa

Esa

Level 4
Joined
Nov 10, 2010
Messages
79
ya, I could be wrong but I think that should fix it. That's the way i've always done creep paths.

I did try that, but they still stop at one region per lane. I can't really understand why, I've doublechecked all pathing triggers. There is nothing that indicates they should stop, nor should this be interfering with any trigger apart from these.

edit: I just noticed that this only count for the scourge units, the night elves have the exact same trigger, the only difference is that for them it works. (of course, the triggers are fitted to suit the factions.)

doubleedit: Countermessage, the night elf units stop on the west side.
 

Esa

Esa

Level 4
Joined
Nov 10, 2010
Messages
79
Allrighty, here it is.

That map is still in VERY early stage, so pls don't go hard on me ;p
 

Attachments

  • Lane Survival V1.1.0 by Esa.w3x
    157.2 KB · Views: 46
Last edited:
Level 6
Joined
Mar 29, 2004
Messages
109
Raven0's suggestion is the one I would follow. The way you have it set up, every time a unit enters a region it fires off 8 "If Then Else" Statements. When I use Pathing triggers I favor small ones that work in tandem instead of one big fat memory hog.

I have experimented with Makers' system as well and it works for fast moving units when they just clip the corner of the region and trigger a large complicated routine.

If I could ask you a question: Do you ever get units stopping or pausing for a few seconds while they process their orders? Cause I do and it's annoying. Do you have any experience mitigating that kind of thing?
 

Esa

Esa

Level 4
Joined
Nov 10, 2010
Messages
79
I did follow his tips, and it's no longer one huge "hog" of triggers. ^_^ I've created a single trigger for each transition, ie. "West WP1 to West WP2". It still doesn't work, actually it made it even more buggy. The map is there for you to see, in my previous post.
 

Esa

Esa

Level 4
Joined
Nov 10, 2010
Messages
79
Anyone given this a look after I attached my map? I'm kindof helpless here.
 

Esa

Esa

Level 4
Joined
Nov 10, 2010
Messages
79
Fixed it! It worked with the solution someone suggested with surrounding layers of regions. Will give +rep =)
 
Last edited:
Status
Not open for further replies.
Top