Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Manipulating Acquisition range with triggers

Discussion in 'World Editor Help Zone' started by Ghullie, Nov 27, 2019.

  1. Ghullie

    Ghullie

    Joined:
    Nov 13, 2019
    Messages:
    47
    Resources:
    0
    Resources:
    0
    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

    [​IMG]

    Anyone dealt with this before?
     
  2. Tasyen

    Tasyen

    Joined:
    Jul 18, 2010
    Messages:
    1,690
    Resources:
    37
    Tools:
    2
    Maps:
    3
    Spells:
    11
    Tutorials:
    20
    JASS:
    1
    Resources:
    37
    Yes, I did. That action ignores calls using a value below a certain limit. I think it was 64.
     
  3. Wrda

    Wrda

    Joined:
    Nov 18, 2012
    Messages:
    1,309
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    Try to put acquisition range to 100 or something like that.
     
  4. Ghullie

    Ghullie

    Joined:
    Nov 13, 2019
    Messages:
    47
    Resources:
    0
    Resources:
    0
    Thanks that worked, however it could be a problem. I need them to do nothing no matter how close enemy units are :/
     
  5. lolreported

    lolreported

    Joined:
    Aug 16, 2007
    Messages:
    841
    Resources:
    13
    Tools:
    1
    Maps:
    6
    Spells:
    6
    Resources:
    13
    Pause the unit.
     
  6. Pyrogasm

    Pyrogasm

    Joined:
    Feb 27, 2007
    Messages:
    3,788
    Resources:
    1
    Spells:
    1
    Resources:
    1
    You can also add the Cargo Hold ability to disable attacks.
     
  7. Ghullie

    Ghullie

    Joined:
    Nov 13, 2019
    Messages:
    47
    Resources:
    0
    Resources:
    0
    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.

    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: Nov 27, 2019
  8. Wrda

    Wrda

    Joined:
    Nov 18, 2012
    Messages:
    1,309
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    Cargo hold with 0 capacity
     
  9. Pyrogasm

    Pyrogasm

    Joined:
    Feb 27, 2007
    Messages:
    3,788
    Resources:
    1
    Spells:
    1
    Resources:
    1
    Classifying the units as builders might help you too, since builders do not aggro by default.
     
  10. kentzeus

    kentzeus

    Joined:
    Jul 4, 2007
    Messages:
    223
    Resources:
    0
    Resources:
    0
    How does this work? I tried making one based on the goblin zeppelin and ship ones but nothing happened when I gave it to a unit.
     
  11. Wrda

    Wrda

    Joined:
    Nov 18, 2012
    Messages:
    1,309
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    Orc burrow cargo hold.
     
  12. Uncle

    Uncle

    Joined:
    Aug 10, 2018
    Messages:
    2,362
    Resources:
    0
    Resources:
    0
    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.
     

    Attached Files:

  13. Pyrogasm

    Pyrogasm

    Joined:
    Feb 27, 2007
    Messages:
    3,788
    Resources:
    1
    Spells:
    1
    Resources:
    1
    Silence can also disable attacks, so it's a good choice here.