• 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.

Unit protects carriage.

Status
Not open for further replies.
Level 14
Joined
Jul 12, 2011
Messages
1,371
Hey people.
Any ideas on how I can make an AI unit protect a moving carriage?
The unit has spells which he casts while in combat (controlled by AI).
I want the unit to move next to the carriage and protect it with his life (spells, attack e.t.c.)
Thanks.
 
Level 12
Joined
May 22, 2015
Messages
1,051
Hmm it might not be everything you want, but if you right click a unit onto an allied unit, it will follow them and attack whatever they attack. I don't know if it will work in this situation, but might be helpful.

You just give the unit the order "smart" targeting the carriage. The unit will trail behind it but I think it should attack anything that gets close.
 
Level 14
Joined
Jul 12, 2011
Messages
1,371
Hmmm...
Will that do the trick:
  • Unit - Order Expert Mage 0012 <gen> to Follow Wagon 0003 <gen>
?

Edit:
Made it:
  • Cheval protects wagon
    • Events
      • Time - Every 4.00 seconds of game time
    • Conditions
    • Actions
      • Set Point008 = (Position of Wagon 0003 <gen>)
      • Unit - Order Expert Mage 0012 <gen> to Attack-Move To Point008
      • Custom script: call RemoveLocation (udg_Point008)
Thanks for your help. Your idea really helped me :grin: .
+2rep:goblin_yeah:
 
Last edited:
Status
Not open for further replies.
Top