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

Pick units in unit group - including those with locust?

Status
Not open for further replies.
Level 11
Joined
Dec 8, 2006
Messages
334
Hi, is there a way for picking all the units in the unit group, including those with the ability locust?

When I, for example, pick all the units in radius around my hero, or all the units in a certain region, the units with locust ability are left unpicked... Which is awesome in most cases, but not in this one :C
 
When you create a unit with the locust ability, add it in a global group, e.g. "LocustGroup" (Variable type: Unit Group). When you want to pick them in range, pick every unit in the LocustGroup as well, and Set Point2 = (Position of (Picked unit)), while Point1 = (Position of (Triggering unit)) [or Target point of ability being cast, etc.] and make a real comparison, if the distance between the points is greater than or equal to the ability's range; if it is, perform the actions.
 
First of all increase the loop to 0.03 - 0.05, it's still smooth. Secondly, I don't think there is another way here :/
You could also work with regions if you want, save a group to each region, check where the main unit is when it casts the spell (Boolean comparison, Unit is in region), check what region is that and load the saved group handle. Then, follow the method that I mentioned.
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
A way to 'simulate' it would be:

- Set Collision Size to 0 (Removes Collision)
- Set Selection Scale to -1, (Removes Health Bar)
- Add Invulnerable... (Makes them Invulnerable)

You could trigger that, if a player picks one of these units, de-select it...

Anyway, Pharaoh_ solution seems better if the units really need the 'Locust'
 
Status
Not open for further replies.
Top