• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Solved] Hostile Limitation

Level 7
Joined
Oct 6, 2022
Messages
135
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 25
Joined
Sep 26, 2009
Messages
2,387
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
 
Top