• 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] Stop to attack!

Status
Not open for further replies.
Level 2
Joined
Aug 29, 2013
Messages
13
Hi guys, i have a problem with my units. So i making a map in 3° person and my unit when "see" enemy units start to charge it. this is normal and usefull for normal WC maps but not for me, what i must do for stay quite my unit? :vw_wtf:
Thanks for help!
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
there are multiple approaches for this problem.

First would be to change the Aquiration range of units to lower values in Object Editor or by Triggers. However the problem is that this will mess up your ranged units, because no matter how big Attack Range they have, they will always be able to attack only targets that are closer than Aquiration range.

Second approach is to check with triggers, with even Unit - Unit attacks unit and check the distance from the attacker to attacking unit, if it is under your desired value, you let him attack, if it is further than you want, you will order the unit to stop. This may mess up with unit orders a bit tho and Im not sure that it will not mess up when you "Smart" enemies(Right click them)
 
Status
Not open for further replies.
Top