spr scorpion tank
Posted: Sat Mar 28, 2015 5:25 am
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");
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");