• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Manipulating Acquisition range with triggers

Status
Not open for further replies.
Level 4
Joined
Nov 13, 2019
Messages
47
I'm trying to get my ranged units to not attack on sight. I need them to have 2000 range so default acquisition range is also 2000, otherwise they walk up to the target before attacking. Ideally I want them to do nothing at all, not even counterattack unless ordered to.

I read somewhere that if you adjust the acquisition range with triggers, the units keep their long attack range, but acquisition range can be shortened. However when I try to

  • Unit - Set AttackerUnitStack6 acquisition range to 1.00
Nothing happens! It stays at 2000

yDZJSbu.png


Anyone dealt with this before?
 
Level 4
Joined
Nov 13, 2019
Messages
47
Pause the unit.
I tried this, but it's not a complete solution. Enemies are always within range and unit still attacks when it gets unpaused at some point.

You can also add the Cargo Hold ability to disable attacks.
Really? How would that work?

Edit: Tried cargo hold, might be on to something there if I combine all the techniques somehow. Will experiment.
 
Last edited:

Uncle

Warcraft Moderator
Level 63
Joined
Aug 10, 2018
Messages
6,456
Some options:
Disarm the unit:
  • Unit - Add Cargo Hold (Orc Burrow) to (Triggering unit)
Ensnare the unit:
Have a Dummy unit cast a custom Ensnare ability on the units. Hide the net effect, adjust the attack range, etc... Then remove the buff whenever you want the unit to move/attack.

Pause the unit:
  • pause
    • Events
      • Player - Player 1 (Red) types a chat message containing Pause as An exact match
    • Conditions
    • Actions
      • Set TempUnit = Paladin 0001 <gen>
      • Unit - Pause TempUnit
This next option can be pretty useful. It's a triggered "Stun". This is useful for slide/dash/leap abilities that play an animation while the unit moves towards a direction.
  • stun on
    • Events
      • Player - Player 1 (Red) types a chat message containing Stun On as An exact match
    • Conditions
    • Actions
      • Set TempUnit = Paladin 0001 <gen>
      • Animation - Change TempUnit prop window angle to 0.00
      • Animation - Change TempUnit turn speed to 0.00
      • Unit - Add Cargo Hold (Orc Burrow) to TempUnit
      • Unit - Order TempUnit to Stop
      • Unit Group - Add TempUnit to StunUnitGroup
  • stun off
    • Events
      • Player - Player 1 (Red) types a chat message containing Stun Off as An exact match
    • Conditions
    • Actions
      • Set TempUnit = Paladin 0001 <gen>
      • Animation - Change TempUnit prop window angle to (Default prop window angle of TempUnit)
      • Animation - Change TempUnit turn speed to (Default turn speed of TempUnit)
      • Unit - Remove Cargo Hold (Orc Burrow) from TempUnit
      • Unit Group - Remove TempUnit from StunUnitGroup
  • stun interrupt cast
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • ((Triggering unit) is in StunUnitGroup) Equal to True
    • Actions
      • Set TempUnit = (Triggering unit)
      • Unit - Pause TempUnit
      • Unit - Order TempUnit to Stop
      • Unit - Unpause TempUnit
  • stun interrupt orders
    • Events
      • Unit - A unit Is issued an order targeting an object
      • Unit - A unit Is issued an order targeting a point
    • Conditions
      • ((Ordered unit) is in StunUnitGroup) Equal to True
      • Or - Any (Conditions) are true
        • Conditions
          • (Issued order) Equal to (Order(move))
          • (Issued order) Equal to (Order(smart))
          • (Issued order) Equal to (Order(patrol))
    • Actions
      • Set TempUnit = (Ordered unit)
      • Unit - Pause TempUnit
      • Unit - Order TempUnit to Stop
      • Unit - Unpause TempUnit
The only issue is that Instant abilities like Berserk, Divine Shield, Mana Shield, etc... can still be used. A solution would be to Silence the unit and/or disable the abilities.
 

Attachments

  • Stun Thing.w3x
    18.2 KB · Views: 18
Status
Not open for further replies.
Top