Set Unitgroup with Locust units

Leazy

You can change this now in User CP.
Reaction score
50
Hello!
I would like to set this unitgroup:
Code:
Set General_Unitgroup[2] = (Units within 40.00 of General_Point[1] matching (((Unit-type of (Matching unit)) Equal to Flame [For Blaze]) and ((Owner of (Matching unit)) Equal to (Owner of (Picked unit)))))

The problem is that the ''Flame [For Blaze]'' have locust, and from my experiences locust units can only be added to a unit group by this:
Code:
Set General_Unitgroup[2] = (Units of type Flame [For Blaze])

Is there another way? Maybe in custom scripts or something likely? (I want to do the top part, but the units aren't picked when I pick every unit in that unit group and I think it's because they have locust).
 

Leazy

You can change this now in User CP.
Reaction score
50
I tried this:

Trigger:
  • Set General_Unitgroup[2] = (Units owned by (Owner of (Picked unit)) of type Flame [For Blaze])
    • Unit Group - Pick every unit in General_Unitgroup[2] and do (Actions)
      • Loop - Actions
        • Set General_Point[2] = (Position of (Picked unit))
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Distance between General_Point[2] and Blaze_Position[(Player number of (Owner of (Picked unit)))]) Greater than 40.00
          • Then - Actions
            • Unit Group - Remove (Picked unit) from General_Unitgroup[2]
          • Else - Actions


Doesn't work though =/ How should I do?
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,494
> How should I do?

No idea...
For that, we'd have to know what this is supposed to do, and where all those variables are coming from.
And, of course, what it is doing instead.
 

Leazy

You can change this now in User CP.
Reaction score
50
Alright. I want to create a unit group with all blaze units in 40 range of General_Point[2] (point variable) and that are owned by owner of picked unit. Blaze units have locust. What would be the best way to accomplish this?
 

moyack

Cool Member
Reaction score
9
the problem is that Picked unit and Filtering unit won't get units with locust. A solution is to group units and iterate through them using FirstOfGroup() function in a loop. But as far as I remember this option is not accesible through GUI.

Here's when you say "Why I haven't learn jass?" :p
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top