• 🏆 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] Custom non-custom Win/lose

Status
Not open for further replies.
Level 2
Joined
Jul 22, 2015
Messages
15
I want to remove the "Enforce win / lose conditions" trigger so that I can use a custom town hall for my custom race. BUT! I want the normal win / lose conditions still apply. So I want it so that if a player doesn't own any town halls or workers they lose. I can't figure out how to do this... I've heard people talk about unit counts, but I can't figure out how to set them up and make them apply to this sort of thing.
 
Level 21
Joined
Nov 4, 2013
Messages
2,017
Back in the old days when I was a little novice, I used to do this thing of counting the buildings you have. However, now I've discovered that you can use Integer Comparison to check the number of buildings you still have. If they are 0, you clearly lose.
The event will be "A unit Dies", the condition will be the integer comparison thing, the actions will be "Defeat".
 
Level 4
Joined
Jul 25, 2014
Messages
57
Solution

Pick every unit of the specific player in a unit group. If the picket unit is not equal to the town hall or a worker remove it from the group. If the number of picked units after this is equal to 0 make the player defeat. Also the event should be a unit dies. This way it´ll be like in real melee maps.
 
Status
Not open for further replies.
Top