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

Patrolling a unit group in linear formation

Status
Not open for further replies.
Level 6
Joined
Apr 14, 2017
Messages
134
Use a trigger to make them go from the place they are originally located to a region or a point which is exactly parallel to their original location

Trigger will look something like this:

  • Untitled Trigger 001
    • Events
    • Conditions
    • Actions
      • Unit - Order Footman 0004 <gen> to Move To (Center of Region 000 <gen>)
 

Jampion

Code Reviewer
Level 15
Joined
Mar 25, 2016
Messages
1,327
You probably need to determine the relative position to the center of the unit group of each unit within the unit group and then order each unit to move to a point depedning on its relative position in the unit group.

For partially blocked terrain or a non linear path, the units will still not move perfectly in formation.

For the best result you probably have to make periodic checks and reorder them to new locations periodicaly, which is not that easy and very inefficient.
 

Rem

Rem

Level 7
Joined
Apr 12, 2017
Messages
230
This is very basic. All you have to do is line the footman right and make sure they all stay on a straight path, good timing is the key to making it work,
 
Level 11
Joined
Jun 2, 2004
Messages
849
Due to the way the pathing engine works I found it difficult to maintain formation over long distances. My system ended up having to constantly issue short move orders (no more than ~1300 distance units) to keep them from bunching up and fanning out.
 
Status
Not open for further replies.
Top