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

[General] unit trying to reach something they can't and stuck

Level 4
Joined
Oct 9, 2016
Messages
49
hi guys ,how to i prevent these zombies stop trying to attack uphill units that they have no way to reach and focusing attack the walls instead
So far i have tried

-set the priorities on walls to 1 ,other higher
-give them vision across the map
-give wall attack
-changed the wall armor to divine as they tend to ignore fortified
none of these worked
my last resort will be giving the walls taunt but i need help on how to make it auto castable.

terrain_agro.png
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,872
Priority has to do with the icon order when multiple units are selected, hero > caster > dps.

Anyway, a few questions to answer before coming up with a solution:
How do you create the zombies?
How do you create the walls?
 
Last edited:
Level 4
Joined
Oct 9, 2016
Messages
49
Priority has to do with the icon order when multiple units are selected, hero > caster > dps.

Anyway, a few questions to answer before coming up with a solution:
How do you create the zombies?
How do you create the walls?
1737706153204.png

this is the trigger im using

As for the walls they are build by the workers , there are also ready built from the start
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,872
I'm surprised your solutions didn't work...

But how about something like this:
  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Attack Me
  • Actions
    • Set Caster = (Triggering unit)
    • Set TempPoint = (Position of (Target unit of ability being cast))
    • Set TempGroup = (Units within 300.00 range of TempPoint)
    • Unit Group - Pick every unit in TempGroup and do (Actions)
      • Loop - Actions
        • Set Target = (Picked unit)
        • If all conditions are true then do Actions
          • If - Conditions
            • (Target belongs to an enemy of (Owner of Caster)) Equal to True
            • (Current order of Target) Equal to (Order("attack"))
          • Then - Actions
            • Unit - Order Target to Attack Caster
          • Else - Actions
    • Custom script: call RemoveLocation( udg_TempPoint )
    • Custom script: call DestroyGroup( udg_TempGroup )
Attack Me is an Autocast ability with say 500 cast range, 0 mana cost, and a 5 second cooldown. It can be based on Faerie Fire with a Duration of 0.001 seconds and no negative effects. If you set it's Art - Button positions to 0, -11 it should be hidden from the command card. I believe you can still toggle it's Autocast on by Default or use triggers to turn Autocasting on while it's hidden this way.
 
Last edited:
Level 4
Joined
Oct 9, 2016
Messages
49
I'm surprised your solutions didn't work...

But how about something like this:
  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Attack Me
  • Actions
    • Set Caster = (Triggering unit)
    • Set TempPoint = (Position of (Target unit of ability being cast))
    • Set TempGroup = (Units within 300.00 range of TempPoint)
    • Unit Group - Pick every unit in TempGroup and do (Actions)
      • Loop - Actions
        • Set Target = (Picked unit)
        • If all conditions are true then do Actions
          • If - Conditions
            • (Target belongs to an enemy of (Owner of Caster)) Equal to True
            • (Current order of Target) Equal to (Order("attack"))
          • Then - Actions
            • Unit - Order Target to Attack Caster
          • Else - Actions
    • Custom script: call RemoveLocation( udg_TempPoint )
    • Custom script: call DestroyGroup( udg_TempGroup )
Attack Me is an Autocast ability with say 500 cast range, 0 mana cost, and a 5 second cooldown. It can be based on Faerie Fire with a Duration of 0.001 seconds and no negative effects. If you set it's Art - Button positions to 0, -11 it should be hidden from the command card. I believe you can still toggle it's Autocast on by Default or use triggers to turn Autocasting on while it's hidden this way.
thank you for your help but i don't know how to make a custom script
 
Level 5
Joined
Jun 24, 2024
Messages
59
Maybe give this a try: set their Acquisition range very low and change the "Fog reveal Radius - Attacking" Unit (in Advanced -> Gameplay constants) 0 so they don't know they get attacked. Remember also, that you don't give the Zombie Player any map vision via trigger. This may they are completely blind and obey attack orders.
 
Level 4
Joined
Oct 9, 2016
Messages
49
I'm surprised your solutions didn't work...

But how about something like this:
  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Attack Me
  • Actions
    • Set Caster = (Triggering unit)
    • Set TempPoint = (Position of (Target unit of ability being cast))
    • Set TempGroup = (Units within 300.00 range of TempPoint)
    • Unit Group - Pick every unit in TempGroup and do (Actions)
      • Loop - Actions
        • Set Target = (Picked unit)
        • If all conditions are true then do Actions
          • If - Conditions
            • (Target belongs to an enemy of (Owner of Caster)) Equal to True
            • (Current order of Target) Equal to (Order("attack"))
          • Then - Actions
            • Unit - Order Target to Attack Caster
          • Else - Actions
    • Custom script: call RemoveLocation( udg_TempPoint )
    • Custom script: call DestroyGroup( udg_TempGroup )
Attack Me is an Autocast ability with say 500 cast range, 0 mana cost, and a 5 second cooldown. It can be based on Faerie Fire with a Duration of 0.001 seconds and no negative effects. If you set it's Art - Button positions to 0, -11 it should be hidden from the command card. I believe you can still toggle it's Autocast on by Default or use triggers to turn Autocasting on while it's hidden this way.
i did this but its doesnt really work , they would respond but once they gets attack a second time they would immediate switch the target to the upper cliff unit that are attacking them
 
Level 4
Joined
Oct 9, 2016
Messages
49
Maybe give this a try: set their Acquisition range very low and change the "Fog reveal Radius - Attacking" Unit (in Advanced -> Gameplay constants) 0 so they don't know they get attacked. Remember also, that you don't give the Zombie Player any map vision via trigger. This may they are completely blind and obey attack orders.
tried , doesn't ,work
 
Level 12
Joined
Nov 13, 2010
Messages
277
try with with this
  • Untitled Trigger 001
    • Events
      • Time - Every 6.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units owned by Player 10 (Light Blue).) and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to Attack-Move To (Random point in your town hall <gen>) ( or add the building they need to kill for you to lose )
 
Top