Using cockroaches as units?
Posted: Sat May 21, 2011 11:21 pm
So I've been attempting to make the cockroach as a unit and set the correct "constructor" values, but the roach won't appear on the HQ's menu. Could anyone please tell me how to solve this issue?
Btw here's a copy of my modified cockroach
Btw here's a copy of my modified cockroach
Code: Select all
///////////////////////////////////////////////////////////////////////////////
//
// Pandemic Studios
//
#include "fx_insect_unit_cockroach.cfg"
// UNIT
CreateObjectType("insect.unit.cockroach", "Unit")
{
GameObj()
{
ThinkInterval(1);
IdleTask("Tasks::UnitIdle");
Properties()
{
Add("Filter::Army");
Add("Filter::Biological");
Add("Filter::Unit");
Add("Filter::Weapon");
Add("Filter::Heroes");
Add("Filter::Transportable");
}
}
MapObj()
{
GodFile("cockroach.god");
PhysicsModel("Walker");
TractionType("ground");
GrainSize(1);
ArmourClass("infantry");
HitPoints(300);
TypeDisplay()
{
Image("if_game_portraits.tga", 86, 86, 43, 43);
Mode("Centre");
}
GenericFX()
{
Add("Weapon::Fire", "weapon.cockroach.fire");
Add("MapObj::Death", "death.cockroach.worker");
Add("Restore::Target::Process", "restore-small");
Add("MapObj::AddToMap2", "restore-small-puff");
}
}
UnitObj()
{
TopSpeed(50);
TurnSpeed(1440);
SeeingRange(81);
Weapon("insect.weapon.cockroach");
}
}
Constructor("army.building.hq1");
ConstructionTime(1);
CreateSource("resource.blob.infantry1");
CommandCost(1);
ResourceCost()
{
Add("Plastic", 1);
Add("Electricity", 0);
}
Prereqs()
{
Add("army.building.hq1");
}
Weapon("insect.weapon.cockroach");
}
}
// WEAPON
CreateWeaponType("insect.weapon.cockroach")
{
Style("Projectile");
TargetStyle("Closest");
MaxRange(30);
VertSeparation(90);
Delay(1);
Fixed(1);
LeadAngle(1);
AimAtBox(1);
Damage()
{
Amount(50);
Effective("infantry", 100%);
Effective("vehicle", 100%);
Effective("structure", 100%);
Effective("flyer", 100%);
Effective("mine", 100%);
}
FirePoints()
{
Add("HP-FIRE");
}
}