I "play" here with Buildable traits. (For unit Medic from RA for Dune2000)
And I remember this post.
Main idea.
To use trait
Code: Select all
Buildable:
BuildLimit:
For example, 4 harvesters and 4 carryalls.
You can redefine harvester and carryall Buildable traits in rules.yaml file. Only Buildable traits.
When you reach maximum of units, it gives voice message:
"No room for new unit"
Code: Select all
harvester:
Buildable:
BuildLimit: 4
carryall:
Buildable:
BuildLimit: 4
Bigger code for testing.
"BuildDuration" trait builds units quickly here.
"Valued/Cost" — cheaply.
Delete after testing.
Code: Select all
harvester:
Buildable:
BuildLimit: 4
BuildDuration: 10
Valued:
Cost: 10
carryall:
Buildable:
BuildLimit: 4
BuildDuration: 10
Valued:
Cost: 10