Page 1 of 1

spr scorpion tank

Posted: Sat Mar 28, 2015 5:25 am
by Petas
Hi I need to know one thing.
Why does my scorpion tank soldiers do not shoot?

__________________Code________________________
//

//
// UNIT DEFINITION
//
CreateObjectType("Scorpion Tank", "Unit")
{
GameObj()
{
ThinkInterval(1);
IdleTask("Tasks::UnitIdle");
Properties()
{
Add("Filter::Mechanical");
Add("Filter::Unit");
Add("Filter::Sprawler");
}
}
MapObj()
{
GodFile("SPR_TANKKILLER.god");
PhysicsModel("Vehicle");
ArmourClass("armor_vehicle");
TractionType("Vehicle");
ReticleType("Vehicle");
HitPoints(400);
TypeDisplay()
{
Image("spr_units_3.tga", 0, 64, 64, 64);
}
GenericFX()
{
Add("MapObj::Health::Low", "common.class.vehicle-health-low");
Add("MapObj::Death", "common.class.vehicle-death-big");
Add("UnitObj::Engine", "common.class.largetrack");
Add("Restore::Target::Process", "common.class.RestoreTargetProcesslarge");
Add("Weapon::Fire", "sprawler.fx.tankkiller.fire");
Add("UnitObj::Blind", "common.class.BerzerkProcesslarge");
}
}
UnitObj()
{
TopSpeed(40);
TurnSpeed(360);

SeeingRange(81);
NightModifier(89%);

Constructor("army.building.hq1");
ConstructionTime(36);
CommandCost(1);
ResourceCost()
{
Add("Plastic", 100);
Add("Electricity", 150);
}
Prereqs()
{
Add("sprawler.building.hq1");
}
Weapon("sprawler.weapon.tankkiller");
}
}

//
// WEAPON DEFINITION
//
CreateWeaponType("sprawler.weapon.tankkiller")
{
Style("Projectile");
NodeStyle("Y_X");
Nodes("CP-WEAPON", "cp-weapon2");

MaxRange(64);
MinRange(4);

HorizAngle(90);
HorizSeparation(90);
VertAngle(80);
VertDefault(80);
VertSeparation(45);

TurnRate(360);
LeadAngle(1);

Damage()
{
Amount(10);

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

FirePoints()
{
Add("HP-Fire");
Add("HP-Fire2");
}

Potshot(1);
Delay(0.6);
Projectile("sprawler.proj.tankkiller");
// Speed(150);
}

//
// PROJECTILE DEFINITION
//
CreateObjectType("sprawler.proj.tankkiller", "Projectile")
{
MapObj()
{
Mesh();
GenericFX()
{
Add("ProjectileObj::Trail", "sprawler.fx.tankkiller.proj");
}
}

ProjectileObj()
{
ProjectileModel("GuidedTrajectory");
HomingRate(90);
TopSpeed(250);
Explosion("sprawler.exp.tankkiller");
}
}

//
// EXPLOSION DEFINITION
//
CreateObjectType("sprawler.exp.tankkiller", "Explosion")
{
GameObj();
MapObj()
{
Mesh();
GenericFX()
{
Add("ExplosionObj::Explode", "sprawler.fx.tankkiller.exp");
}
}
ExplosionObj()
{
Damage()
{
Amount(10);

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

AreaInner(4);
AreaOuter(4);
Persist(0);
}
}

//
// WEAPON LAUNCH EFFECT
//
CreateEffectType("sprawler.fx.tankkiller.fire")
{
Sound()
{
File("Sprawl_weap_Scorpiontank.WAV");
Priority(2);
MinDistance(5);
MaxDistance(150);
}
Particles()
{
Add(1)
{
Particle("sprawler.fx.tankkiller.fire-flare");
Point("HP-FIRE");
}
Add(2)
{
Particle("sprawler.fx.tankkiller.fire-smoke");
VelocityPosition(1.0, 1.0, 1.0);
Random(1.0, 1.0, 1.0);
Point("HP-FIRE");
}
Add(1)
{
Particle("sprawler.fx.tankkiller.fire-flare");
Point("HP-FIRE2");
}
Add(2)
{
Particle("sprawler.fx.tankkiller.fire-smoke");
VelocityPosition(1.0, 1.0, 1.0);
Random(1.0, 1.0, 1.0);
Point("HP-FIRE2");
}
}
}

//
// PROJECTILE TRAIL EFFECT
//
CreateEffectType("sprawler.fx.tankkiller.proj")
{
Sound();
Particles()
{
Add(1)
{
Particle("sprawler.fx.tankkiller.proj-flare");
SingleParticle(1);
Destroy(1);
}
Add(1)
{
Particle("sprawler.fx.tankkiller.proj-fire");
SingleParticle(1);
Destroy(1);
}
Add(1)
{
Particle("sprawler.fx.tankkiller.proj-smoke");
SingleParticle(1);
Destroy(1);
}
}
}

//
// PROJECTILE EXPLOSION EFFECT
//
CreateEffectType("sprawler.fx.tankkiller.exp")
{
Sound()
{
File("SM_ExploA.WAV");
Priority(2);
MinDistance(5);
MaxDistance(150);
}
Particles()
{
Add(1)
{
Particle("sprawler.fx.tankkiller.exp-core");
}
Add(1)
{
Particle("sprawler.fx.tankkiller.exp-glow");
}
// Add(5)
// {
// Particle("sprawler.fx.tankkiller.exp-spark");
// VelocityPosition(20.0, 20.0, 20.0);
// Random(1.0, 1.0, 1.0);
// }
Add(3)
{
Particle("sprawler.fx.tankkiller.exp-smoke");
VelocityPosition(2.0, 2.0, 2.0);
Random(1.0, 1.0, 1.0);
}
}
}

//
// WEAPON FLARE PARTICLE
//
CreateParticleType("sprawler.fx.tankkiller.fire-flare", "Particle")
{
lifeTime(0.3);
RenderBase("sprawler.fx.tankkiller.fire-flare");
}
CreateParticleRenderType("sprawler.fx.tankkiller.fire-flare", "Sprite")
{
TextureName("muzzle.tga");
TextureBlend("srcalpha one modulatealpha");
StartColor(255, 127, 0, 255);
FinishColor(255, 0, 0, 0);
StartRadius(3.0);
FinishRadius(1.5);

Sorting( "Light");
}

//
// WEAPON SMOKE PARTICLE
//
CreateParticleType("sprawler.fx.tankkiller.fire-smoke", "Smoke")
{
lifeTime(1.0);
Priority(1.4); // disappear before low detail

RenderBase("sprawler.fx.tankkiller.fire-smoke");
}
CreateParticleRenderType("sprawler.fx.tankkiller.fire-smoke", "Sprite")
{
TextureName("puff.tga");
TextureBlend("srcalpha invsrcalpha modulatealpha");
StartColor(191, 191, 191, 63);
FinishColor(127, 127, 127, 0);
StartRadius(2.0);
FinishRadius(5.0);
}

//
// PROJECTILE FLARE PARTICLE
//
CreateParticleType("sprawler.fx.tankkiller.proj-flare", "Particle")
{
MakeUnderFog(1);

lifeTime(0);
RenderBase("sprawler.fx.tankkiller.proj-flare");
}
CreateParticleRenderType("sprawler.fx.tankkiller.proj-flare", "Sprite")
{
TextureName("lightflare.tga");
TextureBlend("srcalpha one modulatealpha");
StartColor(250, 200, 150, 255);
FinishColor(250, 200, 150, 255);
StartRadius(1.5);
FinishRadius(1.5);

Sorting( "Light");
}

//
// PROJECTILE FIRE PARTICLE
//
CreateParticleType("sprawler.fx.tankkiller.proj-fire", "Particle")
{
MakeUnderFog(1);

lifeTime(0);
RenderBase("sprawler.fx.tankkiller.proj-fire");
}
CreateParticleRenderType("sprawler.fx.tankkiller.proj-fire", "Trail")
{
TextureName("bolt.tga");
TextureBlend("srcalpha one modulatealpha");
StartColor(255, 100, 0, 255);
FinishColor(255, 0, 0, 0);
StartRadius(.5);
FinishRadius(0);

AnimRate(3);
Decay(.2);

Sorting( "Flame", 0);
}


//
// PROJECTILE SMOKE PARTICLE
//
CreateParticleType("sprawler.fx.tankkiller.proj-smoke", "Particle")
{
MakeUnderFog(1);

lifeTime(0);
Priority(1.4); // disappear before low detail

RenderBase("sprawler.fx.tankkiller.proj-smoke");
}
CreateParticleRenderType("sprawler.fx.tankkiller.proj-smoke", "Trail")
{
TextureName("trail2.tga");
TextureBlend("modulate");

StartColor(191, 191, 191, 255);
FinishColor(191, 191, 191, 0);

StartRadius(0.3);
FinishRadius(1.3);

Decay(.1);

Sorting( "Smoke");
}

//
// EXPLOSION CORE PARTICLE
//
CreateParticleType("sprawler.fx.tankkiller.exp-core", "Particle")
{
lifeTime(0.3);
Priority(.74); // lowest priority that doesn't go away

RenderBase("sprawler.fx.tankkiller.exp-core");
}
CreateParticleRenderType("sprawler.fx.tankkiller.exp-core", "Sprite")
{
TextureName("exploder.tga");
TextureBlend("modulate");
StartColor(255, 255, 0, 222);
FinishColor(255, 0, 0, 0);
StartRadius(1.0);
FinishRadius(4.0);

Sorting( "Flame", 1);
}

//
// EXPLOSION GLOW PARTICLE
//
CreateParticleType("sprawler.fx.tankkiller.exp-glow", "Particle")
{
lifeTime(0.5);
Priority(.74); // lowest priority that doesn't go away

RenderBase("sprawler.fx.tankkiller.exp-glow");
}
CreateParticleRenderType("sprawler.fx.tankkiller.exp-glow", "Sprite")
{
TextureName("lightflare.tga");
TextureBlend("srcalpha one modulatealpha");
StartColor(255, 255, 255, 255);
FinishColor(255, 63, 0, 0);
StartRadius(8.0);
FinishRadius(0.0);

Sorting( "Light", 1);
}

//
// EXPLOSION SPARK PARTICLE
//
CreateParticleType("sprawler.fx.tankkiller.exp-spark", "Particle")
{
lifeTime(0);
Priority(1.5); // disappear at medium detail

RenderBase("sprawler.fx.tankkiller.exp-spark");
}
CreateParticleRenderType("sprawler.fx.tankkiller.exp-spark", "Trail")
{
TextureName("bolt.tga");
TextureBlend("srcalpha one modulatealpha");
StartColor(255, 255, 0, 255);
FinishColor(255, 0, 0, 0);
StartRadius(0.1);
FinishRadius(0.0);

Decay(0.5);

Sorting( "Flame", 2);
}

//
// EXPLOSION SMOKE PARTICLE
//
CreateParticleType("sprawler.fx.tankkiller.exp-smoke", "Particle")
{
lifeTime(1.0);
RenderBase("sprawler.fx.tankkiller.exp-smoke");
}
CreateParticleRenderType("sprawler.fx.tankkiller.exp-smoke", "Sprite")
{
TextureName("puff.tga");
TextureBlend("srcalpha invsrcalpha modulatealpha");
StartColor(15, 15, 15, 63);
FinishColor(0, 0, 0, 0);
StartRadius(1.0);
FinishRadius(3.0);

Sorting( "Smoke");

Re: spr scorpion tank

Posted: Sat Mar 28, 2015 9:32 am
by TommyCD1
Change this:

ArmourClass("armor_vehicle");

To one of the following:

ArmourClass("infantry");
ArmourClass("vehicle");
ArmourClass("structure");
ArmourClass("flyer");
ArmourClass("mine");

Units that cannot hit infantry:
AA Gun
Mortar Man
Shrap
Thumbtacks

Units that cannot hit vehicles:
AA Gun
Bullseye
Mortar Man
Shrap
Sniper

Units that cannot hit buildings:
AA Gun
Bullseye
Sniper
Thumbtacks

Units that cannot hit aircraft:
Bombing Run
Bullseye
Cockroach
Crates
Drums
Dumdum
Glue Bomb
Grenadier
Jerry Cans
Magnifying Glass
Mine
Mortar Man
Pillbox
Scorch
Shrap
Sniper
Soldier (Ant)
Tank
Thumbtacks
Worker (Ant)

Units that cannot hit mines:
AA Gun
Grunt
Mine
Thumbtacks

Also, these lines in your code are useless and can be removed.

Add("UnitObj::Blind", "common.class.BerzerkProcesslarge");
NightModifier(89%);

Re: spr scorpion tank

Posted: Sat Mar 28, 2015 10:30 am
by Petas
TommyCD1 wrote:Change this:

ArmourClass("armor_vehicle");

To one of the following:

ArmourClass("infantry");
ArmourClass("vehicle");
ArmourClass("structure");
ArmourClass("flyer");
ArmourClass("mine");

Units that cannot hit infantry:
AA Gun
Mortar Man
Shrap
Thumbtacks

Units that cannot hit vehicles:
AA Gun
Bullseye
Mortar Man
Shrap
Sniper

Units that cannot hit buildings:
AA Gun
Bullseye
Sniper
Thumbtacks

Units that cannot hit aircraft:
Bombing Run
Bullseye
Cockroach
Crates
Drums
Dumdum
Glue Bomb
Grenadier
Jerry Cans
Magnifying Glass
Mine
Mortar Man
Pillbox
Scorch
Shrap
Sniper
Soldier (Ant)
Tank
Thumbtacks
Worker (Ant)

Units that cannot hit mines:
AA Gun
Grunt
Mine
Thumbtacks

Also, these lines in your code are useless and can be removed.

Add("UnitObj::Blind", "common.class.BerzerkProcesslarge");
NightModifier(89%);
yeah thanks Tommy CD1
Hey, I can not find the file instead of the square is what in Figure.
You do not know how the file name?
Or what code should I add?

screenshot where the square
Image

Re: spr scorpion tank

Posted: Sat Mar 28, 2015 10:43 am
by TommyCD1
The square is what happens when the game cannot find or read a texture.

The texture you're most likely missing is muzzle.tga.

The reason it probably does not work is because you may have copied it from Dark Reign 2. But in dr2, it's a .pic file. Army Men RTS cannot read .pic files so you'll need to convert it. I use XnView.

Re: spr scorpion tank

Posted: Sat Mar 28, 2015 12:39 pm
by Petas
TommyCD1 wrote:The square is what happens when the game cannot find or read a texture.

The texture you're most likely missing is muzzle.tga.

The reason it probably does not work is because you may have copied it from Dark Reign 2. But in dr2, it's a .pic file. Army Men RTS cannot read .pic files so you'll need to convert it. I use XnView.
THANKS I also use xnwies
Now I do not know if I have a map error or if there's something I forgot to do.
I wish that after its destruction was plastic blob like for soldiers and tanks.
How do I do that it worked? :?

Re: spr scorpion tank

Posted: Sat Mar 28, 2015 12:48 pm
by TommyCD1
UnitObj()
{
TopSpeed(40);
TurnSpeed(360);

SeeingRange(81);
NightModifier(89%);

Constructor("army.building.hq1");
ConstructionTime(36);
CreateSource("XXX");
CommandCost(1);
ResourceCost()
{
Add("Plastic", 100);
Add("Electricity", 150);
}
Prereqs()
{
Add("sprawler.building.hq1");
}
Weapon("sprawler.weapon.tankkiller");
}
}

This can be one of 4 blobs.

CreateSource("resource.blob.infantry1"); // Small blob. 100 Maximum Plastic.
CreateSource("resource.blob.infantry2"); // Small blob. 200 Maximum Plastic.
CreateSource("resource.blob.vehicle1"); // Medium blob. 300 Maximum Plastic.
CreateSource("resource.blob.building1"); // Large blob. 600 Maximum Plastic.

You can decide which blob to use based on how big the unit is. Half of the plastic used to build the unit will be dumped into the blob.

Re: spr scorpion tank

Posted: Sat Mar 28, 2015 1:10 pm
by Petas
TommyCD1 wrote:UnitObj()
{
TopSpeed(40);
TurnSpeed(360);

SeeingRange(81);
NightModifier(89%);

Constructor("army.building.hq1");
ConstructionTime(36);
CreateSource("XXX");
CommandCost(1);
ResourceCost()
{
Add("Plastic", 100);
Add("Electricity", 150);
}
Prereqs()
{
Add("sprawler.building.hq1");
}
Weapon("sprawler.weapon.tankkiller");
}
}

This can be one of 4 blobs.

CreateSource("resource.blob.infantry1"); // Small blob. 100 Maximum Plastic.
CreateSource("resource.blob.infantry2"); // Small blob. 200 Maximum Plastic.
CreateSource("resource.blob.vehicle1"); // Medium blob. 300 Maximum Plastic.
CreateSource("resource.blob.building1"); // Large blob. 600 Maximum Plastic.

You can decide which blob to use based on how big the unit is. Half of the plastic used to build the unit will be dumped into the blob.
Thank you very much
Hey, you know how that map user Bullseye 8 snowy Train?
Something similar is also trying to create.
map will not download.
We still do not know how to put into game.cfg snowfall
I opened a couple of maps and I did what I should not be Copied damage (rain)
rain type.
and for me it's really stupid that I Copied :BOO :BOO
I need to beat :NOOB2:

Re: spr scorpion tank

Posted: Sat Mar 28, 2015 1:24 pm
by TommyCD1
Unfortunately I have not learned rain myself 100% yet, so I'll have to get back to you on this one.

idk

Re: spr scorpion tank

Posted: Sat Mar 28, 2015 2:18 pm
by Petas
TommyCD1 wrote:Unfortunately I have not learned rain myself 100% yet, so I'll have to get back to you on this one.

idk
OK, thanks for the advice =D> :ROCK: