• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Making one unit follow another

Status
Not open for further replies.
Level 24
Joined
Feb 28, 2007
Messages
3,479
Hello dudes, I wonder if and then how you can do the following example with triggers. You control one hero, but there are two more heroes who follow your hero wherever you go, but I also want them to attack enemies that get too close, so I thought perhaps a trigger like this would do the job:
  • Unit Following
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit - Order Footman 0002 <gen> to Move To (Position of Footman 0003 <gen>)
Well, I was wrong. Since he does not attack nearby enemies now and only follows the second unit, so can someone help me to make one unit follow another and start attacking hostile enemies at sight and then retain the unit following, thanks.
 
Level 17
Joined
May 6, 2008
Messages
1,598
  • Unit - Order Footman 0002 <gen> to Attack-Move to (Position of Footman 0003 <gen>)
This would do the same thing but he attacks every hostile.

Also you can go to Unit - Order unit to issue a order pointing a unit, something.

Then select patrol and select your herovariable/footman.
 
Level 23
Joined
Nov 29, 2006
Messages
2,482
When you right click on a unit in-game you will see that "patrol" is ordered. But well the unit will not patrol, just simply follow the unit instead.

you could do as well (as there are lots of suggestions you could do)...
  • Unit - Order Footman 0002 <gen> to right-click Footman 0003 <gen>
However if I remember right, follow a unit may not always attack nearby enemies
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
A patrolling unit will follow(as mentioned above) and will not return.
In addition, it will attack nearby enemies.
 
Level 24
Joined
Feb 28, 2007
Messages
3,479
Tried patrol, didnt work so well, hmm. Should it be like this or ? ::
  • Follow Trigger
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit - Order Footman 0002 <gen> to Patrol To (Position of Footman 0003 <gen>)
Now he starts to walk back every now and then, plz help.
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
Yes Huurka :)
But as patrol is a point order according to the GUI (stupid thing) use right click.
  • Unit - Order Unit2 to Right Click Unit 1
P.s. That was mentioned above.
 
Status
Not open for further replies.
Top