Have modding questions or discovered something new? Post here.
Nullen
Tank
Posts: 81 Joined: Sat May 21, 2011 11:09 pm
Location: Mandeville
Post
by Nullen » 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
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");
}
}
Keep calm and get angry
Anti-SniperTank
Half Track
Posts: 62 Joined: Tue May 10, 2011 10:34 pm
Location: Some where on this world
Contact:
Post
by Anti-SniperTank » Sun May 22, 2011 2:45 am
Thats done allready same with the ants. in...
Smith's maps
[FuR] maps
W.W's maps
And more in i think.
You can build them but not from HQ. "other buildings"
{EMC}Methuselah96
Programmer
Posts: 723 Joined: Sat May 08, 2010 3:22 pm
Location: Philadelphia, PA, United States
Contact:
Post
by {EMC}Methuselah96 » Sun May 22, 2011 4:30 am
Those things you added have to be inside the brackets so it's going to look like this:
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::Insect");
Add("Filter::Biological");
Add("Filter::Unit");
}
}
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
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", 0%);
Effective("mine", 100%);
}
FirePoints()
{
Add("HP-FIRE");
}
Projectile("insect.proj.cockroach");
}
//
// PROJECTILE DEFINITION
//
CreateObjectType("insect.proj.cockroach", "Projectile")
{
MapObj()
{
Mesh();
GenericFX()
{
Add("ProjectileObj::Trail", "weapon.cockroach.proj");
Add("ProjectileObj::Hit", "weapon.cockroach.exp");
}
}
ProjectileObj()
{
TopSpeed(200);
ProjectileModel("GuidedTrajectory");
HomingRate(120);
AccelerationTime(2);
//Explosion("weapon.cockroach.exp");
}
}
Nullen
Tank
Posts: 81 Joined: Sat May 21, 2011 11:09 pm
Location: Mandeville
Post
by Nullen » Sun May 22, 2011 10:58 am
It still won't show up
Keep calm and get angry
{EMC}Methuselah96
Programmer
Posts: 723 Joined: Sat May 08, 2010 3:22 pm
Location: Philadelphia, PA, United States
Contact:
Post
by {EMC}Methuselah96 » Sun May 22, 2011 12:28 pm
I tested it on mine and it worked.
And btw the icon will look like a dum-dum.
Nullen
Tank
Posts: 81 Joined: Sat May 21, 2011 11:09 pm
Location: Mandeville
Post
by Nullen » Sun May 22, 2011 1:08 pm
Ah. It did appear on the menu but I wasn't paying attention (thanks a lot). Also what is the entity name of those block guys from the Fist Full of Plastic level?
Keep calm and get angry
{EMC}Methuselah96
Programmer
Posts: 723 Joined: Sat May 08, 2010 3:22 pm
Location: Philadelphia, PA, United States
Contact:
Post
by {EMC}Methuselah96 » Sun May 22, 2011 3:11 pm
livingrm.prop.blocko_person-1
You have to be using the world Livingroom.
Users browsing this forum: No registered users and 0 guests