so, If I wanted to add a new unit to the barracks. For instance this new "blue spy" unit, or even an ant. How would I do that?
been looking through the files and im just not figuring it out
Adding a unit to the barracks
Re: Adding a unit to the barracks
In your unit's .cfg file, you'll want to have code that looks like this.
This defines what builds a grunt, how much it costs, what is required to build it, etc.
Code: Select all
Constructor("army.building.barracks1");
ConstructionTime(10);
CreateSource("resource.blob.infantry1");
CommandCost(1);
ResourceCost()
{
Add("Plastic", 50);
Add("Electricity", 0);
}
Prereqs()
{
Add("army.building.barracks1");
}
- Constructor("army.building.barracks1"); - This is what building will build your unit.
- ConstructionTime(10); - This is how long in seconds it takes to build your unit.
- CreateSource("resource.blob.infantry1"); - This is what plastic blob your unit will create upon death.
- CommandCost(1); - This is how many points towards the unit limit your unit will count. Best to leave this at 1.
- ResourceCost() - This is how much your unit costs to build.
- Prereqs() - Anything listed here must be build before you are allowed to build your unit.
I may not make the best maps, or be the best player, but I put a lot of time, effort, and care into my stuff. That counts for something, right? No.
"Can we order a pizza?"
GameRanger ID: 913974
"Can we order a pizza?"
GameRanger ID: 913974
Who is online
Users browsing this forum: No registered users and 0 guests