• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Unit protects carriage.

Status
Not open for further replies.
Level 14
Joined
Jul 12, 2011
Messages
1,370
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,370
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