Go to requirements tab in data editor and create new requirement. Let's name it "hero complete".
Select it and on you right you will see "use" and "show".
Right click "show" and add new element. Pick "not" from the list .
Right click "not" and create new element, this time select "or".
Right click "or" and create 4 elements for it "compare unit count".
In each element choose each of your heroes and set it as "queued or better" or "completef".
Go to train ability of your heroes, scroll down to requirements and find "hero completed".
This makes the train button for your heroes dissapear if you start training one (if you chose queued or better) or have one on the map (if you chose completed).
If you want the button greyed out instead, do the same thing but create new elements in requirement under "use", not "show", so it looks like "use - not - or - 4 heroes, queued or better/ completed"
There is a somewhat simpler way to do this, and also scales a bit better.
In the Unit, there is a field called "Tech Alias". You can assign a name (it can be anything). Anything with the same alias will be counted in Requirements. In the requirement, instead of checking if every hero is 0, just check for the tech aliase (it will appear once you create it on a unit).
The advantage of this is once you setup the requirement, you will not need to change it each time a new hero is added, just add the alias to the new hero.
I have created a hero, and its requirement to prevent multiple of the hero being created by the player.
How do I modify the requirement so that the other 3 heroes cannot be created if the player already has a hero.
I presume a requirement would look like this:
show
not
or
- count unit hero 1 completed
- count unit hero 2 completed
- count unit hero 3 completed
Yep Dont know what you're trying to tell me
better give all your heroes an unique buff. the requirement counts this buff
@iMisu: Go
Go to requirements tab in data editor and create new requirement. Let's name it "hero complete". Select it and on you right you will see "use" and "show".
Right click "show" and add new element. Pick "not" from the list .
Right click "not" and create new element, this time select "or".
Right click "or" and create 4 elements for it "compare unit count". In each element choose each of your heroes and set it as "queued or better" or "completef".
Go to train ability of your heroes, scroll down to requirements and find "hero completed".
This makes the train button for your heroes dissapear if you start training one (if you chose queued or better) or have one on the map (if you chose completed). If you want the button greyed out instead, do the same thing but create new elements in requirement under "use", not "show", so it looks like "use - not - or - 4 heroes, queued or better/ completed"
Thank you NazaraSC2, These are good instructions.
There is a somewhat simpler way to do this, and also scales a bit better.
In the Unit, there is a field called "Tech Alias". You can assign a name (it can be anything). Anything with the same alias will be counted in Requirements. In the requirement, instead of checking if every hero is 0, just check for the tech aliase (it will appear once you create it on a unit).
The advantage of this is once you setup the requirement, you will not need to change it each time a new hero is added, just add the alias to the new hero.
Removed Comment
Thank you Naz.