If you are asking how to make the tower connect:
First you must make the unit a wall. To do this find this line:
CreateObjectType("jda.building.aptower", "
Unit")
And change it to this:
CreateObjectType("jda.building.aptower", "
Wall")
Then you find this line:
IdleTask("Tasks::
UnitIdle");
And change it to this:
IdleTask("Tasks::
WallIdle");
Then under properties add this:
Add("Filter::Post");
Then under GenericFX add this:
Add("Wall::Link", "
wall.barbedwire");
// This can be whatever you want it to be, as long as you make the custom effects for it. If you don't know how to do it, then just leave it as 'wall.barbedwire'.
Then, after UnitObj(), but before the last '}' in the config, you need to add this:
Code: Select all
WallObj()
{
OriginHardPoint("HP-WIRE"); // Origin for Beams ONLY ADD THIS LINE IF YOU KNOW WHAT YOU ARE DOING
Range(4);
BeamOffsetPrimary(2.0); // Distance from the beam offset for the first beam
BeamOffsetSecondary(-2.0); // Distance from the beam offset for the second beam
DeviationMin(1.0);
DeviationMax(10.0);
Properties();
}
So your final result should look something like:
Code: Select all
///////////////////////////////////////////////////////////////////////////////
//
// Copyright 1997-2000 Pandemic Studios
//
// gun post
#include "fx_sprawler_building_aptower.cfg"
// UNIT
CreateObjectType("sprawler.building.aptower", "Wall")
{
GameObj()
{
ThinkInterval(1);
IdleTask("Tasks::WallIdle");
Properties()
{
Add("Filter::Sprawler");
Add("Filter::Mechanical");
Add("Filter::Post");
}
}
MapObj()
{
GodFile("SPR_APTOWER.god");
PhysicsModel("dr2building");
TractionType("traction_building");
ArmourClass("structure");
HitPoints(960);
TypeDisplay()
{
Image("if_sprawl_portraits.tga", 256, 256, 64, 64);
}
GenericFX()
{
Add("MapObj::Health::Low", "common.class.building-health-low");
Add("MapObj::Death", "common.class.building-death-small");
Add("Restore::Target::Process", "common.class.RestoreTargetProcesslarge");
Add("Weapon::Fire", "sprawler.fx.aptower.fire");
Add("Wall::Link", "sprawler.wall.link");
}
}
UnitObj()
{
SeeingRange(89);
CommandCost(1);
Power()
{
Required(100);
}
Efficiency()
{
Green(100%);
Yellow(25%);
Red(0%);
}
Weapon("sprawler.weapon.aptower");
}
WallObj()
{
Range(6);
BeamOffset(3.0);
DeviationMin(1.0);
DeviationMax(10.0);
Properties();
}
}
// WEAPON
CreateWeaponType("sprawler.weapon.aptower")
{
Style("Instant");
NodeStyle("Y_X");
Nodes("CP-WEAPON1", "CP-WEAPON2");
MaxRange(64);
HorizAngle(90);
HorizSeparation(180);
VertAngle(90);
VertSeparation(90);
Delay(0.4);
TurnRate(180);
Speed(100);
LeadAngle(1);
Damage()
{
Amount(32);
Effective("infantry", 80%);
Effective("vehicle", 60%);
Effective("structure", 40%);
Effective("flyer", 40%);
Effective("mine", 60%);
}
FirePoints()
{
Add("HP-Fire1");
Add("HP-Fire2");
}
Projectile("sprawler.proj.aptower");
}