First create a new validator with type Player Compare Resource and set the following fields:
Compare: Greater Than Or Equal To
Resource: Vespene Which resource?
Value: 300 How much resource do you need?
Next create a behavior with type Buff and set the following fields:
Validator (Remove): Set this to the validator you just created.
This will remove the behavior if the validator is false(Less than 300 vespene).
Now create a effect with type Apply Behavior give it the same name as the behavior you just created.
This way the field Behavior will automaticly get filled in.
And set the field Validator to the validator you created.
Create another behavior with type Buff again and set the following fields:
Effect - Periodic: Set this to the effect you just created.
Period: This should be something very low, like 0.1.
Last to create is the Requirement. Create one Tech Type to Unit. Don't know if this field actually matters.
Now double click on the field Requirement+ and it opens a new window. Add a node under Use and set the following fields:
Type: Count Behavior
Alias: Set this to the first behavior you created.
State: Completed
Tooltip: This will be the red message that is displayed when this requirement is not met. Example: You require atleast 300 vespene gas.
Two things left to do now is adding the first behavior you created to a unit like the command center or the supply depot or both. Now go to the abilities tab and go to the train ability of the unit (Example: Barracks - Train). Go to the Info+ field and select a unit and add your requirement under Info - Button - Requirements.
What actually happens is: The first behavior uses a effect. The effect applies the second behavior if the validator is true. And the second behavior will be removed again if the validator is false.
The requirement will check for a second behavior and with that it will unlock the unit.
First create a new validator with type Player Compare Resource and set the following fields:
Next create a behavior with type Buff and set the following fields: Validator (Remove): Set this to the validator you just created. This will remove the behavior if the validator is false(Less than 300 vespene).
Now create a effect with type Apply Behavior give it the same name as the behavior you just created. This way the field Behavior will automaticly get filled in. And set the field Validator to the validator you created.
Create another behavior with type Buff again and set the following fields:
Last to create is the Requirement. Create one Tech Type to Unit. Don't know if this field actually matters. Now double click on the field Requirement+ and it opens a new window. Add a node under Use and set the following fields:
Two things left to do now is adding the first behavior you created to a unit like the command center or the supply depot or both. Now go to the abilities tab and go to the train ability of the unit (Example: Barracks - Train). Go to the Info+ field and select a unit and add your requirement under Info - Button - Requirements.
What actually happens is: The first behavior uses a effect. The effect applies the second behavior if the validator is true. And the second behavior will be removed again if the validator is false.
The requirement will check for a second behavior and with that it will unlock the unit.
There ya go! Have Fun.