Page 1 of 1

Gun Post (Aptower)

Posted: Tue Feb 24, 2015 12:59 pm
by Petas
Hello
Does anyone know how to make a modification to aptower and that there was wallink?
I edited some spůsobem JDA atower but I can not remember
yeah and tet remember that I nevyobrazoval there wallink
You do not know how to make this modification to aptower is the wallink?
:PB
I will be grateful to you for downloading the modifications to know how to proceed.
:PB

Re: Gun Post (Aptower)

Posted: Tue Feb 24, 2015 2:31 pm
by TommyCD1
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");
}

Re: Gun Post (Aptower)

Posted: Wed Feb 25, 2015 2:38 am
by Petas
I can not figure out the constructor or so to build Bulldozer (2)

Re: Gun Post (Aptower)

Posted: Wed Feb 25, 2015 10:20 am
by TommyCD1

Code: Select all

UnitObj()
  {
    SeeingRange(89);  // How long far the unit can see. 121 is the limit I believe.

    Constructor("army.unit.bulldozer");  // What other unit or building constructs this unit.
    ConstructionTime(20);  // How long in seconds it takes to build this unit.
    CreateSource("resource.blob.vehicle1");  // When the unit is destroyed, it will create a blob and drop half the plastic used to make it. The blobs are 'resource.blob.infantry1 (Maximum 100 Plastic)' 'resource.blob.infantry2 (Maximum 200 Plastic)' 'resource.blob.vehicle1 (Maximum 300 Plastic)' and 'resource.blob.building1 (Maximum 600 Plastic)'

    CommandCost(1);  // How many units this equates into the limit. Each unit by default is 1, and when this reaches 70, unit limit is activated. Set it to 0 on every unit to disable unit limit.

    ResourceCost()
    {
      Add("Plastic", 200);  // How much plastic it takes to build this unit.
      Add("Electricity", 0);  // How much electricity it takes to build this unit.
    }
    Prereqs()
    {
      Add("army.building.hq1");  // What buildings or units, if any, are required to build this unit.
    }

    Weapon("sprawler.weapon.aptower");  // What weapon the unit has.
  }

Re: Gun Post (Aptower)

Posted: Wed Feb 25, 2015 11:07 am
by Petas
Thanks :D :ROCK: