• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Solved] [Condition: Number of Units in Region Matching Condition] doesn't work with Locust

Status
Not open for further replies.
Level 5
Joined
Jun 25, 2005
Messages
92
I have a dummy unit with locust and a dummy ability called "DoorCloseOpenPrevention". I also have a trigger with a condition counting the number of units with that ability in a region, but it doesn't seem to consider units with locust.
Together, they're there purely to register that a gate has been killed, by being spawned onto the gate and then being checked whether it's there, but this doesn't work, because units with locust aren't counted, I think.

How can I check for (count) units with an ability in a region, if the unit has locust?


The condition is:
Code:
(Number of units in (Units within TempReal2 of TempPoint2 matching ((Level of DoorCloseOpenPrevention  for (Matching unit)) Equal to 1))) Equal to 0
 
Level 11
Joined
Nov 23, 2013
Messages
665
Maybe you can remove locust ability from units who have it, then count units in region, then give back locust ability to units who need it. If there is no wait between these three actions, I guess it should be instant.
 
Level 13
Joined
May 10, 2009
Messages
868
Well, I assume those dummy units don't have any special effect attached to them. So, another way of detecting them would be creating a new unit type in the object editor that does not have Locust ability, nor a proper model file. Players won't be able to select them, and they won't have HP bars either. Just don't forget to remove their icon from the minimap, and give invulnerability to them.
 
Status
Not open for further replies.
Top