the code is like this
it is for a map
///////////////////////////////////////////////////////////////////////////////
//
// Pandemic Studios
//
#include "fx_army_unit_sarge.cfg"
#includeonce "fx_grunt_damage.cfg"
// UNIT
CreateObjectType("army.unit.sarge", "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");
Add("Client::ForceNameDisplay");
}
}
MapObj()
{
GodFile("army_sarge.god");
PhysicsModel("Walker");
TractionType("ground");
GrainSize(1);
ArmourClass("infantry");
HitPoints(800);
TypeDisplay()
{
Image()
{
Image("if_game_portraits2.tga", 0, 0, 42, 42);
Mode("Centre");
}
}
GenericFX()
{
Add("Weapon::Fire", "weapon.sarge.fire");
Add("MapObj::AddToMap", "damage.grunt");
Add("MapObj::Death", "death.infantry");
Add("Restore::Target::Process", "restore-small");
Add("MapObj::AddToMap2", "restore-small-puff");
Add("Wounded::Start", "herowound");
}
ShadowFile("army_grunt-shadow.tga");
RotateShadow(0); // default is 1
}
UnitObj()
{
TopSpeed(45);
TurnSpeed(1440);
Wound(1);
SeeingRange(73);
ResponseEvents()
{
Add("Attack")
{
Add("spiderman moving.wav");
}
Add("Attacked")
{
Add("spiderman attacked.wav");
}
Add("Move")
{
Add("spiderman moving.wav");
}
Add("Select")
{
Add("spiderman select.wav");
}
Add("Spotted")
{
Add("spiderman spotted.wav");
}
}
Constructor("army.building.hq1");
ConstructionTime(30);
CommandCost(1);
ResourceCost()
{
Add("Plastic", 9999);
Add("Electricity", 9999);
}
Prereqs()
{
Add("army.building.hq3");
}
}
}
Weapon("army.weapon.sarge");
}
}
// WEAPON
CreateWeaponType("army.weapon.sarge")
{
Style("Instant");
MaxRange(64);
Delay(1);
Damage()
{
Amount(51);
Effective("infantry", 100%);
Effective("vehicle", 100%);
Effective("structure", 100%);
Effective("flyer", 100%);
Effective("mine", 100%);
}
FirePoints()
{
Add("HP-FIRE");
}
}
it is for a map
///////////////////////////////////////////////////////////////////////////////
//
// Pandemic Studios
//
#include "fx_army_unit_sarge.cfg"
#includeonce "fx_grunt_damage.cfg"
// UNIT
CreateObjectType("army.unit.sarge", "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");
Add("Client::ForceNameDisplay");
}
}
MapObj()
{
GodFile("army_sarge.god");
PhysicsModel("Walker");
TractionType("ground");
GrainSize(1);
ArmourClass("infantry");
HitPoints(800);
TypeDisplay()
{
Image()
{
Image("if_game_portraits2.tga", 0, 0, 42, 42);
Mode("Centre");
}
}
GenericFX()
{
Add("Weapon::Fire", "weapon.sarge.fire");
Add("MapObj::AddToMap", "damage.grunt");
Add("MapObj::Death", "death.infantry");
Add("Restore::Target::Process", "restore-small");
Add("MapObj::AddToMap2", "restore-small-puff");
Add("Wounded::Start", "herowound");
}
ShadowFile("army_grunt-shadow.tga");
RotateShadow(0); // default is 1
}
UnitObj()
{
TopSpeed(45);
TurnSpeed(1440);
Wound(1);
SeeingRange(73);
ResponseEvents()
{
Add("Attack")
{
Add("spiderman moving.wav");
}
Add("Attacked")
{
Add("spiderman attacked.wav");
}
Add("Move")
{
Add("spiderman moving.wav");
}
Add("Select")
{
Add("spiderman select.wav");
}
Add("Spotted")
{
Add("spiderman spotted.wav");
}
}
Constructor("army.building.hq1");
ConstructionTime(30);
CommandCost(1);
ResourceCost()
{
Add("Plastic", 9999);
Add("Electricity", 9999);
}
Prereqs()
{
Add("army.building.hq3");
}
}
}
Weapon("army.weapon.sarge");
}
}
// WEAPON
CreateWeaponType("army.weapon.sarge")
{
Style("Instant");
MaxRange(64);
Delay(1);
Damage()
{
Amount(51);
Effective("infantry", 100%);
Effective("vehicle", 100%);
Effective("structure", 100%);
Effective("flyer", 100%);
Effective("mine", 100%);
}
FirePoints()
{
Add("HP-FIRE");
}
}
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