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

Attack Fields Dilemma

Status
Not open for further replies.
I am trying to make a Demolisher based artillery unit do the following:

-Not auto-acquire targets. I tried setting acquisition range to 0 but that seems to negate the attack range to some degree.

-Not repeat firing when ordered to attack a unit or the ground.

-If possible only allow attacking the ground. I tried setting "Show UI" to false but that seems to disable ground attacking as well.
 
About attacking the ground - what do you exactly mean?

For not repeating the auto attack command you can use simple trigger (ofcourse your unit has to have permanent insivibility set as Pharaoh_ said above):

  • init
    • Events
      • Unit - A unit is ataacked
    • Conditions
      • // stuff here if needed
    • Actions
      • Custom script: local unit u = GetTriggerUnit()
      • Wait 0.5 second
      • Custom script: call IssueImmediateOrderById(u, 851972)
      • Custom script: set u = null
It's basically stop order.
The 'wait' value should be determinated by unit's attack point animation value (the delay before attack actually lands).
 
  • Like
Reactions: Kam
I see.

The stop order needs to be triggered by the "A unit is issued an order targeting a unit/object" though. I'm dealing with an extreme ranged unit so the delay from its target being damaged could be longer than the cooldown time, or it could miss.

EDIT: It seems that (Issued order) Not equal to (Order(move)) in the condition category doesn't prevent the stop order from being issued.

EDIT 2: If I left click or use the move hot key it works, but if I right click it triggers the stop action.

  • Experimentals Restrict
    • Events
      • Unit - A unit Is issued an order targeting a point
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • (Issued order) Not equal to (Order(move))
      • (Issued order) Not equal to (Order(AImove))
      • (Issued order) Not equal to (Order(holdposition))
      • (Issued order) Not equal to (Order(attack))
      • (Issued order) Not equal to (Order(robogoblin))
      • (Issued order) Not equal to (Order(stop))
      • (Issued order) Not equal to (Order(cancel))
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Triggering unit)) Equal to Deployed Decimator
          • (Unit-type of (Triggering unit)) Equal to Behemoth
    • Actions
      • Custom script: local unit Restrict = GetTriggerUnit()
      • Wait 0.50 seconds
      • Custom script: call IssueImmediateOrderById(Restrict, 851972)
      • Custom script: set Restrict = null
 
Last edited:
Status
Not open for further replies.
Top