[Spell] Ward unit that can be picked up

Level 6
Joined
May 13, 2023
Messages
72
So I have a simple ability based on Healing Ward, it creates a stationary ward that provides aura and I was hoping to make it so that the caster is able to pick the ward up, by this I mean if the caster issues left click on the ward it should pick it up and move with the auras provided by the ward.
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
Left click it? A caster can't "left click" something. This is a little vague so I assume you want this:

1) Use the normal Healing Ward ability and Unit.
2) When the caster of healing ward issues a Smart order on it (Right click), have it walk up to and "pick up" the ward.
3) A "picked" up ward becomes hidden (invulnerable, hidden off the minimap).
4) The "picked up" ward appears above the caster's head like a buff and emits it's effects from the caster.
5) The caster can cast a sub-ability to place the ward back down on the ground and repeat the process.
 
Last edited:
Level 6
Joined
May 13, 2023
Messages
72
Left click it? A caster can't "left click" something. This is a little vague but I assume you want this:

1) Use the normal Healing Ward ability and Unit.
2) When the caster of healing ward issues a Smart order on it (Right click), have it walk up and "pick up" the ward.
3) A "picked" up ward becomes hidden (invulnerable, hidden off the minimap).
4) The "picked up" ward appears above the caster's head like a buff and emits it's effects from the caster.
5) The caster can cast a sub-ability to place the ward back down on the ground and repeat the process.
yeah by left clicking I meant it like pressing A to choose the target then left click, but right clicking satifies. Would prefer without the use of sub-abilities
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
yeah, basically the caster places it like healing ward then can right click it to hold it
Okay, I'd still appreciate a little more detail but I think I get it:

1) Use the normal Healing Ward ability and Unit.
2) When the caster of healing ward issues a Smart order on it (Right click), have it walk up to and "pick up" the ward.
3) A "picked up" ward is hidden from the game.
4) The "picked up" ward appears above the caster's head like a "buff" and emits it's effects from the caster.
5) Once the ward expires, the caster loses the "buff".
 
Level 6
Joined
May 13, 2023
Messages
72
Okay, I'd still appreciate a little more detail but I think I get it:

1) Use the normal Healing Ward ability and Unit.
2) When the caster of healing ward issues a Smart order on it (Right click), have it walk up to and "pick up" the ward.
3) A "picked" up ward is hidden from the game.
4) The "picked up" ward appears above the caster's head like a "buff" and emits it's effects from the caster.
5) Once the ward expires, the caster loses the "buff".
exactly
 
Level 6
Joined
May 13, 2023
Messages
72
then the ward should just drop where the caster died, ward does have health. And you probably thought over this, but i'd like it so that the caster isnt able to hold another ward while holding 1 already meaning there can be multiple wards on the ground but the caster can hold only 1
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
Requires: GUI Unit Indexer 1.4.0.0

Only ever have one Unit Indexer in your map. Also, this system takes control of the Set Unit Custom Value action so you cannot be using that anywhere in your triggers (it offers a far better alternative). My map requires the latest patch to open.

Edit: Uploaded v2, don't use v1.

Here are the triggers:
  • HWP Setup
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • -------- The ability that summons the healing ward: --------
      • Set VariableSet HWP_Caster_Ability = Healing Ward (Witch Doctor)
      • -------- --------
      • -------- The aura ability that heals: --------
      • Set VariableSet HWP_Ward_Ability = Healing Ward Aura (Healing Ward)
  • HWP Pick Up Order
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • (Unit-type of (Target unit of issued order)) Equal to Healing Ward
      • (Level of HWP_Caster_Ability for (Ordered unit)) Greater than 0
      • HWP_Caster_In_Loop[(Custom value of (Triggering unit))] Equal to False
      • (Issued order) Equal to (Order(smart))
    • Actions
      • Set VariableSet HWP_Caster = (Ordered unit)
      • Set VariableSet HWP_Caster_ID = (Custom value of HWP_Caster)
      • -------- --------
      • Set VariableSet HWP_Caster_In_Loop[HWP_Caster_ID] = True
      • Set VariableSet HWP_Caster_Has_Ward[HWP_Caster_ID] = False
      • Set VariableSet HWP_Ward[HWP_Caster_ID] = (Target unit of issued order)
      • -------- --------
      • Unit Group - Add HWP_Caster to HWP_Group
      • Set VariableSet HWP_Group_Size = (HWP_Group_Size + 1)
      • Trigger - Turn on HWP Periodic Loop <gen>
      • Trigger - Turn on HWP Cancel Order <gen>
      • Trigger - Turn on HWP Caster Or Ward Dies <gen>
  • HWP Periodic Loop
    • Events
      • Time - Every 0.20 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in HWP_Group and do (Actions)
        • Loop - Actions
          • Set VariableSet HWP_Caster = (Picked unit)
          • Set VariableSet HWP_Caster_ID = (Custom value of HWP_Caster)
          • -------- --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (HWP_Caster is alive) Equal to True
              • HWP_Caster_Has_Ward[HWP_Caster_ID] Equal to False
              • (Level of HWP_Ward_Ability for HWP_Ward[HWP_Caster_ID]) Greater than 0
            • Then - Actions
              • Set VariableSet HWP_Point[0] = (Position of HWP_Caster)
              • Set VariableSet HWP_Point[1] = (Position of HWP_Ward[HWP_Caster_ID])
              • -------- --------
              • -------- Check if it's close enough to the ward: --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Distance between HWP_Point[0] and HWP_Point[1]) Less than or equal to 128.00
                • Then - Actions
                  • Trigger - Run HWP Gain Ward <gen> (ignoring conditions)
                • Else - Actions
              • -------- --------
              • Custom script: call RemoveLocation( udg_HWP_Point[0] )
              • Custom script: call RemoveLocation( udg_HWP_Point[1] )
            • Else - Actions
  • HWP Cancel Order
    • Events
      • Unit - A unit Is issued an order targeting an object
      • Unit - A unit Is issued an order targeting a point
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (Unit-type of (Target unit of issued order)) Not equal to Healing Ward
      • HWP_Caster_In_Loop[(Custom value of (Triggering unit))] Equal to True
      • HWP_Caster_Has_Ward[(Custom value of (Triggering unit))] Equal to False
    • Actions
      • Set VariableSet HWP_Caster = (Ordered unit)
      • Set VariableSet HWP_Caster_ID = (Custom value of HWP_Caster)
      • Trigger - Run HWP Remove Caster From Loop <gen> (ignoring conditions)
  • HWP Caster Or Ward Dies
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • -------- Healing Ward Dies --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Triggering unit)) Equal to Healing Ward
        • Then - Actions
          • Set VariableSet HWP_Ward[0] = (Triggering unit)
          • Trigger - Run HWP Cleanup After Death <gen> (ignoring conditions)
        • Else - Actions
          • -------- Witch Doctor Dies (or whoever uses the healing ward) --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of HWP_Caster_Ability for (Triggering unit)) Greater than 0
            • Then - Actions
              • Set VariableSet HWP_Caster = (Triggering unit)
              • Set VariableSet HWP_Caster_ID = (Custom value of HWP_Caster)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • HWP_Caster_Has_Ward[HWP_Caster_ID] Equal to True
                • Then - Actions
                  • Set VariableSet HWP_Ward[0] = HWP_Ward[HWP_Caster_ID]
                  • Trigger - Run HWP Cleanup After Death <gen> (ignoring conditions)
                • Else - Actions
            • Else - Actions
  • HWP Cleanup After Death
    • Events
    • Conditions
    • Actions
      • Unit Group - Pick every unit in HWP_Group and do (Actions)
        • Loop - Actions
          • Set VariableSet HWP_Caster = (Picked unit)
          • Set VariableSet HWP_Caster_ID = (Custom value of HWP_Caster)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • HWP_Ward[HWP_Caster_ID] Equal to HWP_Ward[0]
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • HWP_Caster_Has_Ward[HWP_Caster_ID] Equal to False
                • Then - Actions
                  • Trigger - Run HWP Remove Caster From Loop <gen> (ignoring conditions)
                • Else - Actions
                  • Trigger - Run HWP Lose Ward <gen> (ignoring conditions)
                  • Trigger - Run HWP Remove Caster From Loop <gen> (ignoring conditions)
            • Else - Actions
  • HWP Remove Caster From Loop
    • Events
    • Conditions
    • Actions
      • Set VariableSet HWP_Caster_In_Loop[HWP_Caster_ID] = False
      • Set VariableSet HWP_Caster_Has_Ward[HWP_Caster_ID] = False
      • Set VariableSet HWP_Ward[HWP_Caster_ID] = No unit
      • -------- --------
      • Unit Group - Remove HWP_Caster from HWP_Group.
      • Set VariableSet HWP_Group_Size = (HWP_Group_Size - 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • HWP_Group_Size Equal to 0
        • Then - Actions
          • Trigger - Turn off HWP Periodic Loop <gen>
          • Trigger - Turn off HWP Cancel Order <gen>
          • Trigger - Turn off HWP Caster Or Ward Dies <gen>
        • Else - Actions
  • HWP Gain Ward
    • Events
    • Conditions
    • Actions
      • Set VariableSet HWP_Caster_Has_Ward[HWP_Caster_ID] = True
      • -------- --------
      • -------- Add aura to caster: --------
      • Unit - Add HWP_Caster_Ability to HWP_Caster
      • -------- --------
      • -------- Optional SFX: --------
      • Special Effect - Create a special effect attached to the overhead of HWP_Caster using units\orc\HealingWard\HealingWard.mdl
      • Set VariableSet HWP_Special_Effect[HWP_Caster_ID] = (Last created special effect)
      • -------- --------
      • -------- Hide ward: --------
      • Unit - Hide HWP_Ward[HWP_Caster_ID]
      • Unit - Remove HWP_Ward_Ability from HWP_Ward[HWP_Caster_ID]
      • Unit - Make HWP_Ward[HWP_Caster_ID] Invulnerable
  • HWP Lose Ward
    • Events
    • Conditions
    • Actions
      • Set VariableSet HWP_Caster_Has_Ward[HWP_Caster_ID] = False
      • -------- --------
      • -------- Remove aura from caster: --------
      • Unit - Remove HWP_Ward_Ability from HWP_Caster
      • -------- --------
      • -------- Optional SFX: --------
      • Special Effect - Destroy HWP_Special_Effect[HWP_Caster_ID]
      • -------- --------
      • -------- Unhide ward and update it's position: --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (HWP_Ward[HWP_Caster_ID] is alive) Equal to True
        • Then - Actions
          • Unit - Unhide HWP_Ward[HWP_Caster_ID]
          • Unit - Add HWP_Ward_Ability to HWP_Ward[HWP_Caster_ID]
          • Unit - Make HWP_Ward[HWP_Caster_ID] Vulnerable
          • -------- --------
          • Set VariableSet HWP_Point[0] = (Position of HWP_Caster)
          • Unit - Move HWP_Ward[HWP_Caster_ID] instantly to HWP_Point[0]
          • Custom script: call RemoveLocation( udg_HWP_Point[0] )
        • Else - Actions

Notes:
The Healing Ward (Aura) ability ignores the caster, I guess to prevent the Healing Ward from healing itself. You'll have to account for that yourself. The easiest potential solution I can think of would be to create a new copy of the ability and try to modify it's Targets Allowed. That's if you even care.
 

Attachments

  • Healing Ward Pick Up 2.w3m
    27.2 KB · Views: 4
Last edited:
Top