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

Make Units run away from Units owned by a player

Status
Not open for further replies.
Level 14
Joined
Mar 27, 2008
Messages
1,003
I've come across another problem. I can't figure out how to do this:

I need any of Player 10 (Light Blue)'s units to run away from any of Player 11 (Dark Green)'s units should Dark Green come within 750 of Light Blue. I have no idea how to do this and any help would be appreciated. Both LB and DG are NPC players (Computer) if that helps.
 
c7b569c1c355ad6a43b5fcb2e51e27de_out_zps77402a82.gif
 
You could remove the leak and have no lag at all, by the way.
If the detected unit is owned by P11, order the looped unit to move to position of looped unit offset by x towards angle from position of detected unit to position of looped unit
Wait. So if there are multiple detected units, the unit will run from the last picked right?
 
Wait. So if there are multiple detected units, the unit will run from the last picked right?
Possibly, but I think it shouldn't happen often.
anyway, here's how I make Maker's suggestion into a test map. If it bugs, I will use another method.
 

Attachments

  • AI Run.w3x
    17.3 KB · Views: 50
Status
Not open for further replies.
Top