CreateObject expected function WallObj

Having problems with AMRTS? Having problems with your Computer?
Post Reply
User avatar
Petas
Map Maker
Map Maker
Posts: 563
Joined: Tue Jan 06, 2015 1:34 pm
Location: Czech Republic
Contact:
Czech Republic

CreateObject expected function WallObj

Post by Petas »

Greetings
I have a problem.
I tried here to do a new code that will add to the game Lamp Post
but the error.
I do not know where they occurred.
Here's a Picture
Image
and here my code

CreateObjectType("Lamp Post", "Wall")
{
GameObj()
{
ThinkInterval(1);
IdleTask("Tasks::WallIdle");
Properties()
{
Add("Filter::Mechanical");
Add("Filter::Building");
Add("Client::NoGroupSelect");
Add("Ability::Recycle");
}
}

MapObj()
{
GodFile("dome_lamppost.god");
PhysicsModel("building");
TractionType("ground");

ArmourClass("structure");
HitPoints(480);

GenericFX()
{
Add("Recycle::Start", "Recycle.pillbox");
Add("Recycle::Finish", "Recycle.pillbox");
Add("MapObj::Health::Low", "common.class.building-health-low");
Add("MapObj::Death", "common.class.building-death");
Add("Wall::Link", "LP.wall.link");
Add("Restore::Target::Process", "common.class.RestoreTargetProcesslarge");
Add("Weapon::Fire", "special.fx.Lamp Post");
Add("MapObj::Smoke", "special.fx.tesla");
Add("Construct::Start", "construct.pillbox");
}
}

UnitObj()
{
SeeingRange(65);
Constructor("army.unit.dumptruck");
ConstructionTime(56);
CreateSource("resource.blob.vehicle1");
CommandCost(1);
ResourceCost()
{
Add("Plastic", 750);
Add("Electricity", 456);
}
Prereqs()
{
Add("army.building.hq3");
}
}
}
Weapon("special.weapon.Lamp Post");
}

WallObj()
{
Range(12);
BeamOffset(9.0);
DeviationMin(1.0);
DeviationMax(10.0);
Properties();
}
}
//
// WEAPON DEFINITION
//
CreateWeaponType("special.weapon.Lamp Post")
{
Style("Instant");

MaxRange(80);

HorizAngle(180);
HorizSeparation(180);
VertAngle(180);
VertSeparation(180);

Delay(0.5);
TurnRate(540);

Damage()
{
Amount(800);

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

FirePoints()
{
Add("HP-Light");
}
}

CreateEffectType("special.fx.Lamp Post")
{
Sound()
{
File("judasweapon.WAV");
Priority(2);
MinDistance(5);
MaxDistance(150);
}
Particles()
{
Add()
{
Particle("LP.wall.link3");
Point("HP-Light");
}
}
}

CreateEffectType("special.fx.tesla")
{
Sound();
Particles()
{
Add()
{
Particle("LP.wall.link");
SingleParticle(1);
Destroy(1);
Point("HP-Light");
}
}
}
CreateParticleType("LP.wall.link3", "Particle")
{
MakeUnderFog(1);
lifeTime(1);
RenderBase("LP.wall.link4");
RenderBase("LP.wall.link5");
}
CreateParticleRenderType("LP.wall.link4", "Beam")
{
TextureName("trail2.tga");
TextureBlend("srcalpha one modulatealpha");

ColorKey( 0, 127, 127, 127, 255); // color
ColorKey(.5, 200, 200, 200, 255);
ColorKey( 1, 127, 127, 127, 255);

AnimateTime(.5);

// UVAnimRate(0.3); // uv anim down beam length
// UVScale(0.02); // uv anim repeat/meter down beam length
UVAnimRate(1); // uv anim down beam length
UVScale(0.08); // uv anim repeat/meter down beam length

BeamCount(1); // one main beam
Radius(1.0); // beam size
PointCount(5); // beam segment resolution
Curvature(0); // main beam curve: 0 = tight, 10 = wide

Wiggle(0.5); // main beam wiggle amount
WiggleSpeed(0.2);

RandomVertex(0); // target random visible point on target

Light(0); // does it have a light
Flares(1); // does it draw flares at the ends of the beam
Taper(1); // does the beam taper at the ends
Oriented(0); // is the beam oriented by the particles's matrix or strait point to point
}
CreateParticleRenderType("LP.wall.link5", "Beam")
{
TextureName("beam.tga");
TextureBlend("srcalpha one modulatealpha");

ColorKey( 0, 150, 150, 150, 255); // color
ColorKey(.5, 255, 255, 255, 255);
ColorKey( 1, 150, 150, 150, 255);

AnimateTime(1);

// UVAnimRate(-1.9); // uv anim down beam length
// UVScale(0.02); // uv anim repeat/meter down beam length
UVAnimRate(-3); // uv anim down beam length
UVScale(0.08); // uv anim repeat/meter down beam length

BeamCount(1); // one main beam
Radius(0.2); // beam size
PointCount(5); // beam segment resolution
Curvature(0); // main beam curve: 0 = tight, 10 = wide

Wiggle(0.5); // main beam wiggle amount
WiggleSpeed(0.2);

RandomVertex(0); // target random visible point on target

Light(0); // does it have a light
Flares(1); // does it draw flares at the ends of the beam
Taper(1); // does the beam taper at the ends
Oriented(0); // is the beam oriented by the particles's matrix or strait point to point
}
I'm not saying I have good maps and that I'm a great player. I'm giving into that the most of my time.
WebSite https://petasv.wixsite.com/petasvideos
Youtube : https://www.youtube.com/PetasVideosTV
GameRanger ID 5603072
DISCORD ID : PetasVideosTV#9499
User avatar
TommyCD1
Moderator
Moderator
Posts: 1143
Joined: Tue Jun 04, 2013 8:55 am
Location: East Coast
Contact:
United States of America

Re: CreateObject expected function WallObj

Post by TommyCD1 »

You have an extra '}' where it is not needed.
Peta wrote:

Code: Select all

  UnitObj()
  {
    SeeingRange(65);
	Constructor("army.unit.dumptruck");
    ConstructionTime(56);
    CreateSource("resource.blob.vehicle1");
    CommandCost(1);
    ResourceCost()
    {
      Add("Plastic", 750);
      Add("Electricity", 456);
    }
    Prereqs()
    {
      Add("army.building.hq3");
    }
  }
}

    Weapon("special.weapon.Lamp Post");
  }

  WallObj()
  {
    Range(12);
    BeamOffset(9.0);
    DeviationMin(1.0);
    DeviationMax(10.0);
    Properties();
  }
}

Code: Select all

  UnitObj()
  {
    SeeingRange(65);
	Constructor("army.unit.dumptruck");
    ConstructionTime(56);
    CreateSource("resource.blob.vehicle1");
    CommandCost(1);
    ResourceCost()
    {
      Add("Plastic", 750);
      Add("Electricity", 456);
    }
    Prereqs()
    {
      Add("army.building.hq3");
    }

    Weapon("special.weapon.Lamp Post");
  }

  WallObj()
  {
    Range(12);
    BeamOffset(9.0);
    DeviationMin(1.0);
    DeviationMax(10.0);
    Properties();
  }
}
I may not make the best maps, or be the best player, but I put a lot of time, effort, and care into my stuff. That counts for something, right? No.
Image
"Can we order a pizza?"
GameRanger ID: 913974
User avatar
Petas
Map Maker
Map Maker
Posts: 563
Joined: Tue Jan 06, 2015 1:34 pm
Location: Czech Republic
Contact:
Czech Republic

Re: CreateObject expected function WallObj

Post by Petas »

I would somehow fix the code?
I'm not saying I have good maps and that I'm a great player. I'm giving into that the most of my time.
WebSite https://petasv.wixsite.com/petasvideos
Youtube : https://www.youtube.com/PetasVideosTV
GameRanger ID 5603072
DISCORD ID : PetasVideosTV#9499
Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests