• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[General] How to find this in GUI?

Status
Not open for further replies.
Level 19
Joined
Jan 12, 2011
Messages
1,537
Code:
(Number of units in (Units in spawn <gen>)) Less than 20


I want to know how to reach that code above I can only seem to find boolean comparisons for units and not anything resembling amount of units in a region

Also I'm using an array based system for point spawns and then removing them to avoid leaks, does the code above leak?
 
The code above leaks, it uses a a unit group.

btw, the condition you're looking for is Integer Comparison -> Unit - number of units in unit group
Thanks, also how would you make it so it doesn't leak?

Would I have to create an integer variable - > store the amount of units in the integer -> do the integer comparison >> clear the variable?
 
Would this work?
Code:
Check Angmar
    Events
    Conditions
        (Owner of Carn Dûm [Angmar] 0290 <gen>) Equal to (==) (Player((Integer A)))
        (Owner of Eastern Angmar [Angmar] 0292 <gen>) Equal to (==) (Player((Integer A)))
    Actions
        Set Gold_received[(Integer A)] = (Gold_received[(Integer A)] + 4)
        Set SpawnU[0] = (Units in Region 187 <gen> owned by (Player((Integer A))))
        Set SpawnX[0] = (Number of units in SpawnU[0])
        Game - Display to (Player group((Player((Integer A))))) the text: You control Angmar.
         Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                EnableSpawners[0] Equal to (==) True
                SpawnX[0] Less than or equal to (<=) 10
            Then - Actions
                Set Angmar[0] = (Center of Region 187 <gen>)
                Unit - Create 1 Uruk-Hai for (Player((Integer A))) at Angmar[0] facing Default building facing (270.0) degrees
                Custom script:   call RemoveLocation(udg_Angmar[0])
            Else - Actions
        Custom script:   call DestroyGroup(udg_SpawnU[0])
        Set SpawnX[0] = 0
 
Status
Not open for further replies.
Back
Top