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

How to set max amount of buildable units/buildings

Status
Not open for further replies.
Level 2
Joined
Sep 15, 2013
Messages
11
Ok i want some of my buildings buildable once(if they are destroyed,they will be buildable).How to do this?
 
Level 13
Joined
Mar 24, 2013
Messages
1,105
Begins construction

Make Building X unavailable for building for player Y
Set BuildingXBoolean == True

Unit Dies

If BuildingXBoolean == False
If unit type of triggering == Building X

Make Building X available for building for player Y
Set BuildingXBoolean == False


Something to this effect
 
Level 2
Joined
Sep 15, 2013
Messages
11
Begins construction

Make Building X unavailable for building for player Y
Set BuildingXBoolean == True

Unit Dies

If BuildingXBoolean == False
If unit type of triggering == Building X

Make Building X available for building for player Y
Set BuildingXBoolean == False


Something to this effect[/QUUhm fotgoth to say i know very little of triggering.So i don't understand a thing you just said(or wrote in this case).I would be nice if you could give me a picture of how it would look in trigger editor.
 
Level 2
Joined
Sep 15, 2013
Messages
11
I believe there's an easier way. There's an action for this:

  • Player - Limit training of Footman to 3 for Player 1 (Red)


Ok i want to do this for a building like a farm/tent...stuff like that.And is there a Event/COndition that i have to put???
 
Level 25
Joined
May 11, 2007
Messages
4,650
Create a unit named "Max 3"
set this unit as the requirement for the building you want to limit to 3.
On map init, create this unit for the player.

Then have a trigger that checks when the player builds the building, when >= 3, kill the unit.

Then have a trigger for when the player loses the building, then create the unit again.
The condition you seek is "Unittype of triggering unit equal to Building of Awesomeness".
 
Level 2
Joined
Sep 15, 2013
Messages
11
Well all this doesnt help very much beacuse i don't know how to use trigger editor very well(started like a week ago).
It would be nice if you could give me the picture like the one darwin posted(just the enitre picture with events and conditions if there are suppose to be any)
 
Level 25
Joined
May 11, 2007
Messages
4,650
They say a picture says more than 1000 words. I wonder how many a map says?
Just check the trigger editor for help on how everything is setup. Also includes a small tutorial on leaks and a sell ability.

Good luck!
 

Attachments

  • DzBuildingLimit.w3x
    20.1 KB · Views: 64
Status
Not open for further replies.
Top