[Solved] Pick Unit Not Equal To Creep?

Status
Not open for further replies.
Level 3
Joined
Mar 8, 2024
Messages
10
I need to pick units in a region that are not "creeps".

In the region there are both units trained the usual way and units purchased in a mercenary camp.
I need to pick only the units trained the usual way.

The units purchased are all random creeps belongings to the tileset, so their race in the object editor is creep. I tried to make a Race Comparison but creep is not available, only Human, Orc, Night Elf, and Demon.

I would love an idea or maybe a solution because i cant seem to figure it out.

I will try and post my triggers when im back at my pc.
 
Okay, figured it out myself. I will just create a unit group and add units purchased from the merc camp to it. Then pick every unit not in that group.
Cant delete the thread, så i will just say i figured it out.
 
You can also use abilities to act as an infinite number of pseudo-classifications. For example, copy and paste Storm Hammers, set it's Art button positions to 0, -11 so it's hidden, and add it to the Abilities field for your desired units in the Object Editor. Now you can efficiently check for the "classification" in your triggers:
  • Conditions
    • (Level of Dragon (Classification) for (Triggering unit)) Greater than 0
Another neat thing here is that you can modify the Level of the ability to get further control. For example, at the default Level of 1 we know that it's a standard dragon but at Level 2+ it could represent our "super" dragon boss that has special rules.

Lastly, you can bypass the Abilities limit in the Object Editor by holding shift when opening the field, so there shouldn't be any issues stopping you from doing this.
 
Status
Not open for further replies.
Back
Top