I, I tried to put weapons to the chinook helicopter, this is how I edited chinook.cfg
///////////////////////////////////////////////////////////////////////////////
//
// Pandemic Studios
//
#include "fx_army_unit_chinook.cfg"
// UNIT
CreateObjectType("army.unit.chinook", "Unit")
{
GameObj()
{
ThinkInterval(1);
IdleTask("Tasks::UnitIdle");
Properties()
{
Add("Filter::Army");
Add("Filter::MechanicalFlyer");
Add("Filter::Unit");
}
}
MapObj()
{
GodFile("army_chinook.god");
PhysicsModel("Flyer");
TractionType("ground", "flyer");
ReticleType("Vehicle");
ArmourClass("flyer");
HitPoints(600);
GenericFX()
{
Add("Weapon::Fire", "weapon.chopper.fire");
Add("MapObj::Health::Low", "damage.vehicle");
Add("MapObj::Death", "unit.chinook.death");
Add("Restore::Target::Process", "restore-small");
Add("MapObj::AddToMap2", "restore-small-puff");
}
}
UnitObj()
{
TopSpeed(45);
TurnSpeed(270);
Altitude(3, 20);
SeeingRange(81);
Constructor("army.building.garage1");
ConstructionTime(40);
CreateSource("resource.blob.vehicle1");
CommandCost(1);
ResourceCost()
{
Add("Plastic", 300);
Add("Electricity", 0);
}
Prereqs()
{
Add("army.building.garage2");
}
Weapon("army.weapon.chinook");
}
}
// WEAPON
CreateWeaponType("army.weapon.chinook")
{
Style("Instant");
NodeStyle("X");
Nodes("CP_Barrel");
MaxRange(56);
Delay(0.2);
TurnRate(180);
Potshot(1);
LeadAngle(1);
Damage()
{
Amount(5);
Effective("infantry", 100%);
Effective("vehicle", 80%);
Effective("structure", 80%);
Effective("flyer", 80%);
Effective("mine", 80%);
}
FirePoints()
{
Add("hp-fire1");
Add("hp-fire2");
}
}
----------------------------------------------
And HERE IS THE ORIGINAL obj_army_chinook.cfg
///////////////////////////////////////////////////////////////////////////////
//
// Pandemic Studios
//
#include "fx_army_unit_chinook.cfg"
// UNIT
CreateObjectType("army.unit.chinook", "Unit")
{
GameObj()
{
ThinkInterval(1);
IdleTask("Tasks::UnitIdle");
Properties()
{
Add("Filter::Army");
Add("Filter::MechanicalFlyer");
Add("Filter::Unit");
}
}
MapObj()
{
GodFile("army_chinook.god");
PhysicsModel("Flyer");
TractionType("ground", "flyer");
ReticleType("Vehicle");
ArmourClass("flyer");
HitPoints(600);
GenericFX()
{
Add("MapObj::Health::Low", "damage.vehicle");
Add("MapObj::Death", "unit.chinook.death");
Add("Restore::Target::Process", "restore-small");
Add("MapObj::AddToMap2", "restore-small-puff");
}
}
UnitObj()
{
TopSpeed(45);
TurnSpeed(270);
Altitude(3, 20);
SeeingRange(81);
CreateSource("resource.blob.vehicle1");
CommandCost(1);
ResourceCost()
{
Add("Plastic", 300);
Add("Electricity", 0);
}
}
}
But when I try to start the game an error appears and says "Couldn t find HP-FIRE in army.weapon.chinook
What am I doing wrong?
///////////////////////////////////////////////////////////////////////////////
//
// Pandemic Studios
//
#include "fx_army_unit_chinook.cfg"
// UNIT
CreateObjectType("army.unit.chinook", "Unit")
{
GameObj()
{
ThinkInterval(1);
IdleTask("Tasks::UnitIdle");
Properties()
{
Add("Filter::Army");
Add("Filter::MechanicalFlyer");
Add("Filter::Unit");
}
}
MapObj()
{
GodFile("army_chinook.god");
PhysicsModel("Flyer");
TractionType("ground", "flyer");
ReticleType("Vehicle");
ArmourClass("flyer");
HitPoints(600);
GenericFX()
{
Add("Weapon::Fire", "weapon.chopper.fire");
Add("MapObj::Health::Low", "damage.vehicle");
Add("MapObj::Death", "unit.chinook.death");
Add("Restore::Target::Process", "restore-small");
Add("MapObj::AddToMap2", "restore-small-puff");
}
}
UnitObj()
{
TopSpeed(45);
TurnSpeed(270);
Altitude(3, 20);
SeeingRange(81);
Constructor("army.building.garage1");
ConstructionTime(40);
CreateSource("resource.blob.vehicle1");
CommandCost(1);
ResourceCost()
{
Add("Plastic", 300);
Add("Electricity", 0);
}
Prereqs()
{
Add("army.building.garage2");
}
Weapon("army.weapon.chinook");
}
}
// WEAPON
CreateWeaponType("army.weapon.chinook")
{
Style("Instant");
NodeStyle("X");
Nodes("CP_Barrel");
MaxRange(56);
Delay(0.2);
TurnRate(180);
Potshot(1);
LeadAngle(1);
Damage()
{
Amount(5);
Effective("infantry", 100%);
Effective("vehicle", 80%);
Effective("structure", 80%);
Effective("flyer", 80%);
Effective("mine", 80%);
}
FirePoints()
{
Add("hp-fire1");
Add("hp-fire2");
}
}
----------------------------------------------
And HERE IS THE ORIGINAL obj_army_chinook.cfg
///////////////////////////////////////////////////////////////////////////////
//
// Pandemic Studios
//
#include "fx_army_unit_chinook.cfg"
// UNIT
CreateObjectType("army.unit.chinook", "Unit")
{
GameObj()
{
ThinkInterval(1);
IdleTask("Tasks::UnitIdle");
Properties()
{
Add("Filter::Army");
Add("Filter::MechanicalFlyer");
Add("Filter::Unit");
}
}
MapObj()
{
GodFile("army_chinook.god");
PhysicsModel("Flyer");
TractionType("ground", "flyer");
ReticleType("Vehicle");
ArmourClass("flyer");
HitPoints(600);
GenericFX()
{
Add("MapObj::Health::Low", "damage.vehicle");
Add("MapObj::Death", "unit.chinook.death");
Add("Restore::Target::Process", "restore-small");
Add("MapObj::AddToMap2", "restore-small-puff");
}
}
UnitObj()
{
TopSpeed(45);
TurnSpeed(270);
Altitude(3, 20);
SeeingRange(81);
CreateSource("resource.blob.vehicle1");
CommandCost(1);
ResourceCost()
{
Add("Plastic", 300);
Add("Electricity", 0);
}
}
}
But when I try to start the game an error appears and says "Couldn t find HP-FIRE in army.weapon.chinook
What am I doing wrong?
Thu Apr 30, 2020 10:27 pm by David95654
» I Unlocked Studio Mode
Fri Oct 04, 2019 1:07 pm by David95654
» Madeira Portogallo Bellissima isola
Sat Sep 14, 2019 4:36 am by sharks | iniesta
» Madeira Portugal Schöne Insel
Sat Sep 14, 2019 4:34 am by sharks | iniesta
» Madeira Island Portugal Beautiful Island
Sat Sep 14, 2019 4:33 am by sharks | iniesta
» Madeira Island Portugal Beautiful Island - things to do in Madeira Island Portugal
Fri Sep 13, 2019 5:02 am by sharks | iniesta
» Madeira | Portogallo | Bellissima isola
Fri Sep 13, 2019 2:11 am by sharks | iniesta
» Madeira | Portugal | Schöne Insel
Fri Sep 13, 2019 2:03 am by sharks | iniesta
» Madeira Island | Portugal | Beautiful Island
Fri Sep 13, 2019 2:02 am by sharks | iniesta