• 🏆 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!

Allow to attack only "ancients"

Status
Not open for further replies.
Level 12
Joined
May 22, 2015
Messages
1,051
What have you tried so far? Try it with just "ancient" and nothing else.
 
Level 6
Joined
Jul 2, 2013
Messages
151
Haven't tried it, but I can tell you another method that will work for sure. Make a trigger and when a target is attacked, if it equals to unit type X(Ancient) or any other ancients, order the attacking unit to stop.
 
Level 7
Joined
Nov 19, 2015
Messages
283
Haven't tried it, but I can tell you another method that will work for sure. Make a trigger and when a target is attacked, if it equals to unit type X(Ancient) or any other ancients, order the attacking unit to stop.

I'm not a fan of those triggers because the units wills still try to attack the unit. Sometimes you get funny things happen. Usually better to not allow that unit to attack it in the first place.
 
Level 8
Joined
Jan 28, 2016
Messages
486
Hi ZiGoR, I think I know what you're problem is here.

I did some messing around with the editor and after a fair bit of testing, I got it to work. Well, sort of. The game engine seems to work funny when it comes to units with both attacks enabled. If Attack 1 is valid against the target (Eg: "Targets Allowed" = Ground, Organic, Etc.), then it will use that attack. Otherwise it will check if Attack 2 is valid (Eg: "Targets Allowed" = Air) and use that if possible. If both attacks cannot target the unit then obviously it won't. :at:

Also, this apparently happens to units that acquire the "Orb of X" type items/abilities (I remember reading about it somewhere here on The Hive IIRC) though I didn't test it out in the map below because I got lazy!! :ag: That and you're post was about targeting Ancients and stuff, so I didn't want to get off-topic like this post of mine.

So before I start rambling on, try the map and let me know what you think.
 

Attachments

  • Ancient Slayers.w3x
    21.8 KB · Views: 23
Status
Not open for further replies.
Top