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

Allied assistance

Status
Not open for further replies.
Level 16
Joined
Mar 26, 2004
Messages
569
When a unit is attacked, units allied to that unit within a certain range will run to it's aid. Which value do i change that with? I want allied units within 300 range to assist.

These are which i've tried changing without success:
  • Creeps - Guard Distance
  • Combat - Call for help range
  • Combat - Call for help range, creeps

EDIT: While i'm at it, how do i make gates block line of sight?
 
Last edited:
  • Call For Help
    • Events
      • Unit - A unit Is attacked
    • Conditions
    • Actions
      • Set TempLocA = (Position of (Attacked unit))
      • Unit Group - Pick every unit in (Units within 1000.00 of TempLocA matching ((((Matching unit) belongs to an ally of (Owner of (Attacked unit))) Equal to True) and ((((Matching unit) is alive) Equal to True) and ((Unit-type of (Matching unit)) Equal to Guard)))) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Current order of (Picked unit)) Equal to (Order(<Empty String>))
            • Then - Actions
              • Unit - Order (Picked unit) to Attack (Attacking unit)
            • Else - Actions
      • Custom script: call RemoveLocation(udg_TempLocA)
This trigger makes any Guards within 1000 of the attacked unit, who currently arn't doing anything to instantly attack the enemy unit.
 
Level 17
Joined
Apr 13, 2008
Messages
1,608
Gates actually do block the line of sight but just by a tiny amount in a funny way.
If you want to block the hell out of your LOS then go to Object Editor / Your Gate and look up the field: "Art - Fat Line of Sight" and set it to true.

About the 300 range to assist, I think you should set the Combat - Acqusition Range, I'm not 100% sure and I don't feel like trying it out.
 
Level 8
Joined
Nov 29, 2007
Messages
371
He said to NOT assist within 300 range.

So you need an extra condition in the above trigger:
  • If - Conditions
  • Picked unit is within 300
then leave "then" empty and put the order action in else.

[note: thats not real trigger syntax, but you'll find something similar to use]
I hope thats clear enough.

Draz

EDIT: I misread, what you need to do is reduce aquisition ranges like emperor_d3st said.
 
Status
Not open for further replies.
Top