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

[Solved] Hostile Limitation

Status
Not open for further replies.
Level 8
Joined
Oct 6, 2022
Messages
185
Hello, can i ask how can i limit the hostile that has been created and roaming around the map by 10 and where it wouldn't affect a boss hostile? Hope anyone could help me with it
 
Level 29
Joined
Sep 26, 2009
Messages
2,596
You can use the below to limit how many units of a given type can a given player train
  • Player - Limit training of Footman to 1 for Player 1 (Red)
Creating units through triggers does not count towards the above limit, instead you would need to keep track of this yourself using variable.
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • FootmanCount Less than 10
    • Then - Actions
      • Set VariableSet FootmanCount = (FootmanCount + 1)
      • Unit - Create 1 Footman for ...
    • Else - Actions
 
Status
Not open for further replies.
Top