• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Solved] Restricting units from picking up items

Status
Not open for further replies.
Level 33
Joined
Mar 27, 2008
Messages
8,035
  • Melee Initialization
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Claws of Attack +15
      • (Unit-type of (Triggering unit)) Equal to Footman
    • Actions
      • Hero - Drop (Item being manipulated) from (Triggering unit)
This trigger prevents Footman from getting Claws of Attack +15.
 
Level 3
Joined
Oct 29, 2013
Messages
51
also do u know if theres a way to limit the amount of buildings you can make like for example I want it so you can only build on town hall so even if you have enough resources for another it wont allow it
 
Level 3
Joined
Oct 29, 2013
Messages
51
thank you but im trying to make so you can only have one of a certain building at a time like only one town hall you cant keep building them just one at a time unless it gets destroyed
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
If it only has 1 limit, you just do the direct trigger function without comparison, else use Integer as a comparison.

Here's a test map.

You can only have a limit of 1 Town Hall and 3 Barracks.
 

Attachments

  • Limit Building.w3x
    13.4 KB · Views: 47
Status
Not open for further replies.
Top