• 🏆 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!

[Trigger] Can someone help me?

Status
Not open for further replies.
Level 7
Joined
Jun 20, 2007
Messages
255
To put it short as you know you can make so a player can only build ex 1 townhall or such by triggers, but if you upgrade the building that you only can have one of you can build another one.

I need a trigger so that players can only have one town hall and cant build another one when they are upgraded to.

Thanks! :grin:
 
Level 23
Joined
Nov 29, 2006
Messages
2,482
I think
  • Player - Limit training of Town Hall to 1 for <Player>
would be enough?
But I think the icon would dissapear from the buildings list when its constructed, and then reappear once its upgraded. One can check that though.

Edit: yeah it does
 
Level 7
Joined
Jun 20, 2007
Messages
255
No because when i upgrade the townhall to a keep the player can build another townhall.

Hmm and if i would do as Dr Super Good says it would work but one problem, i dont know how to remove a structure from a ex peasant.
 
Level 11
Joined
Feb 22, 2006
Messages
752
Use triggers to detect when a town hall is built/destroyed. Make sure your trigger can also detect when any of the units that the town hall can upgrade to are destroyed also. When a hall is built, use the trigger to set unit availability of town hall to unavailable. When you detect a town hall (or keep, or castle, or w/e) is destroyed, set unit availability of town hall to available.
 
Status
Not open for further replies.
Top