I have a Barracks with a Behavior Buff with an Issue Order Effect which is attached to a Train Ability which makes the specified unit train periodically. Everything works perfect besides that when the supply limit is reached the units fill up the queue as they wait for supply to lost be so they can be trained. This is an issue due the fact the I have Research Abilities on the same structure for that specific unit. So in order to train research you have to cancel all the units off the queue but the moment you cancel them they re-queue due to the periodic effect. The last thing I want is the player to have to fight with the buff in order to train research.
so...
I'm looking for a validator to where I can disable the buff once the supply limit is reached or something to make it look like that's whats going on. There is a Compare Food Made validator type to where you can set a value of when to stop producing units. The problem with that is, is that it's a static value and can't be changed not even through an upgrade or research. Since supply limit always increases or decreases this is worthless.
I feel kind of stupid for completely not noticing the Compare Food Available validator type since it was easy as hell once I noticed it.
For anyone wanting to know how this is done I'll tell you.
Make a new Validator and name it whatever you like.
Set the Validator Type to Compare Food Available.
Click Ok.
Set the Compare to Greater Than.
Set the Value to 0 or 0.5 if you have a unit like Zerglings which are 0.5 supply for 1 Zergling.
Apply the Validator to where you need and you're good to go.
This works due to the Validator Type which checks how much supply is available to be filled by units. By setting the Value to 0 or 0.5 (Since Zerglings come in 2's) and the Compare to Greater Than this Validator will only return true if there is 1 or more supply available which means it returns false if there is 0 or 0.5 supply available then disabling or removing whatever you attach it to.
Okay. I'll rewrite this.
I have a Barracks with a Behavior Buff with an Issue Order Effect which is attached to a Train Ability which makes the specified unit train periodically. Everything works perfect besides that when the supply limit is reached the units fill up the queue as they wait for supply to lost be so they can be trained. This is an issue due the fact the I have Research Abilities on the same structure for that specific unit. So in order to train research you have to cancel all the units off the queue but the moment you cancel them they re-queue due to the periodic effect. The last thing I want is the player to have to fight with the buff in order to train research.
so...
I'm looking for a validator to where I can disable the buff once the supply limit is reached or something to make it look like that's whats going on. There is a Compare Food Made validator type to where you can set a value of when to stop producing units. The problem with that is, is that it's a static value and can't be changed not even through an upgrade or research. Since supply limit always increases or decreases this is worthless.
Any advice would be grateful. Thanks.
@Projekton: Go
Fixed! Thanks to... myself...
I feel kind of stupid for completely not noticing the Compare Food Available validator type since it was easy as hell once I noticed it.
For anyone wanting to know how this is done I'll tell you.
Make a new Validator and name it whatever you like.
Set the Validator Type to Compare Food Available.
Click Ok.
Set the Compare to Greater Than.
Set the Value to 0 or 0.5 if you have a unit like Zerglings which are 0.5 supply for 1 Zergling.
Apply the Validator to where you need and you're good to go.
This works due to the Validator Type which checks how much supply is available to be filled by units. By setting the Value to 0 or 0.5 (Since Zerglings come in 2's) and the Compare to Greater Than this Validator will only return true if there is 1 or more supply available which means it returns false if there is 0 or 0.5 supply available then disabling or removing whatever you attach it to.