Page 3 of 3

Re: New map: Plastic Pandemonium

Posted: Wed Jul 31, 2019 4:40 pm
by Magnos
Here's your apache with my edits :)

Code: Select all

///////////////////////////////////////////////////////////////////////////////
//
// Pandemic Studios
//

// UNIT
CreateObjectType("Apache", "Unit")
{
  GameObj()
  {
    ThinkInterval(1);
    IdleTask("Tasks::UnitIdle");
    Properties()
    {
      Add("Filter::Weapon");
      Add("Filter::Army");
      Add("Filter::MechanicalFlyer");
      Add("Filter::Unit");
    }
  }
  MapObj()
  {
    GodFile("army_apache.god");
    PhysicsModel("Flyer");
    TractionType("ground", "flyer");

    ReticleType("Vehicle");

    ArmourClass("flyer");
    HitPoints(850);

    TypeDisplay()
    {
      Image()
      {
        Image("apache.tga");
        Mode("Centre");
      }
    }
    GenericFX()
    {
      Add("Weapon::Fire", "weapon.apache.fire");
      Add("MapObj::Health::Low", "damage.chopper");
      Add("MapObj::Death", "unit.apache.death");
      Add("Restore::Target::Process", "restore-small");
      Add("MapObj::AddToMap2", "restore-small-puff");
      Add("UnitObj::Engine", "water.chopper.ripple");
      Add("MapObj::Smoke", "chopperblades");
    }
  }

  UnitObj()
  {
    TopSpeed(65);
    TurnSpeed(440);
    Altitude(3, 16);

    SeeingRange(80);

    ResponseEvents()
    {
      Add("Attack")
      {
        Add("army.unit.chopper_attack-0.wav");
        Add("army.unit.chopper_attack-1.wav");
      }
      Add("Attacked")
      {
        Add("army.unit.chopper_attacked-0.wav");
        Add("army.unit.chopper_attacked-1.wav");
      }
      Add("Move")
      {
        Add("army.unit.chopper_move-0.wav");
        Add("army.unit.chopper_move-1.wav");
        Add("army.unit.chopper_move-2.wav");
      }
      Add("Select")
      {
        Add("army.unit.chopper_select-0.wav");
        Add("army.unit.chopper_select-1.wav");
        Add("army.unit.chopper_select-2.wav");
      }
      Add("Spotted")
      {
        Add("army.unit.chopper_spotted-0.wav");
      }
    }

    Constructor("army.building.garage1");
    ConstructionTime(65);
    CreateSource("resource.blob.vehicle1");
    CommandCost(1);
    ResourceCost()
    {
      Add("Plastic", 250);
      Add("Electricity", 300);
    }
    Prereqs()
    {
      Add("army.building.garage2");
    }

    Weapon("army.weapon.apache");
  }
}

// WEAPON
CreateWeaponType("army.weapon.apache")
{
  Style("Projectile");

  NodeStyle("Y");
  Nodes("CP-Barrel");

  MinRange(25);
  MaxRange(85);

  Speed(150);
  Potshot(1);
  LeadAngle(1);
  VertSeparation(65);
  
  HorizSeparation(35);
  Delay(2);
  TurnRate(120);
  Potshot(1);
  LeadAngle(1);

  Damage()
  {
    Amount(15);

    Effective("infantry", 35%);
    Effective("vehicle", 75%);
    Effective("structure", 100%);
    Effective("flyer", 100%);
    Effective("mine", 25%);
  }

  FirePoints()
  {
    Add("hp-fire1");
    Add("hp-fire1");
    Add("hp-fire2");
    Add("hp-fire2");
  }
  Projectile("army.proj.apache");
}

// PROJECTILE DEFINITION
CreateObjectType("army.proj.apache", "Projectile")
{
  MapObj()
  {
    GodFile("army_mortar_shell.god");
    GenericFX()
    {
      Add("ProjectileObj::Trail", "weapon.tank.proj");
    }
  }

  ProjectileObj()
  {
    ProjectileModel("GuidedTrajectory");
	TopSpeed(150);
    HomingRate(148);
    WaverTurn(150);
    WaverRate(260);
    AccelerationTime(15);
    Explosion("army.exp.apache");
  }
}

// EXPLOSION DEFINITION
CreateObjectType("army.exp.apache", "Explosion")
{
  MapObj()
  {
    Mesh();
    GenericFX()
    {
      Add("ExplosionObj::Explode", "weapon.tank.exp");
    }
  }
  ExplosionObj()
  {
    Damage()
    {
      Amount(30);

      Effective("infantry", 30%);
      Effective("vehicle", 85%);
      Effective("structure", 100%);
      Effective("flyer", 75%);
      Effective("mine", 35%);
    }
    AreaInner(4);
    AreaOuter(12);
    Weapon("army.weapon.apache");
  }
}

// SMALL VEHICLE EXPLOSION
CreateEffectType("unit.apache.death")
{
  Sound()
  {
    File("chopper_death.wav");
  }
  Particles()
  {
    Add()
    {
      Particle("death.vehicle-large.core");
    }
    Add()
    {
      Particle("death.vehicle-large.torus");
    }
    Add()
    {
      Particle("death.vehicle-large.geoexplosion");
    }
    Add()
    {
      Particle("death.vehicle-large.geoexplosion_flip");
    }
    Add()
    {
      Particle("death.vehicle-large.debris");
      Emitter(1);
    }
    Add()
    {
      Particle("death.vehicle-large.debris2");
      Emitter(1);
    }
    Add()
    {
      Particle("death.apache.geometry");
      VelocityAngular(0.0, 200.0, 0.0);
      // VelocityPosition(0.0, -5.0, 0.0);
      Offset(0, -3, 0);
      InitialTime(-0.1);
    }
    Add()
    {
      Particle("death.vehicle-large.core");
      Offset(0, -20, 0);
      InitialTime(-1.6);
    }
    Add()
    {
      Particle("death.vehicle-large.torus");
      Offset(0, -20, 0);
      InitialTime(-1.6);
    }
    Add()
    {
      Particle("death.chopper.debris");
      Offset(0, -20, 0);
      InitialTime(-1.6);
      Emitter(1);
    }
    Add()
    {
      Particle("death.chopper.debris2");
      Offset(0, -20, 0);
      InitialTime(-1.6);
      Emitter(1);
    }
  }
}

// Chopper geometry
CreateParticleType("death.apache.geometry", "Ember")
{
  LifeTime(1.5);
  RenderBase("death.apache.geometry");
  Gravity(1.5);
  Priority(1.4);

}
CreateParticleRenderType("death.apache.geometry", "GeometryScale")
{
  // TeamColor(1);
  GeometryName("army_apache.god");
  HasShadow(0);
  Lighting();

  ColorKey(0, 50, 50, 50, 200);
  ColorKey(0.2, 50, 50, 50, 255);
  ColorKey(1, 50, 50, 50, 255);

  StartRadius(1.0);
  FinishRadius(0.75);
}

// WEAPON LAUNCH EFFECT
CreateEffectType("weapon.apache.fire")
{
  Sound()
  {
    File("apache_rocket.WAV");
  }
  Particles()
  {
    Add(1)
    {
      Particle("weapon.aagun.fire-flare");
      Point("HP-FIRE1");
      StickyParticle(1);
    }
    Add(1)
    {
      Particle("weapon.aagun.fire-flare");
      Point("HP-FIRE2");
      StickyParticle(1);
    }
  }
}
a Realistic Apache Weapon + Apache mesh death and so on
it's firing is so great you will love it XD

Re: New map: Plastic Pandemonium

Posted: Thu Aug 01, 2019 6:35 am
by j3rry
Magnos wrote: Wed Jul 31, 2019 4:40 pm
I have tested it. By the way you have forgot 'apache_rocket.wav' file.

Firing style is interesting, but the trajectory looks somewhat odd. Also I liked how you made death animation. Should test it ingame, probably I will update Apache stats with this new one.

Re: New map: Plastic Pandemonium

Posted: Thu Aug 01, 2019 3:05 pm
by Magnos
j3rry wrote: Thu Aug 01, 2019 6:35 am
Magnos wrote: Wed Jul 31, 2019 4:40 pm
I have tested it. Btw you have forgot "apache_rocket.wav" file.

Firing is interesting, but trajectory looks somewhat odd. Also I liked how you made death anim. Need to test it ingame, maybe I will update Apache stats with new one.
With this trajectory the fire will follow the enemy
here's apache_rocket.wav (so cool)

https://up.top4top.net/downloadf-1308h9dj01-rar.html