Initial Commit

This commit is contained in:
Robert Fritzen 2014-02-26 13:54:04 -06:00
commit bd51490b14
316 changed files with 150033 additions and 0 deletions

View file

@ -0,0 +1,672 @@
//CCM VEHICLE EFFECTS
//CREDIT TO DONDELIUM_X
$Bomber::SeekRadius = 500;
$Bomber::SeekTime = 0.25;
$Bomber::minSeekHeat = 0.6;
$Bomber::minTargetingDistance = 15;
$Bomber::useTargetAudio = true;
datablock ParticleData(VehicleBoomSmoke)
{
dragCoeffiecient = 0.2;
gravityCoefficient = -0.25; // rises slowly
inheritedVelFactor = 0.025;
lifetimeMS = 4000;
lifetimeVarianceMS = 0;
textureName = "particleTest";
useInvAlpha = true;
spinRandomMin = -200.0;
spinRandomMax = 200.0;
textureName = "special/Smoke/smoke_001";
colors[0] = "1.0 0.7 0.5 1.0";
colors[1] = "0.2 0.2 0.2 1.0";
colors[2] = "0.0 0.0 0.0 0.0";
sizes[0] = 3.0;
sizes[1] = 8.0;
sizes[2] = 3.0;
times[0] = 0.0;
times[1] = 0.3;
times[2] = 1.0;
};
datablock ParticleEmitterData(VehicleBoomSmokeEmitter)
{
ejectionPeriodMS = 1;
periodVarianceMS = 0;
ejectionVelocity = 10.0;
velocityVariance = 0.25;
thetaMin = 0.0;
thetaMax = 180.0;
lifetimeMS = 150;
particles = "VehicleBoomSmoke";
};
datablock ParticleData(MeDebrisFireParticle)
{
dragCoeffiecient = 0.0;
gravityCoefficient = -0.2;
inheritedVelFactor = 0.0;
lifetimeMS = 350;
lifetimeVarianceMS = 0;
textureName = "particleTest";
useInvAlpha = false;
spinRandomMin = -160.0;
spinRandomMax = 160.0;
animateTexture = true;
framesPerSec = 15;
animTexName[0] = "special/Explosion/exp_0016";
animTexName[1] = "special/Explosion/exp_0018";
animTexName[2] = "special/Explosion/exp_0020";
animTexName[3] = "special/Explosion/exp_0022";
animTexName[4] = "special/Explosion/exp_0024";
animTexName[5] = "special/Explosion/exp_0026";
animTexName[6] = "special/Explosion/exp_0028";
animTexName[7] = "special/Explosion/exp_0030";
animTexName[8] = "special/Explosion/exp_0032";
colors[0] = "1.0 0.7 0.5 1.0";
colors[1] = "1.0 0.5 0.2 1.0";
colors[2] = "1.0 0.25 0.1 0.0";
sizes[0] = 0.5;
sizes[1] = 1.5;
sizes[2] = 0.7;
times[0] = 0.0;
times[1] = 0.2;
times[2] = 1.0;
};
datablock ParticleEmitterData(MeDebrisFireEmitter)
{
ejectionPeriodMS = 10;
periodVarianceMS = 1;
ejectionVelocity = 0.25;
velocityVariance = 0.0;
thetaMin = 0.0;
thetaMax = 175.0;
particles = "MeDebrisFireParticle";
};
datablock ParticleData( MeDebrisSmokeParticle )
{
dragCoeffiecient = 4.0;
gravityCoefficient = -0.00; // rises slowly
inheritedVelFactor = 0.2;
lifetimeMS = 2500;
lifetimeVarianceMS = 100; // ...more or less
textureName = "particleTest";
useInvAlpha = true;
spinRandomMin = -50.0;
spinRandomMax = 50.0;
colors[0] = "0.3 0.3 0.3 0.0";
colors[1] = "0.2 0.2 0.2 1.0";
colors[2] = "0.0 0.0 0.0 0.0";
sizes[0] = 2;
sizes[1] = 3.0;
sizes[2] = 4.5;
times[0] = 0.0;
times[1] = 0.7;
times[2] = 1.0;
};
datablock ParticleEmitterData( MeDebrisSmokeEmitter )
{
ejectionPeriodMS = 15;
periodVarianceMS = 2;
ejectionVelocity = 1.0; // A little oomph at the back end
velocityVariance = 0.0;
thetaMin = 0.0;
thetaMax = 15.0;
useEmitterSizes = true;
particles = "MeDebrisSmokeParticle";
};
datablock DebrisData( MeVehicleFireballDebris )
{
emitters[0] = MeDebrisSmokeEmitter;
emitters[1] = MeDebrisFireEmitter;
explosion = DebrisExplosion;
explodeOnMaxBounce = true;
elasticity = 0.4;
friction = 0.2;
lifetime = 100.0;
lifetimeVariance = 30.0;
numBounces = 0;
bounceVariance = 0;
};
datablock DebrisData( MeVSpikeDebris )
{
emitters[0] = VSmokeSpikeEmitter;
explodeOnMaxBounce = true;
elasticity = 0.4;
friction = 0.2;
lifetime = 0.3;
lifetimeVariance = 0.02;
};
datablock ExplosionData(MeVSpikeExplosion)
{
explosionShape = "effect_plasma_explosion.dts";
faceViewer = true;
delayMS = 0;
offset = 0.0;
playSpeed = 0.75;
sizes[0] = "5.0 5.0 5.0";
sizes[1] = "5.0 5.0 5.0";
times[0] = 0.0;
times[1] = 1.0;
debris = MeVSpikeDebris;
debrisThetaMin = 10;
debrisThetaMax = 175;
debrisNum = 5;
debrisNumVariance = 3;
debrisVelocity = 30.0;
debrisVelocityVariance = 7.0;
};
datablock ExplosionData(MeVehicleExplosion)
{
explosionShape = "disc_explosion.dts";
playSpeed = 1.5;
soundProfile = VehicleExplosionSound;
faceViewer = true;
emitter[0] = VehicleBoomSmokeEmitter;
debris = MeVehicleFireballDebris;
debrisThetaMin = 60;
debrisThetaMax = 90;
debrisNum = 20;
debrisNumVariance = 5;
debrisVelocity = 25.0;
debrisVelocityVariance = 2.0;
subExplosion = MeVSpikeExplosion;
shakeCamera = true;
camShakeFreq = "11.0 13.0 9.0";
camShakeAmp = "40.0 40.0 40.0";
camShakeDuration = 0.7;
camShakeRadius = 25.0;
};
datablock ParticleData(MeHeavyDamageSmokeParticle)
{
dragCoefficient = 0.4;
gravityCoefficient = -0.01;
inheritedVelFactor = 0.0;
constantAcceleration = 0.0;
lifetimeMS = 5000;
lifetimeVarianceMS = 200;
useInvAlpha = true;
spinRandomMin = -60.0;
spinRandomMax = 60.0;
textureName = "particleTest";
colors[0] = "1.0 0.4 0.2 1.0";
colors[1] = "1.0 0.8 0.2 0.8";
colors[2] = "0.1 0.1 0.1 0.3";
colors[3] = "0.2 0.2 0.2 0.15";
colors[4] = "0.3 0.3 0.3 0.0";
sizes[0] = 2.0;
sizes[1] = 3.0;
sizes[2] = 4.5;
sizes[3] = 5.0;
sizes[4] = 8.0;
times[0] = 0.0;
times[1] = 0.05;
times[2] = 0.15;
times[3] = 0.4;
times[4] = 1.0;
};
datablock ParticleEmitterData(MeHeavyDamageSmoke)
{
ejectionPeriodMS = 3;
periodVarianceMS = 2;
ejectionVelocity = 3.0;
velocityVariance = 0.5;
ejectionOffset = 1.5;
thetaMin = 0;
thetaMax = 180;
overrideAdvances = false;
particles = "MeHeavyDamageSmokeParticle";
};
datablock ParticleData(MeLightDamageSmokeParticle)
{
dragCoefficient = 0.0;
gravityCoefficient = -0.01;
inheritedVelFactor = 0.0;
constantAcceleration = 0.0;
lifetimeMS = 4000;
lifetimeVarianceMS = 200;
useInvAlpha = true;
spinRandomMin = -45.0;
spinRandomMax = 45.0;
textureName = "particleTest";
colors[0] = "0.1 0.1 0.1 0.5";
colors[1] = "0.2 0.2 0.2 0.7";
colors[2] = "0.3 0.3 0.3 0.0";
sizes[0] = 1.5;
sizes[1] = 3.0;
sizes[2] = 4.0;
times[0] = 0.0;
times[1] = 0.3;
times[2] = 1.0;
};
datablock ParticleEmitterData(MeLightDamageSmoke)
{
ejectionPeriodMS = 15;
periodVarianceMS = 6;
ejectionVelocity = 4.0;
velocityVariance = 0.5;
ejectionOffset = 1.5;
thetaMin = 0;
thetaMax = 180;
overrideAdvances = false;
particles = "MeLightDamageSmokeParticle";
};
datablock ParticleData(MeDamageBubbleParticle)
{
dragCoefficient = 0.0;
gravityCoefficient = -0.04;
inheritedVelFactor = 0.5;
constantAcceleration = 0.0;
lifetimeMS = 2000;
lifetimeVarianceMS = 200;
useInvAlpha = false;
spinRandomMin = -90.0;
spinRandomMax = 90.0;
textureName = "special/bubbles";
colors[0] = "0.7 0.7 0.7 0.0";
colors[1] = "0.3 0.3 0.3 1.0";
colors[2] = "0.0 0.0 0.0 0.0";
sizes[0] = 0.4;
sizes[1] = 1.6;
sizes[2] = 2.0;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ParticleEmitterData(MeDamageBubbles)
{
ejectionPeriodMS = 15;
periodVarianceMS = 0;
ejectionVelocity = 3.0;
velocityVariance = 0.0;
ejectionOffset = 0.0;
thetaMin = 0;
thetaMax = 35;
overrideAdvances = false;
particles = "MeDamageBubbleParticle";
};
datablock DebrisData( MeShapeDebris )
{
explodeOnMaxBounce = false;
elasticity = 0.1;
friction = 0.5;
lifetime = 25.0;
lifetimeVariance = 0.0;
minSpinSpeed = 0;
maxSpinSpeed = 25;
numBounces = 10;
bounceVariance = 0;
staticOnMaxBounce = true;
useRadiusMass = true;
baseRadius = 1.0;
velocity = 17.0;
velocityVariance = 7.0;
};
datablock DebrisData( GShapeDebris )
{
explodeOnMaxBounce = false;
elasticity = 0.0;
friction = 0.5;
lifetime = 25.0;
lifetimeVariance = 0.0;
minSpinSpeed = 0;
maxSpinSpeed = 5;
numBounces = 10;
bounceVariance = 0;
staticOnMaxBounce = true;
useRadiusMass = true;
baseRadius = 1.0;
velocity = 0.0;
velocityVariance = 0.0;
};
//**************************************************************
// Bombers/Havocs/Blackhawks
//**************************************************************
datablock ExplosionData(MFVSubExplosion)
{
explosionShape = "effect_plasma_explosion.dts";
faceViewer = true;
delayMS = 0;
offset = 0.0;
playSpeed = 0.65;
sizes[0] = "8.0 8.0 8.0";
sizes[1] = "8.0 8.0 8.0";
times[0] = 0.0;
times[1] = 1.0;
debris = MeVSpikeDebris;
debrisThetaMin = 10;
debrisThetaMax = 175;
debrisNum = 5;
debrisNumVariance = 3;
debrisVelocity = 30.0;
debrisVelocityVariance = 7.0;
};
datablock ExplosionData(MFVehicleExplosion)
{
explosionShape = "disc_explosion.dts";
playSpeed = 1.5;
soundProfile = VehicleExplosionSound;
faceViewer = true;
emitter[0] = VehicleBoomSmokeEmitter;
debris = MeVehicleFireballDebris;
debrisThetaMin = 35;
debrisThetaMax = 95;
debrisNum = 25;
debrisNumVariance = 5;
debrisVelocity = 20.0;
debrisVelocityVariance = 5.0;
subExplosion = MFVSubExplosion;
shakeCamera = true;
camShakeFreq = "11.0 13.0 9.0";
camShakeAmp = "40.0 40.0 40.0";
camShakeDuration = 0.7;
camShakeRadius = 35.0;
};
datablock ParticleEmitterData(MFHeavyDamageSmoke)
{
ejectionPeriodMS = 5;
periodVarianceMS = 2;
ejectionVelocity = 5.0;
velocityVariance = 1.0;
ejectionOffset = 2.5;
thetaMin = 0;
thetaMax = 180;
overrideAdvances = false;
particles = "MeHeavyDamageSmokeParticle";
};
datablock ParticleEmitterData(MFLightDamageSmoke)
{
ejectionPeriodMS = 15;
periodVarianceMS = 6;
ejectionVelocity = 5.0;
velocityVariance = 1.0;
ejectionOffset = 2.0;
thetaMin = 0;
thetaMax = 180;
overrideAdvances = false;
particles = "MeLightDamageSmokeParticle";
};
//**************************************************************
// Tanks/APC/MPB
//**************************************************************
datablock ParticleEmitterData(MeHGHeavyDamageSmoke)
{
ejectionPeriodMS = 7;
periodVarianceMS = 2;
ejectionVelocity = 3.0;
velocityVariance = 1.0;
ejectionOffset = 0.0;
thetaMin = 0;
thetaMax = 135;
overrideAdvances = false;
particles = "MeLightDamageSmokeParticle";
};
datablock ParticleData(HGVExplosionSmoke)
{
dragCoeffiecient = 0.4;
gravityCoefficient = 0.0; // rises slowly
inheritedVelFactor = 0.025;
lifetimeMS = 2000;
lifetimeVarianceMS = 0;
textureName = "particleTest";
useInvAlpha = true;
spinRandomMin = -200.0;
spinRandomMax = 200.0;
textureName = "special/Smoke/smoke_001";
colors[0] = "1.0 0.7 0.0 1.0";
colors[1] = "0.2 0.2 0.2 0.5";
colors[2] = "0.0 0.0 0.0 0.0";
sizes[0] = 5.0;
sizes[1] = 10.0;
sizes[2] = 12.0;
times[0] = 0.0;
times[1] = 0.4;
times[2] = 1.0;
};
datablock ParticleEmitterData(HGVExplosionSmokeEmitter)
{
ejectionPeriodMS = 5;
periodVarianceMS = 0;
ejectionVelocity = 20.0;
velocityVariance = 4.0;
thetaMin = 70.0;
thetaMax = 110.0;
lifetimeMS = 150;
particles = "HGVExplosionSmoke";
};
datablock ExplosionData(HGVSubExplosion)
{
explosionShape = "effect_plasma_explosion.dts";
faceViewer = true;
lifetimeMS = 3000;
delayMS = 0;
offset = 0.0;
playSpeed = 0.5;
sizes[0] = "8.0 8.0 8.0";
sizes[1] = "8.0 8.0 8.0";
times[0] = 0.0;
times[1] = 1.0;
emitter[0] = VehicleBoomSmokeEmitter;
debris = MeVehicleFireballDebris;
debrisThetaMin = 60;
debrisThetaMax = 90;
debrisNum = 10;
debrisNumVariance = 5;
debrisVelocity = 10.0;
debrisVelocityVariance = 9.0;
};
datablock ExplosionData(HGVSubExplosion2)
{
explosionShape = "effect_plasma_explosion.dts";
faceViewer = true;
lifetimeMS = 3000;
delayMS = 200;
offset = 8.0;
playSpeed = 0.75;
sizes[0] = "4.0 4.0 4.0";
sizes[1] = "4.0 4.0 4.0";
times[0] = 0.0;
times[1] = 1.0;
emitter[0] = HGVExplosionSmokeEmitter;
debris = MeVehicleFireballDebris;
debrisThetaMin = 60;
debrisThetaMax = 120;
debrisNum = 5;
debrisNumVariance = 2;
debrisVelocity = 15.0;
debrisVelocityVariance = 5.0;
};
datablock ExplosionData(HGVSubExplosion3)
{
explosionShape = "effect_plasma_explosion.dts";
faceViewer = true;
lifetimeMS = 3000;
delayMS = 400;
offset = 12.0;
playSpeed = 0.8;
sizes[0] = "3.5 3.5 3.5";
sizes[1] = "3.5 3.5 3.5";
times[0] = 0.0;
times[1] = 1.0;
emitter[0] = HGVExplosionSmokeEmitter;
debris = MeVehicleFireballDebris;
debrisThetaMin = 60;
debrisThetaMax = 120;
debrisNum = 5;
debrisNumVariance = 2;
debrisVelocity = 15.0;
debrisVelocityVariance = 5.0;
};
datablock ExplosionData(HGVSubExplosion4)
{
explosionShape = "effect_plasma_explosion.dts";
faceViewer = true;
lifetimeMS = 3000;
delayMS = 600;
offset = 15.0;
playSpeed = 0.8;
sizes[0] = "3.0 3.0 3.0";
sizes[1] = "3.0 3.0 3.0";
times[0] = 0.0;
times[1] = 1.0;
emitter[0] = HGVExplosionSmokeEmitter;
debris = MeVehicleFireballDebris;
debrisThetaMin = 60;
debrisThetaMax = 120;
debrisNum = 5;
debrisNumVariance = 2;
debrisVelocity = 15.0;
debrisVelocityVariance = 5.0;
};
datablock ExplosionData(HGVSubExplosion5)
{
explosionShape = "effect_plasma_explosion.dts";
faceViewer = true;
lifetimeMS = 3000;
delayMS = 900;
offset = 20.0;
playSpeed = 0.4;
sizes[0] = "5.0 5.0 5.0";
sizes[1] = "5.0 5.0 5.0";
times[0] = 0.0;
times[1] = 1.0;
emitter[0] = VehicleBoomSmokeEmitter;
debris = MeVehicleFireballDebris;
debrisThetaMin = 0;
debrisThetaMax = 90;
debrisNum = 10;
debrisNumVariance = 0;
debrisVelocity = 15.0;
debrisVelocityVariance = 5.0;
};
datablock ExplosionData(HGVehicleExplosion)
{
soundProfile = VehicleExplosionSound;
subExplosion[0] = HGVSubExplosion;
subExplosion[1] = HGVSubExplosion2;
subExplosion[2] = HGVSubExplosion3;
subExplosion[3] = HGVSubExplosion4;
subExplosion[4] = HGVSubExplosion5;
shakeCamera = true;
camShakeFreq = "11.0 13.0 9.0";
camShakeAmp = "40.0 40.0 40.0";
camShakeDuration = 1.0;
camShakeRadius = 40.0;
};

View file

@ -0,0 +1,555 @@
// bill - menu definitions
// Each menu has a name beginning with mnu - this defines the number of entries
$VehicleMenuNumEntries["mnuMain"] = 7;
// mnuName, index, field = data
// submenu - whether or not it is a submenu
// datablock - the associated datablock
// displayed - what should be displayed
$VehicleMenu["mnuMain", 0, "submenu"] = true;
$VehicleMenu["mnuMain", 0, "datablock"] = mnuLightFlyers;
$VehicleMenu["mnuMain", 0, "displayed"] = "Light Flyers -->";
$VehicleMenu["mnuMain", 1, "submenu"] = true;
$VehicleMenu["mnuMain", 1, "datablock"] = mnuAssaultFlyers;
$VehicleMenu["mnuMain", 1, "displayed"] = "Assault Flyers -->";
$VehicleMenu["mnuMain", 2, "submenu"] = true;
$VehicleMenu["mnuMain", 2, "datablock"] = mnuLightGround;
$VehicleMenu["mnuMain", 2, "displayed"] = "Light Ground -->";
$VehicleMenu["mnuMain", 3, "submenu"] = true;
$VehicleMenu["mnuMain", 3, "datablock"] = mnuHeavyGround;
$VehicleMenu["mnuMain", 3, "displayed"] = "Heavy Ground -->";
$VehicleMenu["mnuMain", 4, "submenu"] = true;
$VehicleMenu["mnuMain", 4, "datablock"] = mnuTransports;
$VehicleMenu["mnuMain", 4, "displayed"] = "Transports -->";
$VehicleMenu["mnuMain", 5, "submenu"] = true;
$VehicleMenu["mnuMain", 5, "datablock"] = mnuDeployables;
$VehicleMenu["mnuMain", 5, "displayed"] = "Deployables -->";
$VehicleMenu["mnuMain", 6, "submenu"] = true;
$VehicleMenu["mnuMain", 6, "datablock"] = mnuHelicopters;
$VehicleMenu["mnuMain", 6, "displayed"] = "Helicopters -->";
// Light Flyers menu
$VehicleMenuNumEntries["mnuLightFlyers"] = 3;
$VehicleMenu["mnuLightFlyers", 0, "submenu"] = false;
$VehicleMenu["mnuLightFlyers", 0, "datablock"] = ScoutFlyer;
$VehicleMenu["mnuLightFlyers", 0, "displayed"] = "F-39 Fighter";
$VehicleMenu["mnuLightFlyers", 1, "submenu"] = false;
$VehicleMenu["mnuLightFlyers", 1, "datablock"] = StrikeFlyer;
$VehicleMenu["mnuLightFlyers", 1, "displayed"] = "F-41 Strike Fighter";
$VehicleMenu["mnuLightFlyers", 2, "submenu"] = false;
$VehicleMenu["mnuLightFlyers", 2, "datablock"] = Harrier;
$VehicleMenu["mnuLightFlyers", 2, "displayed"] = "Plasma Harrier";
// Assault Flyers menu
$VehicleMenuNumEntries["mnuAssaultFlyers"] = 3;
$VehicleMenu["mnuAssaultFlyers", 0, "submenu"] = false;
$VehicleMenu["mnuAssaultFlyers", 0, "datablock"] = BomberFlyer;
$VehicleMenu["mnuAssaultFlyers", 0, "displayed"] = "Thundersword Bomber";
$VehicleMenu["mnuAssaultFlyers", 1, "submenu"] = false;
$VehicleMenu["mnuAssaultFlyers", 1, "datablock"] = HarbingerGunship;
$VehicleMenu["mnuAssaultFlyers", 1, "displayed"] = "Harbinger Gunship";
$VehicleMenu["mnuAssaultFlyers", 2, "submenu"] = false;
$VehicleMenu["mnuAssaultFlyers", 2, "datablock"] = AC130;
$VehicleMenu["mnuAssaultFlyers", 2, "displayed"] = "AC-130 Gunship";
// Light Ground menu
$VehicleMenuNumEntries["mnuLightGround"] = 1;
$VehicleMenu["mnuLightGround", 0, "submenu"] = false;
$VehicleMenu["mnuLightGround", 0, "datablock"] = ScoutVehicle;
$VehicleMenu["mnuLightGround", 0, "displayed"] = "Wildcat Hoverbike";
// Heavy Ground menu
$VehicleMenuNumEntries["mnuHeavyGround"] = 3;
$VehicleMenu["mnuHeavyGround", 0, "submenu"] = false;
$VehicleMenu["mnuHeavyGround", 0, "datablock"] = AssaultVehicle;
$VehicleMenu["mnuHeavyGround", 0, "displayed"] = "Beowulf Assault Tank";
$VehicleMenu["mnuHeavyGround", 1, "submenu"] = false;
$VehicleMenu["mnuHeavyGround", 1, "datablock"] = SandstormTank;
$VehicleMenu["mnuHeavyGround", 1, "displayed"] = "Sandstorm AA Tank";
$VehicleMenu["mnuHeavyGround", 2, "submenu"] = false;
$VehicleMenu["mnuHeavyGround", 2, "datablock"] = CentaurVehicle;
$VehicleMenu["mnuHeavyGround", 2, "displayed"] = "Centaur Advanced Artillery";
// Transports menu
$VehicleMenuNumEntries["mnuTransports"] = 1;
$VehicleMenu["mnuTransports", 0, "submenu"] = false;
$VehicleMenu["mnuTransports", 0, "datablock"] = HAPCFlyer;
$VehicleMenu["mnuTransports", 0, "displayed"] = "Havoc Aerial APC";
//Deployables menu
$VehicleMenuNumEntries["mnuDeployables"] = 1;
$VehicleMenu["mnuDeployables", 0, "submenu"] = false;
$VehicleMenu["mnuDeployables", 0, "datablock"] = MobileBaseVehicle;
$VehicleMenu["mnuDeployables", 0, "displayed"] = "Jericho Mobile Base";
// Helicopters
$VehicleMenuNumEntries["mnuHelicopters"] = 4;
$VehicleMenu["mnuHelicopters", 0, "submenu"] = false;
$VehicleMenu["mnuHelicopters", 0, "datablock"] = CombatHelicopter;
$VehicleMenu["mnuHelicopters", 0, "displayed"] = "Combat Helicopter";
$VehicleMenu["mnuHelicopters", 1, "submenu"] = false;
$VehicleMenu["mnuHelicopters", 1, "datablock"] = GunshipHelicopter;
$VehicleMenu["mnuHelicopters", 1, "displayed"] = "Gunship Helicopter";
$VehicleMenu["mnuHelicopters", 2, "submenu"] = false;
$VehicleMenu["mnuHelicopters", 2, "datablock"] = ApacheHelicopter;
$VehicleMenu["mnuHelicopters", 2, "displayed"] = "Apache Helicopter";
$VehicleMenu["mnuHelicopters", 3, "submenu"] = false;
$VehicleMenu["mnuHelicopters", 3, "datablock"] = Hind;
$VehicleMenu["mnuHelicopters", 3, "displayed"] = "Hind Gunship";
//------------------------------------------------------------------------------
datablock AudioProfile(VehicleAppearSound)
{
filename = "fx/vehicles/inventory_pad_appear.wav";
description = AudioClosest3d;
preload = true;
};
datablock AudioProfile(ActivateVehiclePadSound)
{
filename = "fx/powered/vehicle_pad_on.wav";
description = AudioClose3d;
preload = true;
};
datablock StationFXVehicleData( VehicleInvFX )
{
lifetime = 6.0;
glowTopHeight = 1.5;
glowBottomHeight = 0.1;
glowTopRadius = 12.5;
glowBottomRadius = 12.0;
numGlowSegments = 26;
glowFadeTime = 3.25;
armLightDelay = 2.3;
armLightLifetime = 3.0;
armLightFadeTime = 1.5;
numArcSegments = 10.0;
sphereColor = "0.1 0.1 0.5";
spherePhiSegments = 13;
sphereThetaSegments = 8;
sphereRadius = 12.0;
sphereScale = "1.05 1.05 0.85";
glowNodeName = "GLOWFX";
leftNodeName[0] = "LFX1";
leftNodeName[1] = "LFX2";
leftNodeName[2] = "LFX3";
leftNodeName[3] = "LFX4";
rightNodeName[0] = "RFX1";
rightNodeName[1] = "RFX2";
rightNodeName[2] = "RFX3";
rightNodeName[3] = "RFX4";
texture[0] = "special/stationGlow";
texture[1] = "special/stationLight2";
};
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
function serverCmdBuyVehicle(%client, %blockName) {
if(!%client.canUseVeh(%blockName)) {
//Hi thyth, lookie lookie, I patched it! Sincerely, Phantom139
bottomPrint(%client, "Trying to magicly spawn locked vehicles, Eh?", 2, 2);
return;
}
// NEW CODE BEGINS HERE
// set a persistent variable to save what they selected
%client.vehicleHudSelection = %blockName;
// If they selected a submenu,
// redir them to the submenu that is appropriate
if( getSubStr(%blockName,0,3) $= "mnu" ) {
//echo("got menu");
// they want a submenu - force the client to redisplay the hud
commandToClient(%client, 'StationVehicleShowHud');
// done
return;
}
// otherwise they are buying a vehicle
// NEW CODE ENDS HERE
%team = %client.getSensorGroup();
if(vehicleCheck(%blockName, %team))
{
%station = %client.player.station.pad;
if( (%station.ready) && (%station.station.vehicle[%blockName]) )
{
%trans = %station.getTransform();
%pos = getWords(%trans, 0, 2);
%matrix = VectorOrthoBasis(getWords(%trans, 3, 6));
%yrot = getWords(%matrix, 3, 5);
%p = vectorAdd(%pos,vectorScale(%yrot, -3));
//%adjust = vectorMultiply(realVec(%station,"0 0 4"),"1 1 3");
//%adjustUp = getWord(%adjust,2);
//%adjust = getWords(%adjust,0,1) SPC ((%adjustUp * 0.5) + (mAbs(%adjustUp) * -0.5));
%p = VectorAdd(%p,RealVec(%station,"0 0 7"));
// error(%blockName);
// error(%blockName.spawnOffset);
///[Most]
///Updated Build code for rotatable vehicle pad.
%p = vectorAdd(%p, RealVec(%station,VectorAdd(%blockName.spawnOffset,"0 0 1")));
%forward = VectorCross(VectorCross("0 0 1",realvec(%station,"1 0 0")),"0 0 1");
%rot = FullRot("0 0 1",%forward);
%rrot = RotAdd(%rot,"0 0 1 3.14");
//%rrot= %rot;
%rot = getWords(%rrot, 0,2);
%angle = getWord(%rrot, 3);
//[Most]
%mask = $TypeMasks::VehicleObjectType | $TypeMasks::PlayerObjectType |
$TypeMasks::StationObjectType | $TypeMasks::TurretObjectType;
InitContainerRadiusSearch(%p, %blockName.checkRadius, %mask);
%clear = 1;
for (%x = 0; (%obj = containerSearchNext()) != 0; %x++)
{
if((%obj.getType() & $TypeMasks::VehicleObjectType) && (%obj.getDataBlock().checkIfPlayersMounted(%obj)))
{
%clear = 0;
break;
}
else
if (%obj !=%station.station)
%removeObjects[%x] = %obj;
}
if(%clear)
{
%fadeTime = 0;
for(%i = 0; %i < %x; %i++)
{
if(%removeObjects[%i].getType() & $TypeMasks::PlayerObjectType)
{
%pData = %removeObjects[%i].getDataBlock();
if(!%removeObjects[%i].isBoss) {
%pData.damageObject(%removeObjects[%i], 0, "0 0 0", 1000, $DamageType::VehicleSpawn);
}
else {
//nice try, guess what. you die!
MessageAll('msgPwnt', %client.namebase@" tried to spawn a vehicle on a boss..... tsk tsk tsk... guess he'll learn the hard way.");
%client.player.getDatablock().damageObject(%client.player, 0, "0 0 0", 1000, $DamageType::VehicleSpawn);
}
}
else
{
%removeObjects[%i].mountable = 0;
%removeObjects[%i].startFade( 1000, 0, true );
%removeObjects[%i].schedule(1001, "delete");
%fadeTime = 1500;
}
}
schedule(%fadeTime, 0, "createVehicle", %client, %station, %blockName, %team , %p, %rot, %angle);
}
else
MessageClient(%client, "", 'Can\'t create vehicle. A player is on the creation pad.');
}
}
}
function createVehicle(%client, %station, %blockName, %team , %pos, %rot, %angle)
{
%obj = %blockName.create(%team);
if(%obj)
{
%station.ready = false;
%obj.team = %team;
%obj.useCreateHeight(true);
%obj.schedule(5500, "useCreateHeight", false);
%obj.getDataBlock().isMountable(%obj, false);
%obj.getDataBlock().schedule(6500, "isMountable", %obj, true);
vehicleListAdd(%blockName, %obj);
MissionCleanup.add(%obj);
%turret = %obj.getMountNodeObject(10);
if(%turret > 0)
{
%turret.setCloaked(true);
%turret.schedule(4800, "setCloaked", false);
}
%obj.setCloaked(true);
%obj.setTransform(%pos @ " " @ %rot @ " " @ %angle);
%obj.schedule(3700, "playAudio", 0, VehicleAppearSound);
%obj.schedule(4800, "setCloaked", false);
if(%client.player.lastVehicle)
{
%client.player.lastVehicle.lastPilot = "";
vehicleAbandonTimeOut(%client.player.lastVehicle);
%client.player.lastVehicle = "";
}
%client.player.lastVehicle = %obj;
%obj.lastPilot = %client.player;
%station.playAudio($ActivateSound, ActivateVehiclePadSound);
%ppos = VectorAdd(%station.getTransform(),RealVec(%station,"0 0 2"));
if (%station.getDatablock().getName() $= "DeployableVehiclePad")
{
%station.playThread($ActivateThread,"activate2");
%up = realvec(%station,"0 0 1");
%forward = realvec(%station,"1 0 0");
%p1 = CreateEmitter(%ppos,DVPADE);
%p2 = CreateEmitter(%ppos,DVPADE);
%p1.setRotation(FullRot(%up,%forward));
%p2.setRotation(FullRot(VectorScale(%up,-1),%forward));
%p1.schedule(5000,"delete");
%p2.schedule(5000,"delete");
}
else if (%station.getDatablock().getName() $= "DeployableVehiclePad2")
{
%station.playThread($ActivateThread,"activate");
%up = realvec(%station,"0 0 1");
%forward = realvec(%station,"1 0 0");
%p1 = CreateEmitter(%ppos,DVPADE);
%p2 = CreateEmitter(%ppos,DVPADE);
%p1.setRotation(FullRot(%up,%forward));
%p2.setRotation(FullRot(VectorScale(%up,-1),%forward));
%p1.schedule(5000,"delete");
%p2.schedule(5000,"delete");
}
else
{
%station.playThread($ActivateThread,"activate2");
// play the FX
%fx = new StationFXVehicle()
{
dataBlock = VehicleInvFX;
stationObject = %station;
};
}
//[[CHANGE]]!! If player is telebuying.. put him incontrol...
if ( (%client.isVehicleTeleportEnabled()) && (!%client.telebuy))
%obj.getDataBlock().schedule(5000, "mountDriver", %obj, %client.player);
else
{
if(%obj.getDataBlock().canControl)
{
//serverCmdResetControlObject(%client);
%client.setControlObject(%obj);
commandToClient(%client, 'ControlObjectResponse', true, getControlObjectType(%obj,%client.player));
%obj.clientControl = %client;
}
}
//[[End CHANGE]]
}
if(%obj.getTarget() != -1)
setTargetSensorGroup(%obj.getTarget(), %client.getSensorGroup());
// We are now closing the vehicle hud when you buy a vehicle, making the following call
// unnecessary (and it breaks stuff, too!)
//VehicleHud.updateHud(%client, 'vehicleHud');
}
//------------------------------------------------------------------------------
function VehicleData::mountDriver(%data, %obj, %player)
{
if(isObject(%obj) && %obj.getDamageState() !$= "Destroyed")
{
%player.startFade(1000, 0, true);
schedule(1000, 0, "testVehicleForMount", %player, %obj);
%player.schedule(1500,"startFade",1000, 0, false);
}
}
function testVehicleForMount(%player, %obj)
{
if(isObject(%obj) && %obj.getDamageState() !$= "Destroyed")
%player.getDataBlock().onCollision(%player, %obj, 0);
}
//------------------------------------------------------------------------------
function VehicleData::checkIfPlayersMounted(%data, %obj)
{
for(%i = 0; %i < %obj.getDatablock().numMountPoints; %i++)
if (%obj.getMountNodeObject(%i))
return true;
return false;
}
//------------------------------------------------------------------------------
function VehicleData::isMountable(%data, %obj, %val)
{
%obj.mountable = %val;
}
//------------------------------------------------------------------------------
function vehicleCheck(%blockName, %team)
{
if(($VehicleMax[%blockName] - $VehicleTotalCount[%team, %blockName]) > 0)
return true;
// else
// {
// for(%i = 0; %i < $VehicleMax[%blockName]; %i++)
// {
// %obj = $VehicleInField[%blockName, %i];
// if(%obj.abandon)
// {
// vehicleListRemove(%blockName, %obj);
// %obj.delete();
// return true;
// }
// }
// }
return false;
}
//------------------------------------------------------------------------------
// new vehicle menu code by Crashed
function VehicleHud::updateHud( %obj, %client, %tag )
{
%station = %client.player.station;
for ( %i = 0; %i < 7; %i++ ) //Thanx BadShot
messageClient( %client, 'RemoveLineHud', "", %tag, %i ); //Thanx BadShot
%team = %client.getSensorGroup();
// if they don't have a menu default to main.
%menu = %client.vehicleHudSelection;
if($VehicleMenuNumEntries[%menu] < 1) %menu = "mnuMain";
// Print the menu.
for( %i = 0; %i < $VehicleMenuNumEntries[%menu]; %i++ ) {
%submenu = $VehicleMenu[%menu, %i, "submenu"];
%dbName = $VehicleMenu[%menu, %i, "datablock"];
%displayed = $VehicleMenu[%menu, %i, "displayed"];
// Set the availability count appropriately
if(%submenu == true)
%numAvail = 1;
else if (%station.vehicle[%dbName])
%numAvail = $VehicleMax[%dbName] - $VehicleTotalCount[%team, %dbName];
else
%numAvail = 0;
//echo("sending to client i " @ %i @ " submenu " @ %submenu @ " dbname " @ %dbName @ " displayed " @ %displayed @ " numAvail " @ %numAvail);
// Send update to client
if(%client.canUseVeh(%dbName)) {
messageClient( %client, 'SetLineHud', "", %tag, %i, %displayed, "", %dbName, %numAvail );
}
else {
messageClient( %client, 'SetLineHud', "", %tag, %i, "LOCKED - Schematics Not Found", "", mnuMain, 1);
}
}
// Add a "return to main menu" option if we aren't there already
if(%menu !$= "mnuMain") {
messageClient( %client, 'SetLineHud', "", %tag, %i, "<-- Main Menu", "", mnuMain, 1);
%station.lastCount = %i + 1;
} else %station.lastCount = %i;
// Reset the selection var
%client.vehicleHudSelection = "";
// we're done
return;
}
// end new code
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
function VehicleHud::clearHud( %obj, %client, %tag, %count ) {
for ( %i = 0; %i < %count; %i++ )
messageClient( %client, 'RemoveLineHud', "", %tag, %i );
}
//------------------------------------------------------------------------------
function checkVehSet(%obj, %initpos) {
if ((%obj !$= "") && (%obj >= %initpos) && (%obj <= (%initpos + 5)))
return true;
else
return false;
}
//------------------------------------------------------------------------------
function serverCmdEnableVehicleTeleport( %client, %enabled )
{
%client.setVehicleTeleportEnabled( %enabled );
}
//CAN USE
function GameConnection::canUseVeh(%client, %dbName) {
if(%dbName $= "HarbingerGunship") {
if(%client.hasMedal(8)) {
return 1;
}
else {
return 0;
}
}
else if(%dbName $= "CentaurVehicle") {
if(%client.hasMedal(15)) {
return 1;
}
else {
return 0;
}
}
else if(%dbName $= "StrikeFlyer") {
if(%client.CheckNWChallengeCompletion("NapalmHarrier3")) {
return 1;
}
else {
return 0;
}
}
else if(%dbName $= "Harrier") {
if(%client.CheckNWChallengeCompletion("Harrier3")) {
return 1;
}
else {
return 0;
}
}
else if(%dbName $= "CombatHelicopter") {
if(%client.CheckNWChallengeCompletion("Helicopter3")) {
return 1;
}
else {
return 0;
}
}
else if(%dbName $= "GunshipHelicopter") {
if(%client.CheckNWChallengeCompletion("GunHeli3")) {
return 1;
}
else {
return 0;
}
}
else if(%dbName $= "ApacheHelicopter") {
if(%client.CheckNWChallengeCompletion("Apache3")) {
return 1;
}
else {
return 0;
}
}
else if(%dbName $= "Hind") {
if(%client.CheckNWChallengeCompletion("Hind3")) {
return 1;
}
else {
return 0;
}
}
else if(%dbName $= "AC130") {
if(%client.CheckNWChallengeCompletion("Gunship3")) {
return 1;
}
else {
return 0;
}
}
else {
return 1;
}
}

1766
scripts/vehicles/vehicle.cs Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,458 @@
datablock WheeledVehicleData(DropPod) : MPBDamageProfile {
spawnOffset = "0 0 1.0";
renderWhenDestroyed = false;
canControl = true;
catagory = "Vehicles";
shapeFile = "stackable2l.dts";
multipassenger = false;
computeCRC = true;
debrisShapeName = "stackable2l.dts";
debris = ShapeDebris;
drag = 0.0;
density = 20.0;
mountPose[0] = sitting;
numMountPoints = 1;
isProtectedMountPoint[0] = true;
cameraMaxDist = 20;
cameraOffset = 6;
cameraLag = 1.5;
explosion = HGVehicleExplosion;
explosionDamage = 0.25;
explosionRadius = 5.0;
maxSteeringAngle = 0.3; // 20 deg.
// Used to test if the station can deploy
stationPoints[1] = "-2.3 -7.38703 -0.65";
stationPoints[2] = "-2.3 -11.8 -0.65";
stationPoints[3] = "0 -7.38703 -0.65";
stationPoints[4] = "0 -11.8 -0.65";
stationPoints[5] = "2.3 -7.38703 -0.65";
stationPoints[6] = "2.3 -11.8 -0.65";
// Rigid Body
mass = 1000;
bodyFriction = 0.8;
bodyRestitution = 0.5;
minRollSpeed = 3;
gyroForce = 400;
gyroDamping = 0.3;
stabilizerForce = 10;
minDrag = 10;
softImpactSpeed = 15; // Play SoftImpact Sound
hardImpactSpeed = 25; // Play HardImpact Sound
// Ground Impact Damage (uses DamageType::Ground)
minImpactSpeed = 24;
speedDamageScale = 0.025;
// Object Impact Damage (uses DamageType::Impact)
collDamageThresholdVel = 15;
collDamageMultiplier = 0.03;
// Engine
engineTorque = 0 * 745;
breakTorque = 0 * 745;
maxWheelSpeed = 10;
// Springs
springForce = 8000;
springDamping = 1300;
antiSwayForce = 6000;
staticLoadScale = 2;
// Tires
tireRadius = 1.6;
tireFriction = 10.0;
tireRestitution = 0.5;
tireLateralForce = 3000;
tireLateralDamping = 400;
tireLateralRelaxation = 1;
tireLongitudinalForce = 12000;
tireLongitudinalDamping = 600;
tireLongitudinalRelaxation = 1;
tireEmitter = TireEmitter;
//
maxDamage = 2.0;
destroyedLevel = 2.0;
isShielded = false;
energyPerDamagePoint = 125;
maxEnergy = 600;
jetForce = 0;
minJetEnergy = 60;
jetEnergyDrain = 0;
rechargeRate = 1.0;
jetSound = MPBThrustSound;
engineSound = MPBEngineSound;
squeelSound = AssaultVehicleSkid;
softImpactSound = GravSoftImpactSound;
hardImpactSound = HardImpactSound;
//wheelImpactSound = WheelImpactSound;
//
softSplashSoundVelocity = 5.0;
mediumSplashSoundVelocity = 8.0;
hardSplashSoundVelocity = 12.0;
exitSplashSoundVelocity = 8.0;
exitingWater = VehicleExitWaterSoftSound;
impactWaterEasy = VehicleImpactWaterSoftSound;
impactWaterMedium = VehicleImpactWaterMediumSound;
impactWaterHard = VehicleImpactWaterHardSound;
waterWakeSound = VehicleWakeMediumSplashSound;
minMountDist = 3;
damageEmitter[0] = SmallLightDamageSmoke;
damageEmitter[1] = SmallHeavyDamageSmoke;
damageEmitter[2] = DamageBubbles;
damageEmitterOffset[0] = "3.0 0.5 0.0 ";
damageEmitterOffset[1] = "-3.0 0.5 0.0 ";
damageLevelTolerance[0] = 0.3;
damageLevelTolerance[1] = 0.7;
numDmgEmitterAreas = 2;
splashEmitter[0] = VehicleFoamDropletsEmitter;
splashEmitter[1] = VehicleFoamEmitter;
shieldImpact = VehicleShieldImpact;
cmdCategory = "Tactical";
cmdIcon = CMDGroundMPBIcon;
cmdMiniIconName = "commander/MiniIcons/com_mpb_grey";
targetNameTag = 'Drop';
targetTypeTag = 'Pod';
sensorData = VehiclePulseSensor;
observeParameters = "1 12 12";
shieldEffectScale = "0.85 1.2 0.7";
};
function MakeDropPod(%frd, %right, %plyr, %src, %i) {
if(!isObject(%src)) {
return;
}
if(!%plyr.isAlive()) {
return;
}
if(!%plyr.client.jumpDownYet) {
%plyr.client.jumpDownYet = 1;
}
%vec = vectorAdd(vectorScale(%right,getWord($PodPos[%i],0)),vectorScale(%frd,getWord($PodPos[%i],1)));
%posa = vectorAdd(%src.getPosition(),%vec);
%pos = vectorAdd(%posa, "0 0 -16");
%pod = new WheeledVehicle() {
dataBlock = DropPod;
position = %pos;
rotation = "0 0 1 0";
team = %src.team;
};
MissionCleanUp.add(%pod);
%plyr.unmount();
%pod.mountObject(%plyr,0);
%pod.flying = 1;
%plyr.setMoveState(true); //ha! no running now
PodScanLoop(%pod, %plyr);
%plyr.schedule(1, "setInvinc", true);
return %pod;
}
function DropPod::playerMounted(%data, %obj, %player, %node) {
bottomPrint(%player.client, "Standby for pod launch... HOLD ON TROOPER \n It's About to get real bumpy!!!", 5, 2 );
if( %player.client.observeCount > 0 )
resetObserveFollow( %player.client, false );
}
function PodScanLoop(%pod, %player) {
if(!isObject(%pod)) {
if(%pod.flying) {
//mid air = die
if(%player.isAlive()) {
%plyr.schedule(1, "setInvinc", false);
%player.schedule(5, "scriptKill", 0);
return;
}
return;
}
else {
return;
}
}
%podPos = %pod.getPosition();
%ZGrd = GetTerrainHeight(%podPos);
%landPos = ""@getWord(%podPos, 0)@" "@getWord(%podPos, 1)@" "@%ZGrd@"";
//time to land?
if(vectorDist(%podPos, %landPos) < 50) {
// Lets blow up anything blocking the ground
%c4 = new Item() {
datablock = C4Deployed;
position = %landPos;
scale = ".1 .1 .1";
};
MissionCleanup.add(%c4);
schedule(100, 0, "C4GoBoom", %c4);
//
%pod.setVelocity("0 0 3");
%player.schedule(1250, "setInvinc", false);
%player.unmount();
%pod.flying = 0;
//pod explodes...
%pod.damage(0, %pod.GetPosition(), 99999, $DamageType::Explosion);
%player.setMoveState(false); //ha! no running now
%player.applyRepair(999);
messageClient(%player.client, 'CloseHud', "", "vehicleHud");
}
schedule(250, 0, "PodScanLoop", %pod, %player);
}
function Player::setInvinc(%player, %yeh) {
%player.IsinvincibleC = %yeh;
}
//AMMO PODS
datablock WheeledVehicleData(AmmoPod) : MPBDamageProfile {
spawnOffset = "0 0 1.0";
renderWhenDestroyed = false;
canControl = true;
catagory = "Vehicles";
shapeFile = "stackable2l.dts";
multipassenger = false;
computeCRC = true;
debrisShapeName = "stackable2l.dts";
debris = ShapeDebris;
drag = 0.0;
density = 20.0;
mountPose[0] = sitting;
numMountPoints = 1;
isProtectedMountPoint[0] = true;
cameraMaxDist = 20;
cameraOffset = 6;
cameraLag = 1.5;
explosion = HGVehicleExplosion;
explosionDamage = 0.25;
explosionRadius = 5.0;
maxSteeringAngle = 0.3; // 20 deg.
// Used to test if the station can deploy
stationPoints[1] = "-2.3 -7.38703 -0.65";
stationPoints[2] = "-2.3 -11.8 -0.65";
stationPoints[3] = "0 -7.38703 -0.65";
stationPoints[4] = "0 -11.8 -0.65";
stationPoints[5] = "2.3 -7.38703 -0.65";
stationPoints[6] = "2.3 -11.8 -0.65";
// Rigid Body
mass = 1000;
bodyFriction = 0.8;
bodyRestitution = 0.5;
minRollSpeed = 3;
gyroForce = 400;
gyroDamping = 0.3;
stabilizerForce = 10;
minDrag = 10;
softImpactSpeed = 15; // Play SoftImpact Sound
hardImpactSpeed = 25; // Play HardImpact Sound
// Ground Impact Damage (uses DamageType::Ground)
minImpactSpeed = 24;
speedDamageScale = 0.025;
// Object Impact Damage (uses DamageType::Impact)
collDamageThresholdVel = 15;
collDamageMultiplier = 0.03;
// Engine
engineTorque = 0 * 745;
breakTorque = 0 * 745;
maxWheelSpeed = 10;
// Springs
springForce = 8000;
springDamping = 1300;
antiSwayForce = 6000;
staticLoadScale = 2;
// Tires
tireRadius = 1.6;
tireFriction = 10.0;
tireRestitution = 0.5;
tireLateralForce = 3000;
tireLateralDamping = 400;
tireLateralRelaxation = 1;
tireLongitudinalForce = 12000;
tireLongitudinalDamping = 600;
tireLongitudinalRelaxation = 1;
tireEmitter = TireEmitter;
//
maxDamage = 2.0;
destroyedLevel = 2.0;
isShielded = false;
energyPerDamagePoint = 125;
maxEnergy = 600;
jetForce = 0;
minJetEnergy = 60;
jetEnergyDrain = 0;
rechargeRate = 1.0;
jetSound = MPBThrustSound;
engineSound = MPBEngineSound;
squeelSound = AssaultVehicleSkid;
softImpactSound = GravSoftImpactSound;
hardImpactSound = HardImpactSound;
//wheelImpactSound = WheelImpactSound;
//
softSplashSoundVelocity = 5.0;
mediumSplashSoundVelocity = 8.0;
hardSplashSoundVelocity = 12.0;
exitSplashSoundVelocity = 8.0;
exitingWater = VehicleExitWaterSoftSound;
impactWaterEasy = VehicleImpactWaterSoftSound;
impactWaterMedium = VehicleImpactWaterMediumSound;
impactWaterHard = VehicleImpactWaterHardSound;
waterWakeSound = VehicleWakeMediumSplashSound;
minMountDist = 3;
damageEmitter[0] = SmallLightDamageSmoke;
damageEmitter[1] = SmallHeavyDamageSmoke;
damageEmitter[2] = DamageBubbles;
damageEmitterOffset[0] = "3.0 0.5 0.0 ";
damageEmitterOffset[1] = "-3.0 0.5 0.0 ";
damageLevelTolerance[0] = 0.3;
damageLevelTolerance[1] = 0.7;
numDmgEmitterAreas = 2;
splashEmitter[0] = VehicleFoamDropletsEmitter;
splashEmitter[1] = VehicleFoamEmitter;
shieldImpact = VehicleShieldImpact;
cmdCategory = "Tactical";
cmdIcon = CMDGroundMPBIcon;
cmdMiniIconName = "commander/MiniIcons/com_mpb_grey";
targetNameTag = 'Ammunition';
targetTypeTag = 'Pod';
sensorData = VehiclePulseSensor;
observeParameters = "1 12 12";
shieldEffectScale = "0.85 1.2 0.7";
};
function MakeAmmoPod(%frd, %right, %src, %i) {
if(!isObject(%src)) {
return;
}
%vec = vectorAdd(vectorScale(%right,getWord($PodPos[%i],0)),vectorScale(%frd,getWord($PodPos[%i],1)));
%posa = vectorAdd(%src.getPosition(),%vec);
%pos = vectorAdd(%posa, "0 0 -16");
%pod = new WheeledVehicle() {
dataBlock = AmmoPod;
position = %pos;
rotation = "0 0 1 0";
team = %src.team;
};
MissionCleanUp.add(%pod);
%pod.flying = 1;
AmmoPodScanLoop(%pod);
return %pod;
}
function AmmoPodScanLoop(%pod) {
if(!isObject(%pod)) {
if(%pod.flying) {
//mid air = die
return;
}
else {
return;
}
}
%podPos = %pod.getPosition();
%ZGrd = GetTerrainHeight(%podPos);
%landPos = ""@getWord(%podPos, 0)@" "@getWord(%podPos, 1)@" "@%ZGrd@"";
//time to land?
if(vectorDist(%podPos, %landPos) < 70) {
echo("ammo pod land");
%pod.setVelocity("0 0 0");
%pod.flying = 0;
//pod explodes...
%pod.damage(0, %pod.GetPosition(), 99999, $DamageType::Explosion);
//Drop Contents
%gunNum = getRandom(1,10);
switch(%gunNum) {
//colt
case 1:
WeaponDrop(%pod.GetPosition(), "pistol");
//S3
case 2:
WeaponDrop(%pod.GetPosition(), "S3Rifle");
//Mp26
case 3:
WeaponDrop(%pod.GetPosition(), "Mp26");
//Pg700
case 4:
WeaponDrop(%pod.GetPosition(), "Pg700");
//RPG
case 5:
WeaponDrop(%pod.GetPosition(), "RPG");
//Flamer
case 6:
WeaponDrop(%pod.GetPosition(), "flamer");
//wp400
case 7:
WeaponDrop(%pod.GetPosition(), "WP400");
//m1700
case 8:
WeaponDrop(%pod.GetPosition(), "M1700");
//miniCG
case 9:
WeaponDrop(%pod.GetPosition(), "MiniChaingun");
//Rep Kits
case 10:
for(%i = 0; %i < 4; %i++) {
%blockNum = getRandom(1,2);
if(%blockNum == 1) {
%block = RepairKit;
}
else {
%block = RepairPatch;
}
%reps = new Item() {
datablock = %block;
static = false;
rotate = false;
position = %pod.getPosition();
};
missionCleanup.add(%reps);
}
}
}
schedule(250, 0, "AmmoPodScanLoop", %pod);
}

View file

@ -0,0 +1,420 @@
datablock SensorData(SSTurretBaseSensorObj) {
detects = true;
detectsUsingLOS = true;
detectsPassiveJammed = false;
detectsActiveJammed = false;
detectsCloaked = true;
detectionPings = true;
detectRadius = 700;
};
datablock FlyingVehicleData(StormSeigeDrone) : ShrikeDamageProfile
{
spawnOffset = "0 0 2";
canControl = false;
catagory = "Vehicles";
shapeFile = "vehicle_air_bomber.dts";
multipassenger = false;
computeCRC = true;
debrisShapeName = "vehicle_air_bomber.dts";
debris = MeShapeDebris;
renderWhenDestroyed = false;
drag = 0.15;
density = 1.0;
mountPose[0] = sitting;
numMountPoints = 1;
isProtectedMountPoint[0] = false;
cameraMaxDist = 15;
cameraOffset = 2.5;
cameraLag = 0.9;
explosion = MeVehicleExplosion;
explosionDamage = 1.0;
explosionRadius = 10.0;
maxDamage = 50.0;
destroyedLevel = 50.0;
HDAddMassLevel = 49.9;
HDMassImage = LflyerHDMassImage;
isShielded = false;
energyPerDamagePoint = 0;
maxEnergy = 5000; // Afterburner and any energy weapon pool
rechargeRate = 4;
minDrag = 22; // Linear Drag (eventually slows you down when not thrusting...constant drag)
rotationalDrag = 900; // Anguler Drag (dampens the drift after you stop moving the mouse...also tumble drag)
maxAutoSpeed = 50; // Autostabilizer kicks in when less than this speed. (meters/second)
autoAngularForce = 400; // Angular stabilizer force (this force levels you out when autostabilizer kicks in)
autoLinearForce = 1; // Linear stabilzer force (this slows you down when autostabilizer kicks in)
autoInputDamping = 0.8; // Dampen control input so you don't` whack out at very slow speeds
// Maneuvering
maxSteeringAngle = 4.5; // Max radiens you can rotate the wheel. Smaller number is more maneuverable.
horizontalSurfaceForce = 6; // Horizontal center "wing" (provides "bite" into the wind for climbing/diving and turning)
verticalSurfaceForce = 4; // Vertical center "wing" (controls side slip. lower numbers make MORE slide.)
maneuveringForce = 5250; // Horizontal jets (W,S,D,A key thrust)
steeringForce = 675; // Steering jets (force applied when you move the mouse)
steeringRollForce = 3000; // Steering jets (how much you heel over when you turn)
rollForce = 1; // Auto-roll (self-correction to right you after you roll/invert)
hoverHeight = 2.5; // Height off the ground at rest
createHoverHeight = 1; // Height off the ground when created
maxForwardSpeed = 165; // speed in which forward thrust force is no longer applied (meters/second)
// Turbo Jet
jetForce = 2500; // Afterburner thrust (this is in addition to normal thrust)
minJetEnergy = 40; // Afterburner can't be used if below this threshhold.
jetEnergyDrain = 10; // Energy use of the afterburners (low number is less drain...can be fractional) // Auto stabilize speed
vertThrustMultiple = 1.25;
// Rigid body
mass = 150; // Mass of the vehicle
bodyFriction = 0; // Don't mess with this.
bodyRestitution = 0.5; // When you hit the ground, how much you rebound. (between 0 and 1)
minRollSpeed = 0; // Don't mess with this.
softImpactSpeed = 14; // Sound hooks. This is the soft hit.
hardImpactSpeed = 25; // Sound hooks. This is the hard hit.
// Ground Impact Damage (uses DamageType::Ground)
minImpactSpeed = 20; // If hit ground at speed above this then it's an impact. Meters/second
speedDamageScale = 0.06;
// Object Impact Damage (uses DamageType::Impact)
collDamageThresholdVel = 23.0;
collDamageMultiplier = 0.02;
//
minTrailSpeed = 150; // The speed your contrail shows up at.
trailEmitter = ContrailEmitter;
forwardJetEmitter = FlyerJetEmitter;
downJetEmitter = FlyerJetEmitter;
//
jetSound = ScoutFlyerThrustSound;
engineSound = ScoutFlyerEngineSound;
softImpactSound = SoftImpactSound;
hardImpactSound = HardImpactSound;
//wheelImpactSound = WheelImpactSound;
//
softSplashSoundVelocity = 10.0;
mediumSplashSoundVelocity = 15.0;
hardSplashSoundVelocity = 20.0;
exitSplashSoundVelocity = 10.0;
exitingWater = VehicleExitWaterMediumSound;
impactWaterEasy = VehicleImpactWaterSoftSound;
impactWaterMedium = VehicleImpactWaterMediumSound;
impactWaterHard = VehicleImpactWaterMediumSound;
waterWakeSound = VehicleWakeMediumSplashSound;
dustEmitter = VehicleLiftoffDustEmitter;
triggerDustHeight = 4.0;
dustHeight = 1.0;
damageEmitter[0] = MeLightDamageSmoke;
damageEmitter[1] = MeHeavyDamageSmoke;
damageEmitter[2] = MeDamageBubbles;
damageEmitterOffset[0] = "0.0 -3.0 0.0 ";
damageLevelTolerance[0] = 0.4;
damageLevelTolerance[1] = 0.75;
numDmgEmitterAreas = 1;
//
max[chaingunAmmo] = 2000;
max[MissileLauncherAmmo] = 200;
max[MortarAmmo] = 200;
minMountDist = 7;
splashEmitter[0] = VehicleFoamDropletsEmitter;
splashEmitter[1] = VehicleFoamEmitter;
shieldImpact = VehicleShieldImpact;
cmdCategory = "Tactical";
cmdIcon = CMDFlyingScoutIcon;
cmdMiniIconName = "commander/MiniIcons/com_scout_grey";
targetNameTag = 'Stormseige';
targetTypeTag = ' Battle Drone';
sensorData = SSTurretBaseSensorObj;
sensorRadius = SSTurretBaseSensorObj.detectRadius;
sensorColor = "9 9 255";
checkRadius = 5.5;
observeParameters = "1 10 10";
runningLight[0] = ShrikeLight1;
// runningLight[1] = ShrikeLight2;
shieldEffectScale = "0.937 1.125 0.60";
numWeapons = 3;
replaceTime = 90;
};
function StormSeigeDrone::onDestroyed(%data, %obj, %prevState) {
if(%obj.isDrone) {
%obj.DronePilot.delete();
}
Parent::onDestroyed(%data, %obj, %prevState);
}
function StormSeigeDrone::onEnterLiquid(%data, %obj, %coverage, %type)
{
switch(%type)
{
case 0:
//Water
%obj.setHeat(0.0);
%obj.liquidDamage(%data, 0.1, $DamageType::Crash);
case 1:
//Ocean Water
%obj.setHeat(0.0);
%obj.liquidDamage(%data, 0.1, $DamageType::Crash);
case 2:
//River Water
%obj.setHeat(0.0);
%obj.liquidDamage(%data, 0.1, $DamageType::Crash);
case 3:
//Stagnant Water
%obj.setHeat(0.0);
%obj.liquidDamage(%data, 0.1, $DamageType::Crash);
case 4:
//Lava
%obj.liquidDamage(%data, $VehicleDamageLava, $DamageType::Lava);
case 5:
//Hot Lava
%obj.liquidDamage(%data, $VehicleDamageHotLava, $DamageType::Lava);
case 6:
//Crusty Lava
%obj.liquidDamage(%data, $VehicleDamageCrustyLava, $DamageType::Lava);
case 7:
//Quick Sand
}
}
datablock TurretData(ssTurret) : TurretDamageProfile
{
className = VehicleTurret;
catagory = "Turrets";
shapeFile = "turret_base_large.dts";
preload = true;
mass = 1.0; // Not really relevant
maxEnergy = 1;
maxDamage = StormSeigeDrone.maxDamage;
destroyedLevel = StormSeigeDrone.destroyedLevel;
repairRate = 0;
// capacitor
maxCapacitorEnergy = 250;
capacitorRechargeRate = 1.0;
thetaMin = 0;
thetaMax = 100;
inheritEnergyFromMount = true;
firstPersonOnly = true;
useEyePoint = true;
numWeapons = 1;
cameraDefaultFov = 90.0;
cameraMinFov = 5.0;
cameraMaxFov = 120.0;
targetNameTag = 'Stormsiege';
targetTypeTag = 'Turret';
};
datablock ShapeBaseImageData(UltrBossImage)
{
shapeFile = "vehicle_air_scout.dts";
offset = "0 .5 -.5";
};
function StormSeigeDrone::deleteAllMounted(%data, %obj)
{
%turret = %obj.turretObject;
if (!%turret)
return;
%turret.schedule(1000, delete);
%turret2 = %obj.turretObject2;
if (!%turret2)
return;
%turret2.schedule(1000, delete);
}
function MountStormSBarrel(%turret) {
%turret.mountImage("AABarrelLarge", 0);
}
function StormSeigeDrone::playerMounted(%data, %obj, %player, %node)
{
%ammoAmt = %player.inv[MissileLauncherAmmo];
if(%ammoAmt)
%obj.incInventory(MissileLauncherAmmo, %ammoAmt);
%ammoAmt = %player.inv[MortarAmmo];
if(%ammoAmt)
%obj.incInventory(MortarAmmo, %ammoAmt);
%ammoAmt = %player.inv[chaingunAmmo];
if(%ammoAmt)
%obj.incInventory(chaingunAmmo, %ammoAmt);
bottomPrint(%player.client, "StormSeige - CG, Missiles, Automated Turret", 5, 2 );
commandToClient(%player.client, 'setHudMode', 'Pilot', "Shrike2", %node);
%obj.selectedWeapon = 1;
$numVWeapons = 3;
commandToClient(%player.client, 'SetWeaponryVehicleKeys', true);
if( %player.client.observeCount > 0 )
resetObserveFollow( %player.client, false );
}
function StormSeigeDrone::onAdd(%this, %obj)
{
Parent::onAdd(%this, %obj);
if (%obj.clientControl)
serverCmdResetControlObject(%obj.clientControl);
setTargetSensorGroup(%obj.getTarget(),%obj.team);
%turret = TurretData::create(ssTurret);
%turret.selectedWeapon = 1;
MissionCleanup.add(%turret);
%turret.team = %obj.team;
%turret.setSelfPowered();
%obj.mountObject(%turret, 10);
%turret.setCapacitorRechargeRate(999);
%turret.mountobj = %obj;
%obj.turretObject = %turret;
%turret.team = %obj.team;
%turret.base = %obj;
setTargetSensorGroup(%turret.getTarget(),%turret.team);
MountStormSBarrel(%turret); //mount the barrel
%turret.setAutoFire(true); //YES
// 2nd turret
%turret2 = TurretData::create(ssTurret);
%turret2.selectedWeapon = 1;
MissionCleanup.add(%turret2);
%turret2.team = %obj.team;
%turret2.setSelfPowered();
%obj.mountObject(%turret2, 7);
%turret2.setCapacitorRechargeRate(999);
%turret2.mountobj = %obj;
%obj.turretObject2 = %turret2;
%turret2.team = %obj.team;
%turret2.base = %obj;
setTargetSensorGroup(%turret2.getTarget(),%turret2.team);
MountStormSBarrel(%turret2); //mount the barrel
%turret2.setAutoFire(true); //YES
%obj.mountImage(ScoutChaingunParam, 0);
%obj.mountImage(ScoutChaingunImage, 2);
%obj.mountImage(ScoutChaingunPairImage, 3);
%obj.mountImage(ShrikeMissileImage, 4);
%obj.mountImage(ShrikebombImage, 5);
%obj.shrike = %obj.mountImage(UltrBossImage, 6); //<testing
%obj.selectedWeapon = 1;
%obj.nextWeaponFire = 2;
%obj.setInventory(MissileLauncherAmmo, 100);
%obj.setInventory(MortarAmmo, 100);
%obj.setInventory(chaingunammo, 1500);
%obj.schedule(5500, "playThread", $ActivateThread, "activate");
}
function StormSeigeDrone::onTrigger(%data, %obj, %trigger, %state)
{
%player = %obj.getMountNodeObject(0);
if(%trigger == 0)
{
switch (%state)
{
case 0:
%obj.fireWeapon = false;
%obj.setImageTrigger(2, false);
%obj.setImageTrigger(3, false);
%obj.setImageTrigger(4, false);
%obj.setImageTrigger(5, false);
case 1:
%obj.fireWeapon = true;
if(%obj.selectedWeapon == 1)
{
if(%obj.nextWeaponFire == 2)
{
%obj.setImageTrigger(2, true);
%obj.setImageTrigger(3, false);
}
else
{
%obj.setImageTrigger(2, false);
%obj.setImageTrigger(3, true);
}
}
else if(%obj.selectedWeapon == 2)
{
%obj.setImageTrigger(2, false);
%obj.setImageTrigger(3, false);
%obj.setImageTrigger(4, true);
%obj.setImageTrigger(5, false);
}
else
{
%obj.setImageTrigger(2, false);
%obj.setImageTrigger(3, false);
%obj.setImageTrigger(4, false);
%obj.setImageTrigger(5, true);
}
}
}
}
function StormSeigeDrone::playerDismounted(%data, %obj, %player)
{
%obj.fireWeapon = false;
%obj.setImageTrigger(2, false);
%obj.setImageTrigger(3, false);
%obj.setImageTrigger(4, false);
%obj.setImageTrigger(5, false);
setTargetSensorGroup(%obj.getTarget(), %obj.team);
if( %player.client.observeCount > 0 )
resetObserveFollow( %player.client, true );
}
function ssTurret::onAdd(%this, %obj)
{
Parent::onAdd(%this, %obj);
setTargetSensorGroup(%obj.target, %obj.team);
//setTargetNeverVisMask(%obj.target, 0xffffffff);
}
function ssTurret::onDamage(%data, %obj)
{
%newDamageVal = %obj.getDamageLevel();
if(%obj.lastDamageVal !$= "")
if(isObject(%obj.getObjectMount()) && %obj.lastDamageVal > %newDamageVal)
%obj.getObjectMount().setDamageLevel(%newDamageVal);
%obj.lastDamageVal = %newDamageVal;
}
function ssTurret::damageObject(%this, %targetObject, %sourceObject, %position, %amount, %damageType ,%vec, %client, %projectile)
{
//If vehicle turret is hit then apply damage to the vehicle
%vehicle = %targetObject.getObjectMount();
if(%vehicle)
%vehicle.getDataBlock().damageObject(%vehicle, %sourceObject, %position, %amount, %damageType, %vec, %client, %projectile);
}

View file

@ -0,0 +1,454 @@
//RC
datablock FlyingVehicleData(CruiseMissileVehicle) : ShrikeDamageProfile {
spawnOffset = "0 0 2";
canControl = false;
catagory = "Vehicles";
shapeFile = "vehicle_grav_scout.dts";
multipassenger = false;
computeCRC = true;
debrisShapeName = "vehicle_grav_scout.dts";
debris = ShapeDebris;
renderWhenDestroyed = false;
drag = 0.15;
density = 1.0;
mountPose[0] = sitting;
numMountPoints = 1;
isProtectedMountPoint[0] = false;
cameraMaxDist = 15;
cameraOffset = 2.5;
cameraLag = 0.9;
explosion = VehicleBombExplosion;
explosionDamage = 5.0;
explosionRadius = 35.0;
maxDamage = 0.5;
destroyedLevel = 0.5;
isShielded = false;
energyPerDamagePoint = 0;
maxEnergy = 400; // Afterburner and any energy weapon pool
rechargeRate = 0.0;
minDrag = 30; // Linear Drag (eventually slows you down when not thrusting...constant drag)
rotationalDrag = 100; // Anguler Drag (dampens the drift after you stop moving the mouse...also tumble drag)
maxAutoSpeed = 100000; // Autostabilizer kicks in when less than this speed. (meters/second)
autoAngularForce = 100; // Angular stabilizer force (this force levels you out when autostabilizer kicks in)
autoLinearForce = 0; // Linear stabilzer force (this slows you down when autostabilizer kicks in)
autoInputDamping = 1.0; // Dampen control input so you don't` whack out at very slow speeds
// Maneuvering
maxSteeringAngle = 4.5; // Max radiens you can rotate the wheel. Smaller number is more maneuverable.
horizontalSurfaceForce = 6; // Horizontal center "wing" (provides "bite" into the wind for climbing/diving and turning)
verticalSurfaceForce = 4; // Vertical center "wing" (controls side slip. lower numbers make MORE slide.)
maneuveringForce = 0; // Horizontal jets (W,S,D,A key thrust)
steeringForce = 150; // Steering jets (force applied when you move the mouse)
steeringRollForce = 50; // Steering jets (how much you heel over when you turn)
rollForce = 10; // Auto-roll (self-correction to right you after you roll/invert)
hoverHeight = 5; // Height off the ground at rest
createHoverHeight = 3; // Height off the ground when created
maxForwardSpeed = 180; // speed in which forward thrust force is no longer applied (meters/second)
// Turbo Jet
jetForce = 6000; // Afterburner thrust (this is in addition to normal thrust)
minJetEnergy = 1; // Afterburner can't be used if below this threshhold.
jetEnergyDrain = 0.5; // Energy use of the afterburners (low number is less drain...can be fractional) // Auto stabilize speed
vertThrustMultiple = 0.0;
// Rigid body
mass = 150; // Mass of the vehicle
bodyFriction = 0; // Don't mess with this.
bodyRestitution = 0.5; // When you hit the ground, how much you rebound. (between 0 and 1)
minRollSpeed = 0; // Don't mess with this.
softImpactSpeed = 14; // Sound hooks. This is the soft hit.
hardImpactSpeed = 25; // Sound hooks. This is the hard hit.
// Ground Impact Damage (uses DamageType::Ground)
minImpactSpeed = 1; // If hit ground at speed above this then it's an impact. Meters/second
speedDamageScale = 0.1;
// Object Impact Damage (uses DamageType::Impact)
collDamageThresholdVel = 1.0;
collDamageMultiplier = 0.02;
//
minTrailSpeed = 150; // The speed your contrail shows up at.
trailEmitter = ContrailEmitter;
forwardJetEmitter = MissileSmokeEmitter;
downJetEmitter = FlyerJetEmitter;
//
jetSound = ScoutFlyerThrustSound;
engineSound = ScoutFlyerEngineSound;
softImpactSound = SoftImpactSound;
hardImpactSound = HardImpactSound;
//wheelImpactSound = WheelImpactSound;
//
softSplashSoundVelocity = 10.0;
mediumSplashSoundVelocity = 15.0;
hardSplashSoundVelocity = 20.0;
exitSplashSoundVelocity = 10.0;
exitingWater = VehicleExitWaterMediumSound;
impactWaterEasy = VehicleImpactWaterSoftSound;
impactWaterMedium = VehicleImpactWaterMediumSound;
impactWaterHard = VehicleImpactWaterMediumSound;
waterWakeSound = VehicleWakeMediumSplashSound;
dustEmitter = VehicleLiftoffDustEmitter;
triggerDustHeight = 4.0;
dustHeight = 1.0;
damageEmitter[0] = LightDamageSmoke;
damageEmitter[1] = HeavyDamageSmoke;
damageEmitter[2] = DamageBubbles;
damageEmitterOffset[0] = "0.0 -3.0 0.0 ";
damageLevelTolerance[0] = 0.3;
damageLevelTolerance[1] = 0.7;
numDmgEmitterAreas = 1;
minMountDist = 4;
splashEmitter[0] = VehicleFoamDropletsEmitter;
splashEmitter[1] = VehicleFoamEmitter;
shieldImpact = VehicleShieldImpact;
cmdCategory = "Tactical";
cmdIcon = CMDFlyingScoutIcon;
cmdMiniIconName = "commander/MiniIcons/com_scout_grey";
targetNameTag = 'Tactical';
targetTypeTag = 'Cruise Missile';
sensorData = PlayerSensor;
checkRadius = 5.5;
observeParameters = "1 10 10";
runningLight[0] = ShrikeLight1;
shieldEffectScale = "0.937 1.125 0.60";
replaceTime = 1;
};
//UAV/UAMS
datablock SensorData(UAVSensor) {
detects = true;
detectsUsingLOS = true;
detectsPassiveJammed = true;
detectsActiveJammed = true;
detectsCloaked = true;
detectionPings = true;
detectRadius = 4000;
};
datablock FlyingVehicleData(UAVVehicle) : ShrikeDamageProfile {
spawnOffset = "0 0 2";
canControl = false;
catagory = "Vehicles";
shapeFile = "vehicle_grav_scout.dts";
multipassenger = false;
computeCRC = true;
weaponNode = 1;
debrisShapeName = "vehicle_grav_scout_debris.dts";
debris = ShapeDebris;
renderWhenDestroyed = false;
drag = 0.2;
density = 1.0;
cameraDefaultFov = 90.0;
cameraMinFov = 5.0;
cameraMaxFov = 120.0;
cameraMaxDist = 22;
cameraOffset = 5;
cameraLag = 1.0;
explosion = LargeAirVehicleExplosion;
explosionDamage = 0.5;
explosionRadius = 5.0;
maxDamage = 6.00; // Total health
destroyedLevel = 6.00; // Damage textures show up at this health level
isShielded = false;
energyPerDamagePoint = 150;
maxEnergy = 400; // Afterburner and any energy weapon pool
minDrag = 60; // Linear Drag (eventually slows you down when not thrusting...constant drag)
rotationalDrag = 1800; // Angular Drag (dampens the drift after you stop moving the mouse...also tumble drag)
rechargeRate = 0.8;
// Auto stabilize speed
maxAutoSpeed = 15; // Autostabilizer kicks in when less than this speed. (meters/second)
autoAngularForce = 1500; // Angular stabilizer force (this force levels you out when autostabilizer kicks in)
autoLinearForce = 300; // Linear stabilzer force (this slows you down when autostabilizer kicks in)
autoInputDamping = 0.95; // Dampen control input so you don't whack out at very slow speeds
// Maneuvering
maxSteeringAngle = 5; // Max radiens you can rotate the wheel. Smaller number is more maneuverable.
horizontalSurfaceForce = 5; // Horizontal center "wing" (provides "bite" into the wind for climbing/diving and turning)
verticalSurfaceForce = 8; // Vertical center "wing" (controls side slip. lower numbers make MORE slide.)
maneuveringForce = 4700; // Horizontal jets (W,S,D,A key thrust)
steeringForce = 1100; // Steering jets (force applied when you move the mouse)
steeringRollForce = 300; // Steering jets (how much you heel over when you turn)
rollForce = 8; // Auto-roll (self-correction to right you after you roll/invert)
hoverHeight = 5; // Height off the ground at rest
createHoverHeight = 3; // Height off the ground when created
maxForwardSpeed = 85; // speed in which forward thrust force is no longer applied (meters/second)
// Turbo Jet
jetForce = 3000; // Afterburner thrust (this is in addition to normal thrust)
minJetEnergy = 40.0; // Afterburner can't be used if below this threshhold.
jetEnergyDrain = 3.0; // Energy use of the afterburners (low number is less drain...can be fractional)
vertThrustMultiple = 3.0;
dustEmitter = LargeVehicleLiftoffDustEmitter;
triggerDustHeight = 4.0;
dustHeight = 2.0;
damageEmitter[0] = LightDamageSmoke;
damageEmitter[1] = HeavyDamageSmoke;
damageEmitter[2] = DamageBubbles;
damageEmitterOffset[0] = "3.0 -3.0 0.0 ";
damageEmitterOffset[1] = "-3.0 -3.0 0.0 ";
damageLevelTolerance[0] = 0.3;
damageLevelTolerance[1] = 0.7;
numDmgEmitterAreas = 2;
// Rigid body
mass = 350; // Mass of the vehicle
bodyFriction = 0; // Don't mess with this.
bodyRestitution = 0.5; // When you hit the ground, how much you rebound. (between 0 and 1)
minRollSpeed = 0; // Don't mess with this.
softImpactSpeed = 20; // Sound hooks. This is the soft hit.
hardImpactSpeed = 25; // Sound hooks. This is the hard hit.
// Ground Impact Damage (uses DamageType::Ground)
minImpactSpeed = 40; // If hit ground at speed above this then it's an impact. Meters/second
speedDamageScale = 0.060;
// Object Impact Damage (uses DamageType::Impact)
collDamageThresholdVel = 25;
collDamageMultiplier = 0.020;
//
minTrailSpeed = 15; // The speed your contrail shows up at.
trailEmitter = ContrailEmitter;
forwardJetEmitter = FlyerJetEmitter;
downJetEmitter = FlyerJetEmitter;
//
jetSound = BomberFlyerThrustSound;
engineSound = BomberFlyerEngineSound;
softImpactSound = SoftImpactSound;
hardImpactSound = HardImpactSound;
//wheelImpactSound = WheelImpactSound;
//
softSplashSoundVelocity = 15.0;
mediumSplashSoundVelocity = 20.0;
hardSplashSoundVelocity = 30.0;
exitSplashSoundVelocity = 10.0;
exitingWater = VehicleExitWaterHardSound;
impactWaterEasy = VehicleImpactWaterSoftSound;
impactWaterMedium = VehicleImpactWaterMediumSound;
impactWaterHard = VehicleImpactWaterHardSound;
waterWakeSound = VehicleWakeHardSplashSound;
minMountDist = 4;
splashEmitter[0] = VehicleFoamDropletsEmitter;
splashEmitter[1] = VehicleFoamEmitter;
shieldImpact = VehicleShieldImpact;
cmdCategory = "Tactical";
cmdIcon = CMDFlyingBomberIcon;
cmdMiniIconName = "commander/MiniIcons/com_bomber_grey";
targetNameTag = 'UAV';
targetTypeTag = '';
sensorData = UAVSensor;
max[MiniChaingunAmmo] = 9999;
max[MissileLauncherAmmo] = 9999;
max[MortarAmmo] = 9999;
checkRadius = 7.1895;
observeParameters = "1 10 10";
shieldEffectScale = "0.75 0.975 0.375";
showPilotInfo = 1;
};
datablock TurretData(MissileSatellite) : TurretDamageProfile {
className = VehicleTurret;
catagory = "Turrets";
shapeFile = "turret_belly_base.dts";
preload = true;
canControl = true;
cmdCategory = "Tactical";
cmdIcon = CMDFlyingBomberIcon;
cmdMiniIconName = "commander/MiniIcons/com_bomber_grey";
targetNameTag = 'Un-Manned Aerial';
targetTypeTag = 'Missile Satellite';
mass = 1.0; // Not really relevant
repairRate = 0;
maxDamage = UAVVehicle.maxDamage;
destroyedLevel = UAVVehicle.destroyedLevel;
thetaMin = 90;
thetaMax = 180;
inheritEnergyFromMount = true;
firstPersonOnly = true;
useEyePoint = true;
numWeapons = 1;
max[MissileLauncherAmmo] = 9999;
};
function MissileSatellite::onDamage(%data, %obj) {
%newDamageVal = %obj.getDamageLevel();
if(%obj.lastDamageVal !$= "")
if(isObject(%obj.getObjectMount()) && %obj.lastDamageVal > %newDamageVal)
%obj.getObjectMount().setDamageLevel(%newDamageVal);
%obj.lastDamageVal = %newDamageVal;
}
datablock TurretImageData(MissileSatelliteBarrel) {
shapeFile = "turret_muzzlepoint.dts";
//item = PlasmaTurretBarrel;
item = MissileLauncher;
// Turret parameters
activationMS = 150;
deactivateDelayMS = 300;
thinkTimeMS = 150;
degPerSecTheta = 300;
degPerSecPhi = 500;
attackRadius = 11;
usesEnergy = true;
useMountEnergy = false;
// State transitions
stateName[0] = "Activate";
stateTransitionOnNotLoaded[0] = "Dead";
stateTransitionOnLoaded[0] = "ActivateReady";
stateName[1] = "ActivateReady";
stateSequence[1] = "Activate";
stateSound[1] = MBLSwitchSound;
stateTimeoutValue[1] = 1;
stateTransitionOnTimeout[1] = "Ready";
stateTransitionOnNotLoaded[1] = "Deactivate";
stateName[2] = "Ready";
stateTransitionOnNotLoaded[2] = "Deactivate";
stateTransitionOnTriggerDown[2] = "Fire1";
stateName[3] = "Fire1";
stateTransitionOnTimeout[3] = "Reload";
stateTimeoutValue[3] = 0.3;
stateFire[3] = true;
stateRecoil[3] = LightRecoil;
stateAllowImageChange[3] = true;
stateSequence[3] = "Fire";
stateSound[3] = MBLFireSound;
stateScript[3] = "onFire";
stateName[4] = "Reload";
stateTimeoutValue[4] = 0.8;
stateAllowImageChange[4] = true;
stateSequence[4] = "Reload";
stateTransitionOnTimeout[4] = "Ready";
stateTransitionOnNotLoaded[4] = "Deactivate";
stateName[5] = "Deactivate";
stateSequence[5] = "Activate";
stateDirection[5] = false;
stateTimeoutValue[5] = 1;
stateTransitionOnLoaded[5] = "ActivateReady";
stateTransitionOnTimeout[5] = "Dead";
stateName[6] = "Dead";
stateTransitionOnLoaded[6] = "ActivateReady";
};
function MissileSatellite::onTrigger(%data, %obj, %trigger, %state) {
if(%state == 1 && %trigger == 5) {
if(%obj.mountobj.isUnlimitedSat) {
if(%obj.mountobj.canLaucnhStrike) {
%obj.getcontrollingclient().player.lastTransformStuff = %obj.getcontrollingclient().player.getTransform();
%obj.mountobj.canLaucnhStrike = 0;
schedule(30000, 0, "ResetSat", %obj.mountobj);
schedule(100, 0, "MakeCruiseMissile", %obj.getcontrollingclient(), %obj);
schedule(100, 0, "ServerPlay3d", EscapePodLaunchSound2, %obj.getPosition());
}
}
}
}
function CruiseMissileVehicle::onTrigger(%data, %obj, %trigger, %state) {
// data = ScoutFlyer datablock
// obj = ScoutFlyer object number
// trigger = 0 for "fire", 1 for "jump", 3 for "thrust"
// state = 1 for firing, 0 for not firing
if(%state == 1 && %trigger == 5) {
//detonate.
%obj.damage(0, %obj.getposition(), 100.0, $DamageType::Admin);
}
}
function UAVVehicle::onAdd(%this, %obj) {
Parent::onAdd(%this, %obj);
setTargetSensorGroup(%obj.getTarget(),%obj.team);
%turret = TurretData::create(MissileSatellite);
%turret.selectedWeapon = 1;
MissionCleanup.add(%turret);
%turret.setSelfPowered();
%obj.mountObject(%turret, 10);
%turret.setCapacitorRechargeRate(999);
%turret.mountobj = %obj;
%turret.powerCount = 1;
%obj.turretObject = %turret;
%turret.team = %obj.team;
%turret.base = %obj;
%turret.mountImage(MissileSatelliteBarrel,0);
setTargetSensorGroup(%turret.getTarget(),%obj.team);
%turret.setInventory(MissileLauncherAmmo, 9999, true);
%turret.setCloaked(true);
%obj.setCloaked(true);
}
function UAVVehicle::deleteAllMounted(%data, %obj) {
%turret = %obj.turretObject;
if (!%turret) {
}
else {
if(%turret.getControllingClient() != 0) {
%cl = %turret.getControllingClient();
if(isObject(%cl.player) && %cl.player.getState() !$= "dead") {
%cl.setControlObject(%cl.player);
}
}
%turret.schedule(1000, delete);
}
}

View file

@ -0,0 +1,559 @@
//**************************************************************
// HAVOC HEAVY TRANSPORT FLIER
//**************************************************************
datablock FlyingVehicleData(WindshearPlatform) : HavocDamageProfile {
spawnOffset = "0 0 6";
renderWhenDestroyed = false;
catagory = "Vehicles";
shapeFile = "vehicle_air_hapc.dts";
multipassenger = true;
computeCRC = true;
debrisShapeName = "vehicle_air_hapc_debris.dts";
debris = ShapeDebris;
drag = 0.2;
density = 1.0;
mountPose[0] = sitting;
numMountPoints = 6;
isProtectedMountPoint[0] = true;
canControl = false;
cameraMaxDist = 17;
cameraOffset = 2;
cameraLag = 8.5;
explosion = LargeAirVehicleExplosion;
explosionDamage = 0.5;
explosionRadius = 5.0;
maxDamage = 75.50;
destroyedLevel = 75.50;
isShielded = true;
rechargeRate = 0.8;
energyPerDamagePoint = 200;
maxEnergy = 550;
minDrag = 100; // Linear Drag
rotationalDrag = 2700; // Anguler Drag
// Auto stabilize speed
maxAutoSpeed = 10;
autoAngularForce = 3000; // Angular stabilizer force
autoLinearForce = 450; // Linear stabilzer force
autoInputDamping = 0.95; //
// Maneuvering
maxSteeringAngle = 4.5; // Max radiens you can rotate the wheel. Smaller number is more maneuverable.
horizontalSurfaceForce = 6; // Horizontal center "wing" (provides "bite" into the wind for climbing/diving and turning)
verticalSurfaceForce = 4; // Vertical center "wing" (controls side slip. lower numbers make MORE slide.)
maneuveringForce = 5250; // Horizontal jets (W,S,D,A key thrust)
steeringForce = 675; // Steering jets (force applied when you move the mouse)
steeringRollForce = 3000; // Steering jets (how much you heel over when you turn)
rollForce = 1; // Auto-roll (self-correction to right you after you roll/invert)
hoverHeight = 2.5; // Height off the ground at rest
createHoverHeight = 1; // Height off the ground when created
maxForwardSpeed = 165; // speed in which forward thrust force is no longer applied (meters/second)
// Turbo Jet
jetForce = 2500; // Afterburner thrust (this is in addition to normal thrust)
minJetEnergy = 40; // Afterburner can't be used if below this threshhold.
jetEnergyDrain = 10; // Energy use of the afterburners (low number is less drain...can be fractional) // Auto stabilize speed
vertThrustMultiple = 1.25;
dustEmitter = LargeVehicleLiftoffDustEmitter;
triggerDustHeight = 4.0;
dustHeight = 2.0;
damageEmitter[0] = LightDamageSmoke;
damageEmitter[1] = HeavyDamageSmoke;
damageEmitter[2] = DamageBubbles;
damageEmitterOffset[0] = "3.0 -3.0 0.0 ";
damageEmitterOffset[1] = "-3.0 -3.0 0.0 ";
damageLevelTolerance[0] = 0.3;
damageLevelTolerance[1] = 0.7;
numDmgEmitterAreas = 2;
// Rigid body
mass = 150; // Mass of the vehicle
bodyFriction = 0; // Don't mess with this.
bodyRestitution = 0.5; // When you hit the ground, how much you rebound. (between 0 and 1)
minRollSpeed = 0; // Don't mess with this.
softImpactSpeed = 14; // Sound hooks. This is the soft hit.
hardImpactSpeed = 25; // Sound hooks. This is the hard hit.
// Ground Impact Damage (uses DamageType::Ground)
minImpactSpeed = 25; // If hit ground at speed above this then it's an impact. Meters/second
speedDamageScale = 0.060;
// Object Impact Damage (uses DamageType::Impact)
collDamageThresholdVel = 28;
collDamageMultiplier = 0.020;
//
minTrailSpeed = 15;
trailEmitter = ContrailEmitter;
forwardJetEmitter = FlyerJetEmitter;
downJetEmitter = FlyerJetEmitter;
//
jetSound = HAPCFlyerThrustSound;
engineSound = HAPCFlyerEngineSound;
softImpactSound = SoftImpactSound;
hardImpactSound = HardImpactSound;
//wheelImpactSound = WheelImpactSound;
//
softSplashSoundVelocity = 5.0;
mediumSplashSoundVelocity = 8.0;
hardSplashSoundVelocity = 12.0;
exitSplashSoundVelocity = 8.0;
exitingWater = VehicleExitWaterHardSound;
impactWaterEasy = VehicleImpactWaterSoftSound;
impactWaterMedium = VehicleImpactWaterMediumSound;
impactWaterHard = VehicleImpactWaterHardSound;
waterWakeSound = VehicleWakeHardSplashSound;
minMountDist = 4;
splashEmitter[0] = VehicleFoamDropletsEmitter;
splashEmitter[1] = VehicleFoamEmitter;
shieldImpact = VehicleShieldImpact;
cmdCategory = "Tactical";
cmdIcon = CMDFlyingHAPCIcon;
cmdMiniIconName = "commander/MiniIcons/com_hapc_grey";
targetNameTag = 'Harbinger';
targetTypeTag = 'Assault Platform';
sensorData = VehiclePulseSensor;
checkRadius = 7.8115;
observeParameters = "1 15 15";
shieldEffectScale = "1.0 0.9375 0.45";
};
function WindshearPlatform::hasDismountOverrides(%data, %obj) {
return true;
}
function WindshearPlatform::getDismountOverride(%data, %obj, %mounted) {
%node = -1;
for (%i = 0; %i < %data.numMountPoints; %i++)
{
if (%obj.getMountNodeObject(%i) == %mounted)
{
%node = %i;
break;
}
}
if (%node == -1)
{
warning("Couldn't find object mount point");
return "0 0 1";
}
if (%node == 3 || %node == 2)
{
return "-1 0 1";
}
else if (%node == 5 || %node == 4)
{
return "1 0 1";
}
else
{
return "0 0 1";
}
}
//**************************************************************
// WEAPONS
//**************************************************************
datablock TurretData(PlatFormPlasma) : TurretDamageProfile {
className = VehicleTurret;
catagory = "Turrets";
shapeFile = "turret_base_large.dts";
preload = true;
mass = 1.0; // Not really relevant
maxEnergy = 200;
maxDamage = 3.0;
destroyedLevel = 3.0;
repairRate = 0;
// capacitor
maxCapacitorEnergy = 250;
capacitorRechargeRate = 1.0;
thetaMin = 0;
thetaMax = 100;
inheritEnergyFromMount = true;
firstPersonOnly = true;
useEyePoint = true;
numWeapons = 1;
cameraDefaultFov = 90.0;
cameraMinFov = 5.0;
cameraMaxFov = 120.0;
targetNameTag = 'Platform';
targetTypeTag = 'Plasma Cannon';
};
datablock TurretData(PlatFormMissile) : PlatFormPlasma {
targetNameTag = 'Platform';
targetTypeTag = 'Missile Turret';
};
datablock TurretData(PlatFormMortar) : PlatFormPlasma {
targetNameTag = 'Platform';
targetTypeTag = 'Mortar Cannon';
};
//
//PLASMA CANNON
//BARREL
//
datablock TargetProjectileData(PlasmaCannonTLProj)
{
directDamage = 0.0;
hasDamageRadius = false;
indirectDamage = 0.0;
damageRadius = 0.0;
velInheritFactor = 1.0;
maxRifleRange = 1000;
beamColor = "0.1 1.0 0.1";
startBeamWidth = 0.3; //0.02
pulseBeamWidth = 0.7; //0.025
beamFlareAngle = 3.0;
minFlareSize = 0.0;
maxFlareSize = 400.0;
pulseSpeed = 6.0;
pulseLength = 0.150;
textureName[0] = "special/nonlingradient";
textureName[1] = "special/flare";
textureName[2] = "special/pulse";
textureName[3] = "special/expFlare";
beacon = true;
};
datablock TracerProjectileData(PlasmaCannonMainProj)
{
doDynamicClientHits = true;
directDamage = 25.5;
explosion = "PlasmaBarrelBoltExplosion";
splash = ChaingunSplash;
directDamageType = $DamageType::PlasmaCannon;
kickBackStrength = 0.0;
sound = ShrikeBlasterProjectileSound;
dryVelocity = 5000.0;
wetVelocity = 0.0;
velInheritFactor = 1.0;
fizzleTimeMS = 200;
lifetimeMS = 200;
explodeOnDeath = false;
reflectOnWaterImpactAngle = 0.0;
explodeOnWaterImpact = true;
deflectionOnWaterImpact = 0.0;
fizzleUnderwaterMS = 3000;
tracerLength = 45.0;
tracerAlpha = false;
tracerMinPixels = 6;
tracerColor = "0.1 1.0 0.1 1.0";
tracerTex[0] = "special/shrikeBolt";
tracerTex[1] = "special/shrikeBoltCross";
tracerWidth = 1.4;
crossSize = 0.99;
crossViewAng = 0.990;
renderCross = true;
};
datablock TurretImageData(PlasmaCannonTLBarrelLarge) {
shapeFile = "turret_aa_large.dts";
activationMS = 175; // z0dd - ZOD, 3/27/02. Was 250. Amount of time it takes turret to unfold
deactivateDelayMS = 500;
thinkTimeMS = 140; // z0dd - ZOD, 3/27/02. Was 200. Amount of time before turret starts to unfold (activate)
degPerSecTheta = 600;
degPerSecPhi = 1080;
attackRadius = 700;
projectile = PlasmaCannonTLProj;
projectileType = TargetProjectile;
deleteLastProjectile = false;
offset = "0.1 0.75 0.0"; // L/R - F/B - T/B
usesEnergy = true;
minEnergy = 0;
stateName[0] = "Activate";
stateSequence[0] = "Activate";
stateSound[0] = TargetingLaserSwitchSound;
stateTimeoutValue[0] = 0.15;
stateTransitionOnTimeout[0] = "Fire";
stateName[3] = "Fire";
stateEnergyDrain[3] = 0;
stateFire[3] = true;
stateScript[3] = "onFire";
};
datablock TurretImageData(PlasmaCannonBarrelLarge) {
shapeFile = "turret_tank_barrelmortar.dts";
projectile = PlasmaCannonMainProj;
projectileType = TracerProjectile;
usesEnergy = true;
fireEnergy = 1;
minEnergy = 1;
emap = true;
// Turret parameters
activationMS = 700; // z0dd - ZOD, 3/27/02. Was 1000. Amount of time it takes turret to unfold
deactivateDelayMS = 1500;
thinkTimeMS = 140; // z0dd - ZOD, 3/27/02. Was 200. Amount of time before turret starts to unfold (activate)
degPerSecTheta = 300;
degPerSecPhi = 500;
attackRadius = 700; // z0dd - ZOD, 3/27/02. Was 300
// State transitions
stateName[0] = "Activate";
stateTransitionOnNotLoaded[0] = "Dead";
stateTransitionOnLoaded[0] = "ActivateReady";
stateName[1] = "ActivateReady";
stateSequence[1] = "Activate";
stateSound[1] = PBLSwitchSound;
stateTimeoutValue[1] = 1;
stateTransitionOnTimeout[1] = "Ready";
stateTransitionOnNotLoaded[1] = "Deactivate";
stateTransitionOnNoAmmo[1] = "NoAmmo";
stateName[2] = "Ready";
stateTransitionOnNotLoaded[2] = "Deactivate";
stateTransitionOnTriggerDown[2] = "Spinup";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateName[3] = "Spinup";
stateSpinThread[3] = SpinUp;
stateSound[3] = ChaingunSpinupSound;
stateScript[3] = "onSpinup";
stateTimeoutValue[3] = 2;
stateWaitForTimeout[3] = false;
stateTransitionOnTimeout[3] = "Fire";
stateTransitionOnTriggerUp[3] = "Spindown";
stateName[4] = "Fire";
stateSequence[4] = "Fire";
stateSpinThread[4] = FullSpeed;
stateScript[4] = "onFire";
stateFire[4] = true;
stateEjectShell[4] = true;
stateTimeoutValue[4] = 1.0;
stateTransitionOnTimeout[4] = "Spindown";
stateTransitionOnTriggerUp[4] = "Spindown";
stateTransitionOnNoAmmo[4] = "EmptySpindown";
//--------------------------------------
stateName[5] = "Spindown";
stateSpinThread[5] = SpinDown;
stateScript[5] = "onSpindown";
stateTimeoutValue[5] = 1.5;
stateWaitForTimeout[5] = true;
stateTransitionOnTimeout[5] = "Ready";
stateTransitionOnTriggerDown[5] = "Spinup";
//--------------------------------------
stateName[6] = "EmptySpindown";
stateSpinThread[6] = SpinDown;
stateScript[6] = "onSpindown";
stateTimeoutValue[5] = 1.5;
stateWaitForTimeout[5] = true;
stateTransitionOnTimeout[6] = "NoAmmo";
//--------------------------------------
stateName[7] = "DryFire";
stateSound[7] = ChaingunDryFireSound;
stateTimeoutValue[7] = 0.5;
stateTransitionOnTimeout[7] = "NoAmmo";
stateName[8] = "Dead";
stateTransitionOnLoaded[8] = "ActivateReady";
stateName[9] = "Deactivate";
stateSequence[9] = "Activate";
stateDirection[9] = false;
stateTimeoutValue[9] = 1.0;
stateTransitionOnLoaded[9] = "ActivateReady";
stateTransitionOnTimeout[9] = "Dead";
stateName[10] = "NoAmmo";
stateTransitionOnAmmo[10] = "Ready";
stateSequence[10] = "NoAmmo";
};
function PlasmaCannonBarrelLarge::onSpinup(%data,%obj,%slot){
%obj.mountImage(PlasmaCannonTLBarrelLarge, 7);
}
function PlasmaCannonBarrelLarge::onSpindown(%data,%obj,%slot){
%obj.unmountImage(7);
}
function PlasmaCannonTLBarrelLarge::onFire(%data,%obj,%slot) {
%p = Parent::onFire(%data, %obj, %slot);
%p.setTarget(%obj.team);
%obj.PBCLP = %p;
%p.schedule(10000, "delete");
}
function PlasmaCannonTLBarrelLarge::onUnmount(%this,%obj,%slot) {
if(isObject(%obj.PBCLP)) {
%obj.PBCLP.delete();
}
Parent::onUnmount(%this, %obj, %slot);
}
//END
//NEEDED FUNCTONS
function WindshearPlatform::onAdd(%this, %obj) {
Parent::onAdd(%this, %obj);
if (%obj.clientControl)
serverCmdResetControlObject(%obj.clientControl);
setTargetSensorGroup(%obj.getTarget(),%obj.team);
//Turrets
//PlatFormPlasma(2,3) PlatFormMissile(4,5) PlatFormMortar(1)
%turret = TurretData::create(PlatFormPlasma);
%turret.selectedWeapon = 1;
MissionCleanup.add(%turret);
%turret.team = %obj.team;
%turret.setSelfPowered();
%obj.mountObject(%turret, 2);
%turret.setCapacitorRechargeRate(999);
%turret.mountobj = %obj;
%obj.turretObject = %turret;
%turret.team = %obj.team;
%turret.base = %obj;
setTargetSensorGroup(%turret.getTarget(),%obj.team);
%turret.mountImage("PlasmaCannonBarrelLarge", 0);
%turret.setAutoFire(true); //YES
%turret2 = TurretData::create(PlatFormPlasma);
%turret2.selectedWeapon = 1;
MissionCleanup.add(%turret2);
%turret2.team = %obj.team;
%turret2.setSelfPowered();
%obj.mountObject(%turret2, 4);
%turret2.setCapacitorRechargeRate(999);
%turret2.mountobj = %obj;
%obj.turretObject2 = %turret2;
%turret2.team = %obj.team;
%turret2.base = %obj;
setTargetSensorGroup(%turret2.getTarget(),%obj.team);
%turret2.mountImage("PlasmaCannonBarrelLarge", 0);
%turret2.setAutoFire(true); //YES
%turret3 = TurretData::create(PlatFormMissile);
%turret3.selectedWeapon = 1;
MissionCleanup.add(%turret3);
%turret3.team = %obj.team;
%turret3.setSelfPowered();
%obj.mountObject(%turret3, 3);
%turret3.setCapacitorRechargeRate(999);
%turret3.mountobj = %obj;
%obj.turretObject3 = %turret3;
%turret3.team = %obj.team;
%turret3.base = %obj;
setTargetSensorGroup(%turret3.getTarget(),%obj.team);
%turret3.mountImage("MissileBarrelLarge", 0);
%turret3.setAutoFire(true); //YES
%turret4 = TurretData::create(PlatFormMissile);
%turret4.selectedWeapon = 1;
MissionCleanup.add(%turret4);
%turret4.team = %obj.team;
%turret4.setSelfPowered();
%obj.mountObject(%turret4, 5);
%turret4.setCapacitorRechargeRate(999);
%turret4.mountobj = %obj;
%obj.turretObject4 = %turret4;
%turret4.team = %obj.team;
%turret4.base = %obj;
setTargetSensorGroup(%turret4.getTarget(),%obj.team);
%turret4.mountImage("MissileBarrelLarge", 0);
%turret4.setAutoFire(true); //YES
%turret5 = TurretData::create(PlatFormMortar);
%turret5.selectedWeapon = 1;
MissionCleanup.add(%turret5);
%turret5.team = %obj.team;
%turret5.setSelfPowered();
%obj.mountObject(%turret5, 1);
%turret5.setCapacitorRechargeRate(999);
%turret5.mountobj = %obj;
%obj.turretObject5 = %turret5;
%turret5.team = %obj.team;
%turret5.base = %obj;
setTargetSensorGroup(%turret5.getTarget(),%obj.team);
%turret5.mountImage("MortarBarrelLarge", 0);
%turret5.setAutoFire(true); //YES
%obj.schedule(5500, "playThread", $ActivateThread, "activate");
}
function WindshearPlatform::deleteAllMounted(%data, %obj) {
%turret = %obj.turretObject;
if (!%turret)
return;
%turret.schedule(1000, delete);
%turret2 = %obj.turretObject2;
if (!%turret2)
return;
%turret2.schedule(1000, delete);
%turret3 = %obj.turretObject3;
if (!%turret3)
return;
%turret3.schedule(1000, delete);
%turret4 = %obj.turretObject4;
if (!%turret4)
return;
%turret4.schedule(1000, delete);
%turret5 = %obj.turretObject5;
if (!%turret5)
return;
%turret5.schedule(1000, delete);
}

View file

@ -0,0 +1,656 @@
datablock TracerProjectileData(AC130120MM) {
doDynamicClientHits = true;
directDamage = 0.45; // z0dd - ZOD, 9-27-02. Was 0.0825
directDamageType = $DamageType::GunTurret;
hasDamageRadius = true;
indirectDamage = 4.45;
damageRadius = 20.0;
radiusDamageType = $DamageType::GunTurret;
explosion = "LargeSatchelMainExplosion";
splash = ChaingunSplash;
kickBackStrength = 1500.0;
sound = BomberBombProjectileSound;
//dryVelocity = 425.0;
dryVelocity = 300.0; // z0dd - ZOD, 8-12-02. Was 425.0
wetVelocity = 200.0;
velInheritFactor = 0.0;
fizzleTimeMS = 30000;
lifetimeMS = 30000;
explodeOnDeath = false;
reflectOnWaterImpactAngle = 0.0;
explodeOnWaterImpact = false;
deflectionOnWaterImpact = 0.0;
fizzleUnderwaterMS = 3000;
tracerLength = 60.0;
tracerAlpha = false;
tracerMinPixels = 6;
tracerColor = 211.0/255.0 @ " " @ 215.0/255.0 @ " " @ 120.0/255.0 @ " 0.75";
tracerTex[0] = "special/tracer00";
tracerTex[1] = "special/tracercross";
tracerWidth = 5.25;
crossSize = 0.20;
crossViewAng = 0.990;
renderCross = true;
decalData[0] = ChaingunDecal1;
decalData[1] = ChaingunDecal2;
decalData[2] = ChaingunDecal3;
decalData[3] = ChaingunDecal4;
decalData[4] = ChaingunDecal5;
decalData[5] = ChaingunDecal6;
};
datablock TracerProjectileData(AC13045MM) {
doDynamicClientHits = true;
directDamage = 0.45; // z0dd - ZOD, 9-27-02. Was 0.0825
directDamageType = $DamageType::GunTurret;
hasDamageRadius = true;
indirectDamage = 0.5;
damageRadius = 13.0;
radiusDamageType = $DamageType::GunTurret;
explosion = "VehicleBombExplosion";
splash = ChaingunSplash;
kickBackStrength = 1500.0;
sound = ChaingunProjectile;
//dryVelocity = 425.0;
dryVelocity = 800.0; // z0dd - ZOD, 8-12-02. Was 425.0
wetVelocity = 600.0;
velInheritFactor = 0.0;
fizzleTimeMS = 30000;
lifetimeMS = 30000;
explodeOnDeath = false;
reflectOnWaterImpactAngle = 0.0;
explodeOnWaterImpact = false;
deflectionOnWaterImpact = 0.0;
fizzleUnderwaterMS = 3000;
tracerLength = 15.0;
tracerAlpha = false;
tracerMinPixels = 6;
tracerColor = 211.0/255.0 @ " " @ 215.0/255.0 @ " " @ 120.0/255.0 @ " 0.75";
tracerTex[0] = "special/tracer00";
tracerTex[1] = "special/tracercross";
tracerWidth = 2.25;
crossSize = 0.20;
crossViewAng = 0.990;
renderCross = true;
decalData[0] = ChaingunDecal1;
decalData[1] = ChaingunDecal2;
decalData[2] = ChaingunDecal3;
decalData[3] = ChaingunDecal4;
decalData[4] = ChaingunDecal5;
decalData[5] = ChaingunDecal6;
};
//Vehicle
datablock FlyingVehicleData(AC130) : BomberDamageProfile
{
spawnOffset = "0 0 2";
canControl = true;
catagory = "Vehicles";
shapeFile = "vehicle_air_bomber.dts";
multipassenger = true;
computeCRC = true;
weaponNode = 1;
debrisShapeName = "vehicle_air_bomber_debris.dts";
debris = ShapeDebris;
renderWhenDestroyed = false;
drag = 0.2;
density = 1.0;
mountPose[0] = sitting;
mountPose[1] = sitting;
numMountPoints = 2;
isProtectedMountPoint[0] = true;
isProtectedMountPoint[1] = true;
cameraDefaultFov = 90.0;
cameraMinFov = 5.0;
cameraMaxFov = 120.0;
cameraMaxDist = 22;
cameraOffset = 5;
cameraLag = 1.0;
explosion = LargeAirVehicleExplosion;
explosionDamage = 0.5;
explosionRadius = 5.0;
maxDamage = 6.00; // Total health
destroyedLevel = 6.00; // Damage textures show up at this health level
isShielded = true;
energyPerDamagePoint = 150;
maxEnergy = 400; // Afterburner and any energy weapon pool
minDrag = 60; // Linear Drag (eventually slows you down when not thrusting...constant drag)
rotationalDrag = 1800; // Angular Drag (dampens the drift after you stop moving the mouse...also tumble drag)
rechargeRate = 0.8;
// Auto stabilize speed
maxAutoSpeed = 15; // Autostabilizer kicks in when less than this speed. (meters/second)
autoAngularForce = 1500; // Angular stabilizer force (this force levels you out when autostabilizer kicks in)
autoLinearForce = 300; // Linear stabilzer force (this slows you down when autostabilizer kicks in)
autoInputDamping = 0.95; // Dampen control input so you don't whack out at very slow speeds
// Maneuvering
maxSteeringAngle = 5; // Max radiens you can rotate the wheel. Smaller number is more maneuverable.
horizontalSurfaceForce = 5; // Horizontal center "wing" (provides "bite" into the wind for climbing/diving and turning)
verticalSurfaceForce = 8; // Vertical center "wing" (controls side slip. lower numbers make MORE slide.)
maneuveringForce = 4700; // Horizontal jets (W,S,D,A key thrust)
steeringForce = 1100; // Steering jets (force applied when you move the mouse)
steeringRollForce = 300; // Steering jets (how much you heel over when you turn)
rollForce = 8; // Auto-roll (self-correction to right you after you roll/invert)
hoverHeight = 5; // Height off the ground at rest
createHoverHeight = 3; // Height off the ground when created
maxForwardSpeed = 85; // speed in which forward thrust force is no longer applied (meters/second)
// Turbo Jet
jetForce = 3000; // Afterburner thrust (this is in addition to normal thrust)
minJetEnergy = 40.0; // Afterburner can't be used if below this threshhold.
jetEnergyDrain = 3.0; // Energy use of the afterburners (low number is less drain...can be fractional)
vertThrustMultiple = 3.0;
dustEmitter = LargeVehicleLiftoffDustEmitter;
triggerDustHeight = 4.0;
dustHeight = 2.0;
damageEmitter[0] = LightDamageSmoke;
damageEmitter[1] = HeavyDamageSmoke;
damageEmitter[2] = DamageBubbles;
damageEmitterOffset[0] = "3.0 -3.0 0.0 ";
damageEmitterOffset[1] = "-3.0 -3.0 0.0 ";
damageLevelTolerance[0] = 0.3;
damageLevelTolerance[1] = 0.7;
numDmgEmitterAreas = 2;
// Rigid body
mass = 350; // Mass of the vehicle
bodyFriction = 0; // Don't mess with this.
bodyRestitution = 0.5; // When you hit the ground, how much you rebound. (between 0 and 1)
minRollSpeed = 0; // Don't mess with this.
softImpactSpeed = 20; // Sound hooks. This is the soft hit.
hardImpactSpeed = 25; // Sound hooks. This is the hard hit.
// Ground Impact Damage (uses DamageType::Ground)
minImpactSpeed = 40; // If hit ground at speed above this then it's an impact. Meters/second
speedDamageScale = 0.060;
// Object Impact Damage (uses DamageType::Impact)
collDamageThresholdVel = 25;
collDamageMultiplier = 0.020;
//
minTrailSpeed = 15; // The speed your contrail shows up at.
trailEmitter = ContrailEmitter;
forwardJetEmitter = FlyerJetEmitter;
downJetEmitter = FlyerJetEmitter;
//
jetSound = BomberFlyerThrustSound;
engineSound = BomberFlyerEngineSound;
softImpactSound = SoftImpactSound;
hardImpactSound = HardImpactSound;
//wheelImpactSound = WheelImpactSound;
//
softSplashSoundVelocity = 15.0;
mediumSplashSoundVelocity = 20.0;
hardSplashSoundVelocity = 30.0;
exitSplashSoundVelocity = 10.0;
exitingWater = VehicleExitWaterHardSound;
impactWaterEasy = VehicleImpactWaterSoftSound;
impactWaterMedium = VehicleImpactWaterMediumSound;
impactWaterHard = VehicleImpactWaterHardSound;
waterWakeSound = VehicleWakeHardSplashSound;
minMountDist = 4;
splashEmitter[0] = VehicleFoamDropletsEmitter;
splashEmitter[1] = VehicleFoamEmitter;
shieldImpact = VehicleShieldImpact;
cmdCategory = "Tactical";
cmdIcon = CMDFlyingBomberIcon;
cmdMiniIconName = "commander/MiniIcons/com_bomber_grey";
targetNameTag = 'AC-130';
targetTypeTag = 'Gunship';
sensorData = AerialGunshipSensor;
max[MiniChaingunAmmo] = 9999;
max[MissileLauncherAmmo] = 9999;
max[MortarAmmo] = 9999;
checkRadius = 7.1895;
observeParameters = "1 10 10";
shieldEffectScale = "0.75 0.975 0.375";
showPilotInfo = 1;
};
//TURRET
datablock TurretData(AC130GunshipTurret) : TurretDamageProfile
{
className = VehicleTurret;
catagory = "Turrets";
shapeFile = "turret_belly_base.dts";
preload = true;
canControl = false;
cmdCategory = "Tactical";
cmdIcon = CMDFlyingBomberIcon;
cmdMiniIconName = "commander/MiniIcons/com_bomber_grey";
targetNameTag = 'AC-130';
targetTypeTag = 'Cannon';
mass = 1.0; // Not really relevant
repairRate = 0;
maxDamage = AC130.maxDamage;
destroyedLevel = AC130.destroyedLevel;
thetaMin = 90;
thetaMax = 180;
inheritEnergyFromMount = true;
firstPersonOnly = true;
useEyePoint = true;
numWeapons = 3;
max[MiniChaingunAmmo] = 9999;
max[MissileLauncherAmmo] = 9999;
max[MortarAmmo] = 9999;
};
datablock TurretImageData(AC130GunshipCGImage) {
shapeFile = "turret_tank_barrelchain.dts";
offset = "-0.3 0 0";
mountPoint = 0;
item = MiniChaingun;
ammo = MiniChaingunAmmo;
projectile = ApacheCGBullet;
projectileType = TracerProjectile;
projectileSpread = 0.4 / 1000.0;
emap = true;
casing = ShellDebris;
shellExitDir = "1.0 0.3 1.0";
shellExitOffset = "0.15 -0.56 -0.1";
shellExitVariance = 5.0;
shellVelocity = 0.0;
usesEnergy = true;
useMountEnergy = false;
// Turret parameters
activationMS = 175; // z0dd - ZOD, 3/27/02. Was 250. Amount of time it takes turret to unfold
deactivateDelayMS = 500;
thinkTimeMS = 140; // z0dd - ZOD, 3/27/02. Was 200. Amount of time before turret starts to unfold (activate)
degPerSecTheta = 600;
degPerSecPhi = 1080;
attackRadius = 2000;
stateName[0] = "Activate";
stateSequence[0] = "Activate";
// stateSound[0] = GravChaingunIdleSound;
stateAllowImageChange[0] = true;
stateTimeoutValue[0] = 0.1;
stateTransitionOnTimeout[0] = "Ready";
stateName[1] = "Ready";
stateSpinThread[1] = Stop;
stateTransitionOnTriggerDown[1] = "Spinup";
stateName[2] = "Spinup";
stateSpinThread[2] = SpinUp;
//stateSound[3] = ChaingunSpinupSound;
stateTimeoutValue[2] = 0.2;
stateWaitForTimeout[2] = false;
stateTransitionOnTimeout[2] = "Fire";
stateTransitionOnTriggerUp[2] = "Spindown";
stateName[3] = "Fire";
stateSequence[3] = "Fire";
stateSequenceRandomFlash[3] = true;
stateSpinThread[3] = FullSpeed;
stateSound[3] = ChaingunFireSound;
//stateRecoil[4] = LightRecoil;
stateAllowImageChange[3] = true;
stateScript[3] = "onFire";
stateFire[3] = true;
stateEjectShell[3] = true;
stateTimeoutValue[3] = 0.01;
stateTransitionOnTimeout[3] = "Fire";
stateTransitionOnTriggerUp[3] = "Spindown";
stateName[4] = "Spindown";
//stateSound[5] = ChaingunSpinDownSound;
stateSpinThread[4] = SpinDown;
stateTimeoutValue[4] = 0.05;
stateWaitForTimeout[4] = true;
stateTransitionOnTimeout[4] = "Ready";
stateTransitionOnTriggerDown[4] = "Spinup";
stateName[5] = "DryFire";
stateSound[5] = ShrikeBlasterDryFireSound;
stateTimeoutValue[5] = 0.5;
};
datablock TurretImageData(AC130BigCannonImage) {
shapeFile = "turret_tank_barrelmortar.dts";
offset = "-0.3 0 0";
mountPoint = 0;
item = Mortar;
projectile = AC130120MM;
projectileType = TracerProjectile;
projectileSpread = 0.4 / 1000.0;
emap = true;
casing = ShellDebris;
shellExitDir = "1.0 0.3 1.0";
shellExitOffset = "0.15 -0.56 -0.1";
shellExitVariance = 5.0;
shellVelocity = 0.0;
usesEnergy = true;
useMountEnergy = false;
// Turret parameters
activationMS = 175; // z0dd - ZOD, 3/27/02. Was 250. Amount of time it takes turret to unfold
deactivateDelayMS = 500;
thinkTimeMS = 140; // z0dd - ZOD, 3/27/02. Was 200. Amount of time before turret starts to unfold (activate)
degPerSecTheta = 600;
degPerSecPhi = 1080;
attackRadius = 2000;
// State transitions
stateName[0] = "Activate";
stateTransitionOnNotLoaded[0] = "Dead";
stateTransitionOnLoaded[0] = "ActivateReady";
stateName[1] = "ActivateReady";
stateSequence[1] = "Activate";
stateSound[1] = MBLSwitchSound;
stateTimeoutValue[1] = 1;
stateTransitionOnTimeout[1] = "Ready";
stateTransitionOnNotLoaded[1] = "Deactivate";
stateName[2] = "Ready";
stateTransitionOnNotLoaded[2] = "Deactivate";
stateTransitionOnTriggerDown[2] = "Fire1";
stateName[3] = "Fire1";
stateTransitionOnTimeout[3] = "Reload";
stateTimeoutValue[3] = 0.3;
stateFire[3] = true;
stateRecoil[3] = LightRecoil;
stateAllowImageChange[3] = true;
stateSequence[3] = "Fire";
stateSound[3] = EscapePodLaunchSound;
stateScript[3] = "onFire";
stateName[4] = "Reload";
stateTimeoutValue[4] = 6.0;
stateAllowImageChange[4] = true;
stateSequence[4] = "Reload";
stateTransitionOnTimeout[4] = "Ready";
stateTransitionOnNotLoaded[4] = "Deactivate";
stateName[5] = "Deactivate";
stateSequence[5] = "Activate";
stateDirection[5] = false;
stateTimeoutValue[5] = 1;
stateTransitionOnLoaded[5] = "ActivateReady";
stateTransitionOnTimeout[5] = "Dead";
stateName[6] = "Dead";
stateTransitionOnLoaded[6] = "ActivateReady";
};
datablock TurretImageData(AC130LittleCannonImage) {
shapeFile = "turret_mortar_large.dts";
offset = "-0.3 0 0";
mountPoint = 0;
item = MissileLauncher;
projectile = AC13045MM;
projectileType = TracerProjectile;
projectileSpread = 0.4 / 1000.0;
emap = true;
casing = ShellDebris;
shellExitDir = "1.0 0.3 1.0";
shellExitOffset = "0.15 -0.56 -0.1";
shellExitVariance = 5.0;
shellVelocity = 0.0;
usesEnergy = true;
useMountEnergy = false;
// Turret parameters
activationMS = 175; // z0dd - ZOD, 3/27/02. Was 250. Amount of time it takes turret to unfold
deactivateDelayMS = 500;
thinkTimeMS = 140; // z0dd - ZOD, 3/27/02. Was 200. Amount of time before turret starts to unfold (activate)
degPerSecTheta = 600;
degPerSecPhi = 1080;
attackRadius = 2000;
// State transitions
stateName[0] = "Activate";
stateTransitionOnNotLoaded[0] = "Dead";
stateTransitionOnLoaded[0] = "ActivateReady";
stateName[1] = "ActivateReady";
stateSequence[1] = "Activate";
stateSound[1] = MBLSwitchSound;
stateTimeoutValue[1] = 1;
stateTransitionOnTimeout[1] = "Ready";
stateTransitionOnNotLoaded[1] = "Deactivate";
stateName[2] = "Ready";
stateTransitionOnNotLoaded[2] = "Deactivate";
stateTransitionOnTriggerDown[2] = "Fire1";
stateName[3] = "Fire1";
stateTransitionOnTimeout[3] = "Reload";
stateTimeoutValue[3] = 0.3;
stateFire[3] = true;
stateRecoil[3] = LightRecoil;
stateAllowImageChange[3] = true;
stateSequence[3] = "Fire";
stateSound[3] = MBLFireSound;
stateScript[3] = "onFire";
stateName[4] = "Reload";
stateTimeoutValue[4] = 0.8;
stateAllowImageChange[4] = true;
stateSequence[4] = "Reload";
stateTransitionOnTimeout[4] = "Ready";
stateTransitionOnNotLoaded[4] = "Deactivate";
stateName[5] = "Deactivate";
stateSequence[5] = "Activate";
stateDirection[5] = false;
stateTimeoutValue[5] = 1;
stateTransitionOnLoaded[5] = "ActivateReady";
stateTransitionOnTimeout[5] = "Dead";
stateName[6] = "Dead";
stateTransitionOnLoaded[6] = "ActivateReady";
};
//Functions
function AC130::deleteAllMounted(%data, %obj) {
%turret = %obj.turretObject;
if (!%turret) {
}
else {
if(%turret.getControllingClient() != 0) {
%cl = %turret.getControllingClient();
if(isObject(%cl.player) && %cl.player.getState() !$= "dead") {
%cl.setControlObject(%cl.player);
}
}
%turret.schedule(1000, delete);
}
}
function AC130::playerMounted(%data, %obj, %player, %node) {
switch(%node) {
case 0:
bottomPrint(%player.client, "PILOT: Fly around \n [MINE] Toggle Weapons (No Gunner)", 2, 2);
case 1:
bottomPrint(%player.client, "GUNNER: Fire... \n [MINE] Toggle Weapons", 2, 2);
%player.client.setControlObject(%obj.turretObject);
%player.isACGunner = 1;
}
}
function AC130::onAdd(%this, %obj) {
Parent::onAdd(%this, %obj);
setTargetSensorGroup(%obj.getTarget(),%obj.team);
%turret = TurretData::create(AC130GunshipTurret);
%turret.selectedWeapon = 1;
MissionCleanup.add(%turret);
%turret.setSelfPowered();
%obj.mountObject(%turret, 10);
%turret.setCapacitorRechargeRate(999);
%turret.mountobj = %obj;
%obj.turretObject = %turret;
%turret.team = %obj.team;
%turret.base = %obj;
%turret.mountImage(AC130GunshipCGImage,0);
setTargetSensorGroup(%turret.getTarget(),%obj.team);
%turret.setAutoFire(true); //YES
%turret.setInventory(MiniChaingunAmmo, 9999, true);
%turret.setInventory(MissileLauncherAmmo, 9999, true);
%turret.setInventory(MortarAmmo, 9999, true);
%obj.barrel = "Chain";
}
function AC130::onTrigger(%data, %obj, %trigger, %state) {
%plyr = %obj.getMountNodeObject(0);
if(%obj.turretObject.getControllingClient() != 0) {
BottomPrint(%plyr.client, "AC130: There is a gunner, cannot change weapons", 3, 1);
return;
}
if(%state == 1 && %trigger == 5) {
if(%obj.barrel $= "Chain") {
%obj.barrel = "120";
%obj.turretObject.mountImage(AC130BigCannonImage, 0);
BottomPrint(%plyr.client, "AC130: Switching to 120MM Cannon", 3, 1);
}
else if(%obj.barrel $= "120") {
%obj.barrel = "45";
%obj.turretObject.mountImage(AC130LittleCannonImage, 0);
BottomPrint(%plyr.client, "AC130: Switching to 45MM Cannon", 3, 1);
}
else if(%obj.barrel $= "45") {
%obj.barrel = "Chain";
%obj.turretObject.mountImage(AC130GunshipCGImage, 0);
BottomPrint(%plyr.client, "AC130: Switching to 25Cal Chaingun", 3, 1);
}
}
}
function AC130GunshipTurret::playerDismount(%data, %obj) {
%client = %obj.getControllingClient();
commandToClient( %client, 'VehicleDismount' );
%client.player.mountVehicle = false;
%client.player.isACGunner = 0;
if(%client.player.getState() !$= "Dead") {
%client.player.mountImage(%client.player.lastWeapon, $WeaponSlot);
}
}
function AC130GunshipTurret::onTrigger(%data, %obj, %trigger, %state) {
if(!isObject(%obj.getMountNodeObject(1))) {
%cl = %obj.getControllingClient();
}
else {
%cl = %obj.getMountNodeObject(1).client;
}
//
switch(%trigger) {
case 2:
if(%state && %cl.player.isACGunner) {
%cl.setControlObject(%cl.player);
%obj.getDataBlock().playerDismount(%obj);
}
case 5:
if(%state) {
if(%obj.mountobj.barrel $= "Chain") {
%obj.mountobj.barrel = "120";
%obj.mountImage(AC130BigCannonImage, 0);
BottomPrint(%cl, "AC130: Switching to 120MM Cannon", 3, 1);
commandToClient(%cl, 'setWeaponsHudActive', '', "gui/hud_ret_targlaser", true);
}
else if(%obj.mountobj.barrel $= "120") {
%obj.mountobj.barrel = "45";
%obj.mountImage(AC130LittleCannonImage, 0);
BottomPrint(%cl, "AC130: Switching to 45MM Cannon", 3, 1);
commandToClient(%cl, 'setWeaponsHudActive', '', "gui/hud_ret_targlaser", true);
}
else if(%obj.mountobj.barrel $= "45") {
%obj.mountobj.barrel = "Chain";
%obj.mountImage(AC130GunshipCGImage, 0);
BottomPrint(%cl, "AC130: Switching to 25Cal Chaingun", 3, 1);
commandToClient(%cl, 'setWeaponsHudActive', '', "gui/hud_ret_targlaser", true);
}
}
}
}
function AC130GunshipTurret::onDamage(%data, %obj) {
%newDamageVal = %obj.getDamageLevel();
if(%obj.lastDamageVal !$= "")
if(isObject(%obj.getObjectMount()) && %obj.lastDamageVal > %newDamageVal)
%obj.getObjectMount().setDamageLevel(%newDamageVal);
%obj.lastDamageVal = %newDamageVal;
}
function AC130BigCannonImage::onFire(%data, %obj, %slot) {
%p = Parent::onFire(%data, %obj, %slot);
if(isObject(%obj.GetControllingClient().player) && %obj.GetControllingClient().player.getState() !$= "dead") {
%p.sourceObject = %obj.GetControllingClient().player;
//Now I get ze killz... muhaha
//messageAllExcept(%obj.GetControllingClient(), -1, 'msgFia', "~wfx/Bonuses/high-level4-blazing.wav");
}
}
function AC130LittleCannonImage::onFire(%data, %obj, %slot) {
%p = Parent::onFire(%data, %obj, %slot);
if(isObject(%obj.GetControllingClient().player) && %obj.GetControllingClient().player.getState() !$= "dead") {
%p.sourceObject = %obj.GetControllingClient().player;
//Now I get ze killz... muhaha
//messageAllExcept(%obj.GetControllingClient(), -1, 'msgFia', "~wfx/powered/turret_mortar_fire.wav");
}
}
function AC130GunshipCGImage::onFire(%data, %obj, %slot) {
%p = Parent::onFire(%data, %obj, %slot);
if(isObject(%obj.GetControllingClient().player) && %obj.GetControllingClient().player.getState() !$= "dead") {
%p.sourceObject = %obj.GetControllingClient().player;
//Now I get ze killz... muhaha
//messageAllExcept(%obj.GetControllingClient(), -1, 'msgFia', "~wfx/weapons/chaingun_fire.wav");
}
}

View file

@ -0,0 +1,925 @@
//**************************************************************
// THUNDERSWORD BOMBER
//**************************************************************
//**************************************************************
// SOUNDS
//**************************************************************
datablock AudioProfile(BomberFlyerEngineSound)
{
filename = "fx/vehicles/bomber_engine.wav";
description = AudioDefaultLooping3d;
preload = true;
};
datablock AudioProfile(BomberFlyerThrustSound)
{
filename = "fx/vehicles/bomber_boost.wav";
description = AudioDefaultLooping3d;
preload = true;
};
datablock AudioProfile(FusionExpSound)
// Sound played when mortar impacts on target
{
filename = "fx/powered/turret_mortar_explode.wav";
description = "AudioBIGExplosion3d";
preload = true;
};
datablock AudioProfile(BomberTurretFireSound)
{
filename = "fx/vehicles/bomber_turret_fire.wav";
description = AudioClose3d;
preload = true;
};
datablock AudioProfile(BomberTurretActivateSound)
{
filename = "fx/vehicles/bomber_turret_activate.wav";
description = AudioClose3d;
preload = true;
};
datablock AudioProfile(BomberTurretReloadSound)
{
filename = "fx/vehicles/bomber_turret_reload.wav";
description = AudioClose3d;
preload = true;
};
datablock AudioProfile(BomberTurretIdleSound)
{
filename = "fx/misc/diagnostic_on.wav";
description = ClosestLooping3d;
preload = true;
};
datablock AudioProfile(BomberTurretDryFireSound)
{
filename = "fx/vehicles/bomber_turret_dryfire.wav";
description = AudioClose3d;
preload = true;
};
datablock AudioProfile(BomberBombReloadSound)
{
filename = "fx/vehicles/bomber_bomb_reload.wav";
description = AudioClose3d;
preload = true;
};
datablock AudioProfile(BomberBombProjectileSound)
{
filename = "fx/vehicles/bomber_bomb_projectile.wav";
description = AudioDefaultLooping3d;
preload = true;
};
datablock AudioProfile(BomberBombDryFireSound)
{
filename = "fx/vehicles/bomber_bomb_dryfire.wav";
description = AudioClose3d;
preload = true;
};
datablock AudioProfile(BomberBombFireSound)
{
filename = "fx/vehicles/bomber_bomb_reload.wav";
description = AudioClose3d;
preload = true;
};
datablock AudioProfile(BomberBombIdleSound)
{
filename = "fx/misc/diagnostic_on.wav";
description = ClosestLooping3d;
preload = true;
};
//**************************************************************
// VEHICLE CHARACTERISTICS
//**************************************************************
datablock FlyingVehicleData(BomberFlyer) : BomberDamageProfile
{
spawnOffset = "0 0 2";
canControl = true;
catagory = "Vehicles";
shapeFile = "vehicle_air_bomber.dts";
multipassenger = true;
computeCRC = true;
weaponNode = 1;
debrisShapeName = "vehicle_air_bomber_debris.dts";
debris = ShapeDebris;
renderWhenDestroyed = false;
drag = 0.2;
density = 1.0;
mountPose[0] = sitting;
mountPose[1] = sitting;
numMountPoints = 3;
isProtectedMountPoint[0] = true;
isProtectedMountPoint[1] = true;
isProtectedMountPoint[2] = true;
cameraDefaultFov = 90.0;
cameraMinFov = 5.0;
cameraMaxFov = 120.0;
cameraMaxDist = 22;
cameraOffset = 5;
cameraLag = 1.0;
explosion = LargeAirVehicleExplosion;
explosionDamage = 0.5;
explosionRadius = 5.0;
maxDamage = 2.80; // Total health
destroyedLevel = 2.80; // Damage textures show up at this health level
isShielded = true;
energyPerDamagePoint = 150;
maxEnergy = 400; // Afterburner and any energy weapon pool
minDrag = 60; // Linear Drag (eventually slows you down when not thrusting...constant drag)
rotationalDrag = 1800; // Angular Drag (dampens the drift after you stop moving the mouse...also tumble drag)
rechargeRate = 0.8;
// Auto stabilize speed
maxAutoSpeed = 15; // Autostabilizer kicks in when less than this speed. (meters/second)
autoAngularForce = 1500; // Angular stabilizer force (this force levels you out when autostabilizer kicks in)
autoLinearForce = 300; // Linear stabilzer force (this slows you down when autostabilizer kicks in)
autoInputDamping = 0.95; // Dampen control input so you don't whack out at very slow speeds
// Maneuvering
maxSteeringAngle = 5; // Max radiens you can rotate the wheel. Smaller number is more maneuverable.
horizontalSurfaceForce = 5; // Horizontal center "wing" (provides "bite" into the wind for climbing/diving and turning)
verticalSurfaceForce = 8; // Vertical center "wing" (controls side slip. lower numbers make MORE slide.)
maneuveringForce = 4700; // Horizontal jets (W,S,D,A key thrust)
steeringForce = 1100; // Steering jets (force applied when you move the mouse)
steeringRollForce = 300; // Steering jets (how much you heel over when you turn)
rollForce = 8; // Auto-roll (self-correction to right you after you roll/invert)
hoverHeight = 5; // Height off the ground at rest
createHoverHeight = 3; // Height off the ground when created
maxForwardSpeed = 85; // speed in which forward thrust force is no longer applied (meters/second)
// Turbo Jet
jetForce = 3000; // Afterburner thrust (this is in addition to normal thrust)
minJetEnergy = 40.0; // Afterburner can't be used if below this threshhold.
jetEnergyDrain = 3.0; // Energy use of the afterburners (low number is less drain...can be fractional)
vertThrustMultiple = 3.0;
dustEmitter = LargeVehicleLiftoffDustEmitter;
triggerDustHeight = 4.0;
dustHeight = 2.0;
damageEmitter[0] = LightDamageSmoke;
damageEmitter[1] = HeavyDamageSmoke;
damageEmitter[2] = DamageBubbles;
damageEmitterOffset[0] = "3.0 -3.0 0.0 ";
damageEmitterOffset[1] = "-3.0 -3.0 0.0 ";
damageLevelTolerance[0] = 0.3;
damageLevelTolerance[1] = 0.7;
numDmgEmitterAreas = 2;
// Rigid body
mass = 350; // Mass of the vehicle
bodyFriction = 0; // Don't mess with this.
bodyRestitution = 0.5; // When you hit the ground, how much you rebound. (between 0 and 1)
minRollSpeed = 0; // Don't mess with this.
softImpactSpeed = 20; // Sound hooks. This is the soft hit.
hardImpactSpeed = 25; // Sound hooks. This is the hard hit.
// Ground Impact Damage (uses DamageType::Ground)
minImpactSpeed = 20; // If hit ground at speed above this then it's an impact. Meters/second
speedDamageScale = 0.060;
// Object Impact Damage (uses DamageType::Impact)
collDamageThresholdVel = 25;
collDamageMultiplier = 0.020;
//
minTrailSpeed = 15; // The speed your contrail shows up at.
trailEmitter = ContrailEmitter;
forwardJetEmitter = FlyerJetEmitter;
downJetEmitter = FlyerJetEmitter;
//
jetSound = BomberFlyerThrustSound;
engineSound = BomberFlyerEngineSound;
softImpactSound = SoftImpactSound;
hardImpactSound = HardImpactSound;
//wheelImpactSound = WheelImpactSound;
//
softSplashSoundVelocity = 15.0;
mediumSplashSoundVelocity = 20.0;
hardSplashSoundVelocity = 30.0;
exitSplashSoundVelocity = 10.0;
exitingWater = VehicleExitWaterHardSound;
impactWaterEasy = VehicleImpactWaterSoftSound;
impactWaterMedium = VehicleImpactWaterMediumSound;
impactWaterHard = VehicleImpactWaterHardSound;
waterWakeSound = VehicleWakeHardSplashSound;
minMountDist = 4;
splashEmitter[0] = VehicleFoamDropletsEmitter;
splashEmitter[1] = VehicleFoamEmitter;
shieldImpact = VehicleShieldImpact;
cmdCategory = "Tactical";
cmdIcon = CMDFlyingBomberIcon;
cmdMiniIconName = "commander/MiniIcons/com_bomber_grey";
targetNameTag = 'Thundersword';
targetTypeTag = 'Bomber';
sensorData = VehiclePulseSensor;
checkRadius = 7.1895;
observeParameters = "1 10 10";
shieldEffectScale = "0.75 0.975 0.375";
showPilotInfo = 1;
};
//**************************************************************
// WEAPONS
//**************************************************************
//-------------------------------------
// BOMBER BELLY TURRET GUN (projectile)
//-------------------------------------
datablock ShockwaveData(BomberFusionShockwave)
{
width = 0.5;
numSegments = 13;
numVertSegments = 1;
velocity = 0.5;
acceleration = 2.0;
lifetimeMS = 900;
height = 0.1;
verticalCurve = 0.5;
mapToTerrain = false;
renderBottom = false;
orientToNormal = true;
texture[0] = "special/shockwave5";
texture[1] = "special/gradient";
texWrap = 3.0;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
colors[0] = "0.6 0.6 1.0 1.0";
colors[1] = "0.6 0.3 1.0 0.5";
colors[2] = "0.0 0.0 1.0 0.0";
};
datablock ParticleData(BomberFusionExplosionParticle1)
{
dragCoefficient = 2;
gravityCoefficient = 0.0;
inheritedVelFactor = 0.2;
constantAcceleration = -0.0;
lifetimeMS = 600;
lifetimeVarianceMS = 000;
textureName = "special/crescent4";
colors[0] = "0.6 0.6 1.0 1.0";
colors[1] = "0.6 0.3 1.0 1.0";
colors[2] = "0.0 0.0 1.0 0.0";
sizes[0] = 0.25;
sizes[1] = 0.5;
sizes[2] = 1.0;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ParticleEmitterData(BomberFusionExplosionEmitter)
{
ejectionPeriodMS = 7;
periodVarianceMS = 0;
ejectionVelocity = 2;
velocityVariance = 1.5;
ejectionOffset = 0.0;
thetaMin = 80;
thetaMax = 90;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvances = false;
orientParticles = true;
lifetimeMS = 200;
particles = "BomberFusionExplosionParticle1";
};
datablock ExplosionData(BomberFusionBoltExplosion)
{
soundProfile = blasterExpSound;
shockwave = BomberFusionShockwave;
emitter[0] = BomberFusionExplosionEmitter;
};
datablock LinearFlareProjectileData(BomberFusionBolt)
{
projectileShapeName = "";
directDamage = 0.35;
directDamageType = $DamageType::BellyTurret;
hasDamageRadius = false;
explosion = BomberFusionBoltExplosion;
sound = BlasterProjectileSound;
dryVelocity = 200.0;
wetVelocity = 200.0;
velInheritFactor = 1.0;
fizzleTimeMS = 2000;
lifetimeMS = 3000;
explodeOnDeath = false;
reflectOnWaterImpactAngle = 0.0;
explodeOnWaterImpact = true;
deflectionOnWaterImpact = 0.0;
fizzleUnderwaterMS = -1;
activateDelayMS = 100;
numFlares = 0;
size = 0.15;
flareColor = "0.7 0.3 1.0";
flareModTexture = "flaremod";
flareBaseTexture = "flarebase";
};
//-------------------------------------
// BOMBER BELLY TURRET CHARACTERISTICS
//-------------------------------------
datablock TurretData(BomberTurret) : TurretDamageProfile
{
className = VehicleTurret;
catagory = "Turrets";
shapeFile = "turret_belly_base.dts";
preload = true;
canControl = true;
cmdCategory = "Tactical";
cmdIcon = CMDFlyingBomberIcon;
cmdMiniIconName = "commander/MiniIcons/com_bomber_grey";
targetNameTag = 'Thundersword';
targetTypeTag = 'Bomberturret';
mass = 1.0; // Not really relevant
repairRate = 0;
maxDamage = BomberFlyer.maxDamage;
destroyedLevel = BomberFlyer.destroyedLevel;
thetaMin = 90;
thetaMax = 180;
// capacitor
maxCapacitorEnergy = 250;
capacitorRechargeRate = 0.8;
inheritEnergyFromMount = true;
firstPersonOnly = true;
useEyePoint = true;
numWeapons = 3;
targetNameTag = 'Thundersword Belly';
targetTypeTag = 'Turret';
};
datablock TurretImageData(BomberTurretBarrel)
{
shapeFile = "turret_belly_barrell.dts";
mountPoint = 0;
projectile = BomberFusionBolt;
projectileType = LinearFlareProjectile;
usesEnergy = true;
useCapacitor = true;
useMountEnergy = true;
fireEnergy = 16.0;
minEnergy = 16.0;
// Turret parameters
activationMS = 1000;
deactivateDelayMS = 1500;
thinkTimeMS = 200;
degPerSecTheta = 360;
degPerSecPhi = 360;
attackRadius = 150;
// State transitions
stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "WaitFire1";
stateTimeoutValue[0] = 0.5;
stateSequence[0] = "Activate";
stateSound[0] = BomberTurretActivateSound;
stateName[1] = "WaitFire1";
stateTransitionOnTriggerDown[1] = "Fire1";
stateTransitionOnNoAmmo[1] = "NoAmmo1";
stateName[2] = "Fire1";
stateTransitionOnTimeout[2] = "Reload1";
stateTimeoutValue[2] = 0.13;
stateFire[2] = true;
stateRecoil[2] = LightRecoil;
stateAllowImageChange[2] = false;
stateSequence[2] = "Fire";
stateScript[2] = "onFire";
stateSound[2] = BomberTurretFireSound;
stateName[3] = "Reload1";
stateSequence[3] = "Reload";
stateTimeoutValue[3] = 0.1;
stateAllowImageChange[3] = false;
stateTransitionOnTimeout[3] = "WaitFire2";
stateTransitionOnNoAmmo[3] = "NoAmmo1";
stateName[4] = "NoAmmo1";
stateTransitionOnAmmo[4] = "Reload1";
// ---------------------------------------------
// z0dd - ZOD, 5/8/02. Incorrect parameter value
//stateSequence[4] = "NoAmmo";
stateSequence[4] = "NoAmmo1";
stateTransitionOnTriggerDown[4] = "DryFire1";
stateName[5] = "DryFire1";
stateSound[5] = BomberTurretDryFireSound;
stateTimeoutValue[5] = 0.5;
stateTransitionOnTimeout[5] = "NoAmmo1";
stateName[6] = "WaitFire2";
stateTransitionOnTriggerDown[6] = "Fire2";
// ---------------------------------------------
// z0dd - ZOD, 5/8/02. Incorrect parameter value
//stateTransitionOnNoAmmo[6] = "NoAmmo";
stateTransitionOnNoAmmo[6] = "NoAmmo2";
stateName[7] = "Fire2";
stateTransitionOnTimeout[7] = "Reload2";
stateTimeoutValue[7] = 0.13;
stateScript[7] = "FirePair";
stateName[8] = "Reload2";
stateSequence[8] = "Reload";
stateTimeoutValue[8] = 0.1;
stateAllowImageChange[8] = false;
stateTransitionOnTimeout[8] = "WaitFire1";
stateTransitionOnNoAmmo[8] = "NoAmmo2";
stateName[9] = "NoAmmo2";
stateTransitionOnAmmo[9] = "Reload2";
// ---------------------------------------------
// z0dd - ZOD, 5/8/02. Incorrect parameter value
//stateSequence[9] = "NoAmmo";
stateSequence[9] = "NoAmmo2";
stateTransitionOnTriggerDown[9] = "DryFire2";
stateName[10] = "DryFire2";
stateSound[10] = BomberTurretDryFireSound;
stateTimeoutValue[10] = 0.5;
stateTransitionOnTimeout[10] = "NoAmmo2";
};
datablock TurretImageData(BomberTurretBarrelPair)
{
shapeFile = "turret_belly_barrelr.dts";
mountPoint = 1;
projectile = BomberFusionBolt;
projectileType = LinearFlareProjectile;
usesEnergy = true;
useCapacitor = true;
useMountEnergy = true;
fireEnergy = 16.0;
minEnergy = 16.0;
// Turret parameters
activationMS = 1000;
deactivateDelayMS = 1500;
thinkTimeMS = 200;
degPerSecTheta = 360;
degPerSecPhi = 360;
attackRadius = 75;
stateName[0] = "WaitFire";
stateTransitionOnTriggerDown[0] = "Fire";
stateName[1] = "Fire";
stateTransitionOnTimeout[1] = "StopFire";
stateTimeoutValue[1] = 0.13;
stateFire[1] = true;
stateRecoil[1] = LightRecoil;
stateAllowImageChange[1] = false;
stateSequence[1] = "Fire";
stateScript[1] = "onFire";
stateSound[1] = BomberTurretFireSound;
stateName[2] = "StopFire";
stateTimeoutValue[2] = 0.1;
stateTransitionOnTimeout[2] = "WaitFire";
stateScript[2] = "stopFire";
};
datablock TurretImageData(AIAimingTurretBarrel)
{
shapeFile = "turret_muzzlepoint.dts";
mountPoint = 3;
projectile = BomberFusionBolt;
// Turret parameters
activationMS = 1000;
deactivateDelayMS = 1500;
thinkTimeMS = 200;
degPerSecTheta = 500;
degPerSecPhi = 800;
attackRadius = 75;
};
//-------------------------------------
// BOMBER BOMB PROJECTILE
//-------------------------------------
datablock BombProjectileData(BomberBomb)
{
projectileShapeName = "bomb.dts";
emitterDelay = -1;
directDamage = 0.0;
hasDamageRadius = true;
indirectDamage = 1.1;
damageRadius = 30;
radiusDamageType = $DamageType::BomberBombs;
kickBackStrength = 2500;
explosion = "VehicleBombExplosion";
velInheritFactor = 1.0;
grenadeElasticity = 0.25;
grenadeFriction = 0.4;
armingDelayMS = 2000;
muzzleVelocity = 0.1;
drag = 0.3;
minRotSpeed = "60.0 0.0 0.0";
maxRotSpeed = "80.0 0.0 0.0";
scale = "1.0 1.0 1.0";
sound = BomberBombProjectileSound;
};
//-------------------------------------
// BOMBER BOMB CHARACTERISTICS
//-------------------------------------
datablock ItemData(BombAmmo)
{
className = Ammo;
catagory = "Ammo";
shapeFile = "repair_kit.dts";
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 1;
computeCRC = true;
};
datablock StaticShapeData(DropBombs)
{
catagory = "Turrets";
shapeFile = "bombers_eye.dts";
maxDamage = 1.0;
disabledLevel = 0.6;
destroyedLevel = 0.8;
};
datablock TurretImageData(BomberBombImage)
{
shapeFile = "turret_muzzlepoint.dts";
offset = "2 -4 -0.5";
mountPoint = 10;
projectile = BomberBomb;
projectileType = BombProjectile;
usesEnergy = true;
useMountEnergy = true;
useCapacitor = true;
fireEnergy = 53.0;
minEnergy = 53.0;
stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "WaitFire1";
stateTimeoutValue[0] = 0.5;
stateSequence[0] = "Activate";
stateName[1] = "WaitFire1";
stateTransitionOnTriggerDown[1] = "Fire1";
stateTransitionOnNoAmmo[1] = "NoAmmo1";
stateName[2] = "Fire1";
stateTransitionOnTimeout[2] = "Reload1";
stateTimeoutValue[2] = 0.32;
stateFire[2] = true;
stateAllowImageChange[2] = false;
stateSequence[2] = "Fire";
stateScript[2] = "onFire";
stateSound[2] = BomberBombFireSound;
stateName[3] = "Reload1";
stateSequence[3] = "Reload";
stateTimeoutValue[3] = 0.1;
stateAllowImageChange[3] = false;
stateTransitionOnTimeout[3] = "WaitFire2";
stateTransitionOnNoAmmo[3] = "NoAmmo1";
stateName[4] = "NoAmmo1";
stateTransitionOnAmmo[4] = "Reload1";
// ---------------------------------------------
// z0dd - ZOD, 5/8/02. Incorrect parameter value
//stateSequence[4] = "NoAmmo";
stateSequence[4] = "NoAmmo1";
stateTransitionOnTriggerDown[4] = "DryFire1";
stateName[5] = "DryFire1";
stateSound[5] = BomberBombDryFireSound;
stateTimeoutValue[5] = 0.5;
stateTransitionOnTimeout[5] = "NoAmmo1";
stateName[6] = "WaitFire2";
stateTransitionOnTriggerDown[6] = "Fire2";
// ---------------------------------------------
// z0dd - ZOD, 5/8/02. Incorrect parameter value
//stateTransitionOnNoAmmo[6] = "NoAmmo";
stateTransitionOnNoAmmo[6] = "NoAmmo2";
stateName[7] = "Fire2";
stateTransitionOnTimeout[7] = "Reload2";
stateTimeoutValue[7] = 0.32;
stateScript[7] = "FirePair";
stateName[8] = "Reload2";
stateSequence[8] = "Reload";
stateTimeoutValue[8] = 0.1;
stateAllowImageChange[8] = false;
stateTransitionOnTimeout[8] = "WaitFire1";
stateTransitionOnNoAmmo[8] = "NoAmmo2";
stateName[9] = "NoAmmo2";
stateTransitionOnAmmo[9] = "Reload2";
// ---------------------------------------------
// z0dd - ZOD, 5/8/02. Incorrect parameter value
//stateSequence[9] = "NoAmmo";
stateSequence[9] = "NoAmmo2";
stateTransitionOnTriggerDown[9] = "DryFire2";
stateName[10] = "DryFire2";
stateSound[10] = BomberBombDryFireSound;
stateTimeoutValue[10] = 0.5;
stateTransitionOnTimeout[10] = "NoAmmo2";
};
datablock TurretImageData(BomberBombPairImage)
{
shapeFile = "turret_muzzlepoint.dts";
offset = "-2 -4 -0.5";
mountPoint = 10;
projectile = BomberBomb;
projectileType = BombProjectile;
usesEnergy = true;
useMountEnergy = true;
useCapacitor = true;
fireEnergy = 53.0;
minEnergy = 53.0;
stateName[0] = "WaitFire";
stateTransitionOnTriggerDown[0] = "Fire";
stateName[1] = "Fire";
stateTransitionOnTimeout[1] = "StopFire";
stateTimeoutValue[1] = 0.13;
stateFire[1] = true;
stateAllowImageChange[1] = false;
stateSequence[1] = "Fire";
stateScript[1] = "onFire";
stateSound[1] = BomberBombFireSound;
stateName[2] = "StopFire";
stateTimeoutValue[2] = 0.1;
stateTransitionOnTimeout[2] = "WaitFire";
stateScript[2] = "stopFire";
};
//**************************************************************
// WEAPONS SPECIAL EFFECTS
//**************************************************************
//-------------------------------------
// BOMBER BELLY TURRET GUN (explosion)
//-------------------------------------
datablock ParticleData(FusionExplosionParticle)
{
dragCoefficient = 2;
gravityCoefficient = 0.2;
inheritedVelFactor = 0.2;
constantAcceleration = 0.0;
lifetimeMS = 750;
lifetimeVarianceMS = 150;
textureName = "particleTest";
colors[0] = "0.56 0.36 0.26 1.0";
colors[1] = "0.56 0.36 0.26 0.0";
sizes[0] = 1;
sizes[1] = 2;
};
datablock ParticleEmitterData(FusionExplosionEmitter)
{
ejectionPeriodMS = 7;
periodVarianceMS = 0;
ejectionVelocity = 12;
velocityVariance = 1.75;
ejectionOffset = 0.0;
thetaMin = 0;
thetaMax = 60;
phiReferenceVel = 0;
phiVariance = 360;
overrideAdvances = false;
particles = "FusionExplosionParticle";
};
datablock ExplosionData(FusionBoltExplosion)
{
explosionShape = "effect_plasma_explosion.dts";
soundProfile = FusionExpSound;
particleEmitter = FusionExplosionEmitter;
particleDensity = 250;
particleRadius = 1.25;
faceViewer = true;
};
//--------------------------------------------------------------------------
// BOMBER TARGETING LASER
//--------------------------------------------------------------------------
datablock AudioProfile(BomberTargetingSwitchSound)
{
filename = "fx/weapons/generic_switch.wav";
description = AudioClosest3d;
preload = true;
};
datablock AudioProfile(BomberTargetingPaintSound)
{
filename = "fx/weapons/targetinglaser_paint.wav";
description = CloseLooping3d;
preload = true;
};
//--------------------------------------
// BOMBER TARGETING PROJECTILE
//--------------------------------------
datablock TargetProjectileData(BomberTargeter)
{
directDamage = 0.0;
hasDamageRadius = false;
indirectDamage = 0.0;
damageRadius = 0.0;
velInheritFactor = 1.0;
maxRifleRange = 1000;
beamColor = "0.1 1.0 0.1";
startBeamWidth = 0.20;
pulseBeamWidth = 0.15;
beamFlareAngle = 3.0;
minFlareSize = 0.0;
maxFlareSize = 400.0;
pulseSpeed = 6.0;
pulseLength = 0.150;
textureName[0] = "special/nonlingradient";
textureName[1] = "special/flare";
textureName[2] = "special/pulse";
textureName[3] = "special/expFlare";
};
//-------------------------------------
// BOMBER TARGETING CHARACTERISTICS
//-------------------------------------
datablock ShapeBaseImageData(BomberTargetingImage)
{
className = WeaponImage;
shapeFile = "turret_muzzlepoint.dts";
offset = "0 -0.04 -0.01";
mountPoint = 2;
projectile = BomberTargeter;
projectileType = TargetProjectile;
deleteLastProjectile = true;
usesEnergy = true;
minEnergy = 3;
stateName[0] = "Activate";
stateSequence[0] = "Activate";
stateSound[0] = BomberTargetingSwitchSound;
stateTimeoutValue[0] = 0.5;
stateTransitionOnTimeout[0] = "ActivateReady";
stateName[1] = "ActivateReady";
stateTransitionOnAmmo[1] = "Ready";
stateTransitionOnNoAmmo[1] = "NoAmmo";
stateName[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTransitionOnTriggerDown[2] = "Fire";
stateName[3] = "Fire";
stateEnergyDrain[3] = 3;
stateFire[3] = true;
stateAllowImageChange[3] = false;
stateScript[3] = "onFire";
stateTransitionOnTriggerUp[3] = "Deconstruction";
stateTransitionOnNoAmmo[3] = "Deconstruction";
stateSound[3] = BomberTargetingPaintSound;
stateName[4] = "NoAmmo";
stateTransitionOnAmmo[4] = "Ready";
stateName[5] = "Deconstruction";
stateTransitionOnTimeout[5] = "ActivateReady";
stateTimeoutValue[5] = 0.05;
};
function BomberTargetingImage::onFire(%data,%obj,%slot)
{
%bomber = %obj.getObjectMount();
if(%bomber.beacon)
{
%bomber.beacon.delete();
%bomber.beacon = "";
}
%p = Parent::onFire(%data, %obj, %slot);
%p.setTarget(%obj.team);
}
function BomberTargetingImage::deconstruct(%data, %obj, %slot)
{
%pos = %obj.lastProjectile.getTargetPoint();
%bomber = %obj.getObjectMount();
if(%bomber.beacon)
{
%bomber.beacon.delete();
%bomber.beacon = "";
}
%bomber.beacon = new BeaconObject() {
dataBlock = "BomberBeacon";
beaconType = "vehicle";
position = %pos;
};
%bomber.beacon.playThread($AmbientThread, "ambient");
%bomber.beacon.team = %bomber.team;
%bomber.beacon.sourceObject = %bomber;
// give it a team target
%bomber.beacon.setTarget(%bomber.team);
MissionCleanup.add(%bomber.beacon);
Parent::deconstruct(%data, %obj, %slot);
}
//-------------------------------------
// BOMBER BEACON
//-------------------------------------
datablock StaticShapeData(BomberBeacon)
{
shapeFile = "turret_muzzlepoint.dts";
targetNameTag = 'beacon';
isInvincible = true;
dynamicType = $TypeMasks::SensorObjectType;
};

View file

@ -0,0 +1,594 @@
datablock AudioProfile(CentaurArtilleryFireSound) {
filename = "fx/weapons/sniper_miss.wav";
description = AudioClose3d;
preload = true;
};
datablock ShockwaveData(MiniColliderWave) {
className = "ShockwaveData";
scale = "1 1 1";
delayMS = "0";
delayVariance = "0";
lifetimeMS = "2700";
lifetimeVariance = "0";
width = "1";
numSegments = "60";
numVertSegments = "30";
velocity = "10";
height = "10";
verticalCurve = "5";
acceleration = "5";
times[0] = "0";
times[1] = "0.25";
times[2] = "0.9";
times[3] = "1";
colors[0] = "1.000000 0.600000 0.200000 1.000000"; //1.0 0.9 0.9
colors[1] = "1.000000 0.600000 0.200000 1.000000"; //0.6 0.6 0.6
colors[2] = "1.000000 0.600000 0.200000 1.000000"; //0.6 0.6 0.6
colors[3] = "1.000000 0.600000 0.200000 0.000000";
texture[0] = "terraintiles/lavarockhot3";
texture[1] = "special/shockwave5"; //gradient";
texWrap = "1";
is2D = "0";
mapToTerrain = "0";
orientToNormal = "1";
renderBottom = "1";
renderSquare = "0";
};
datablock ParticleData(MiniColliderExpandersPaticle)
{
dragCoeffiecient = 0.0;
gravityCoefficient = 0.0;
inheritedVelFactor = 0.0;
lifetimeMS = 7000;
lifetimeVarianceMS = 0;
constantAcceleration = 0.1;
spinRandomMin = -30.0;
spinRandomMax = 30.0;
windcoefficient = 0;
textureName = "flarebase";
colors[0] = "1 0 0";
colors[1] = "0.8 1 0.2 0";
colors[2] = "0.8 1 0.2 0";
colors[3] = "0.8 1 0.2 0";
sizes[0] = 1;
sizes[1] = 2;
sizes[2] = 4;
sizes[3] = 5;
times[0] = "0";
times[1] = "0.25";
times[2] = "0.9";
times[3] = "1";
};
datablock ParticleEmitterData(MiniColliderExpandersEmitter)
{
lifetimeMS = 1000;
ejectionPeriodMS = 1;
periodVarianceMS = 0;
ejectionVelocity = 10;
velocityVariance = 0;
ejectionoffset = 5;
thetaMin = 0.0;
thetaMax = 180.0;
phiReferenceVel = "0";
phiVariance = "360";
orientParticles = false;
orientOnVelocity = false;
particles = "MiniColliderExpandersPaticle";
};
datablock ExplosionData(MiniProtonColliderExplosion) {
shakeCamera = true;
camShakeFreq = "20.0 18.0 17.0";
camShakeAmp = "35 35 35";
camShakeDuration = 1.3;
camShakeRadius = 30;
emitter[0] = "MiniColliderExpandersEmitter";
Shockwave = "MiniColliderWave";
};
datablock GrenadeProjectileData(MiniColliderShell) {
projectileShapeName = "grenade_projectile.dts";
emitterDelay = -1;
directDamage = 0.0;
hasDamageRadius = true;
indirectDamage = 0.6;
damageRadius = 25.0;
radiusDamageType = $DamageType::Artillery;
kickBackStrength = 500;
ImageSource = "MiniColliderCannonImage";
explosion = "MiniProtonColliderExplosion";
velInheritFactor = 0.0;
splash = GrenadeSplash;
baseEmitter = GrenadeBubbleEmitter;
bubbleEmitter = GrenadeBubbleEmitter;
grenadeElasticity = 0.0;
grenadeFriction = 0.3;
armingDelayMS = -1;
gravityMod = 1.0;
muzzleVelocity = 225.0;
drag = 0.1;
sound = MortarTurretProjectileSound;
hasLight = true;
lightRadius = 3;
lightColor = "0.05 0.2 0.05";
};
//the vehicle
datablock HoverVehicleData(CentaurVehicle) : TankDamageProfile {
spawnOffset = "0 0 4";
canControl = true;
floatingGravMag = 4.5;
catagory = "Vehicles";
shapeFile = "vehicle_grav_tank.dts";
multipassenger = true;
computeCRC = true;
renderWhenDestroyed = false;
weaponNode = 1;
debrisShapeName = "vehicle_land_assault_debris.dts";
debris = ShapeDebris;
drag = 0.0;
density = 0.9;
mountPose[0] = sitting;
numMountPoints = 1;
isProtectedMountPoint[0] = true;
cameraMaxDist = 20;
cameraOffset = 3;
cameraLag = 1.5;
explosion = LargeGroundVehicleExplosion;
explosionDamage = 0.5;
explosionRadius = 5.0;
maxSteeringAngle = 0.5; // 20 deg.
maxDamage = 3.15;
destroyedLevel = 3.15;
isShielded = false;
rechargeRate = 1.0;
energyPerDamagePoint = 135;
maxEnergy = 400;
minJetEnergy = 15;
jetEnergyDrain = 2.0;
// Rigid Body
mass = 1500;
bodyFriction = 0.8;
bodyRestitution = 0.5;
minRollSpeed = 3;
gyroForce = 400;
gyroDamping = 0.3;
stabilizerForce = 20;
minDrag = 10;
softImpactSpeed = 15; // Play SoftImpact Sound
hardImpactSpeed = 18; // Play HardImpact Sound
// Ground Impact Damage (uses DamageType::Ground)
minImpactSpeed = 17;
speedDamageScale = 0.060;
// Object Impact Damage (uses DamageType::Impact)
collDamageThresholdVel = 18;
collDamageMultiplier = 0.045;
dragForce = 40 / 20;
vertFactor = 0.0;
floatingThrustFactor = 0.15;
mainThrustForce = 50;
reverseThrustForce = 40;
strafeThrustForce = 40;
turboFactor = 1.7;
brakingForce = 25;
brakingActivationSpeed = 4;
stabLenMin = 3.25;
stabLenMax = 4;
stabSpringConstant = 50;
stabDampingConstant = 20;
gyroDrag = 20;
normalForce = 20;
restorativeForce = 10;
steeringForce = 15;
rollForce = 5;
pitchForce = 3;
dustEmitter = TankDustEmitter;
triggerDustHeight = 3.5;
dustHeight = 1.0;
dustTrailEmitter = TireEmitter;
dustTrailOffset = "0.0 -1.0 0.5";
triggerTrailHeight = 3.6;
dustTrailFreqMod = 15.0;
jetSound = AssaultVehicleThrustSound;
engineSound = AssaultVehicleEngineSound;
floatSound = AssaultVehicleSkid;
softImpactSound = GravSoftImpactSound;
hardImpactSound = HardImpactSound;
wheelImpactSound = WheelImpactSound;
forwardJetEmitter = TankJetEmitter;
//
softSplashSoundVelocity = 5.0;
mediumSplashSoundVelocity = 10.0;
hardSplashSoundVelocity = 15.0;
exitSplashSoundVelocity = 10.0;
exitingWater = VehicleExitWaterMediumSound;
impactWaterEasy = VehicleImpactWaterSoftSound;
impactWaterMedium = VehicleImpactWaterMediumSound;
impactWaterHard = VehicleImpactWaterMediumSound;
waterWakeSound = VehicleWakeMediumSplashSound;
minMountDist = 4;
damageEmitter[0] = SmallLightDamageSmoke;
damageEmitter[1] = SmallHeavyDamageSmoke;
damageEmitter[2] = DamageBubbles;
damageEmitterOffset[0] = "0.0 -1.5 3.5 ";
damageLevelTolerance[0] = 0.3;
damageLevelTolerance[1] = 0.7;
numDmgEmitterAreas = 1;
splashEmitter[0] = VehicleFoamDropletsEmitter;
splashEmitter[1] = VehicleFoamEmitter;
shieldImpact = VehicleShieldImpact;
cmdCategory = "Tactical";
cmdIcon = CMDGroundTankIcon;
cmdMiniIconName = "commander/MiniIcons/com_tank_grey";
targetNameTag = 'Centaur';
targetTypeTag = 'Advanced Artillery';
sensorData = VehiclePulseSensor;
checkRadius = 5.5535;
observeParameters = "1 10 10";
runningLight[0] = TankLight1;
runningLight[1] = TankLight2;
runningLight[2] = TankLight3;
runningLight[3] = TankLight4;
shieldEffectScale = "0.9 1.0 0.6";
showPilotInfo = 1;
};
datablock TurretData(CentaurTurret) : TurretDamageProfile {
className = VehicleTurret;
catagory = "Turrets";
shapeFile = "Turret_tank_base.dts";
preload = true;
canControl = false;
cmdCategory = "Tactical";
cmdIcon = CMDGroundTankIcon;
cmdMiniIconName = "commander/MiniIcons/com_tank_grey";
targetNameTag = 'Centaur';
targetTypeTag = 'Cannon';
mass = 1.0; // Not really relevant
repairRate = 0;
maxDamage = CentaurVehicle.maxDamage;
destroyedLevel = CentaurVehicle.destroyedLevel;
thetaMin = 0;
thetaMax = 100;
// capacitor
maxCapacitorEnergy = 250;
capacitorRechargeRate = 1.0;
inheritEnergyFromMount = true;
firstPersonOnly = true;
useEyePoint = true;
numWeapons = 4; //2 barrels each set
max[MiniChaingunAmmo] = 9999;
max[MortarAmmo] = 9999;
};
//Barrels:
datablock TurretImageData(Cent50CalBarrel) {
shapeFile = "turret_tank_barrelchain.dts";
mountPoint = 0;
projectile = GunshipCGBullet;
projectileType = TracerProjectile;
casing = ShellDebris;
shellExitDir = "1.0 0.3 1.0";
shellExitOffset = "0.15 -0.56 -0.1";
shellExitVariance = 15.0;
shellVelocity = 3.0;
projectileSpread = 1.5 / 1000.0;
usesEnergy = true;
// Turret parameters
activationMS = 2000;
deactivateDelayMS = 1500;
thinkTimeMS = 200;
degPerSecTheta = 360;
degPerSecPhi = 360;
attackRadius = 200;
// State transitions
stateName[0] = "Activate";
stateTransitionOnNotLoaded[0] = "Dead";
stateTransitionOnLoaded[0] = "ActivateReady";
stateSound[0] = AssaultTurretActivateSound;
stateName[1] = "ActivateReady";
stateSequence[1] = "Activate";
stateSound[1] = AssaultTurretActivateSound;
stateTimeoutValue[1] = 0.1;
stateTransitionOnTimeout[1] = "Ready";
stateTransitionOnNotLoaded[1] = "Deactivate";
stateName[2] = "Ready";
stateTransitionOnNotLoaded[2] = "Deactivate";
stateTransitionOnTriggerDown[2] = "Fire";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateName[3] = "Fire";
stateSequence[3] = "Fire";
stateSequenceRandomFlash[3] = true;
stateFire[3] = true;
stateAllowImageChange[3] = true;
stateSound[3] = AssaultChaingunFireSound;
stateScript[3] = "onFire";
stateTimeoutValue[3] = 0.03; //0.01
stateTransitionOnTimeout[3] = "Fire";
stateTransitionOnTriggerUp[3] = "Reload";
stateTransitionOnNoAmmo[3] = "noAmmo";
stateName[4] = "Reload";
stateSequence[4] = "Reload";
stateTimeoutValue[4] = 0.2;
stateAllowImageChange[4] = true;
stateTransitionOnTimeout[4] = "Ready";
stateTransitionOnNoAmmo[4] = "NoAmmo";
stateWaitForTimeout[4] = true;
stateName[5] = "Deactivate";
stateSequence[5] = "Activate";
stateDirection[5] = false;
stateTimeoutValue[5] = 0.1;
stateTransitionOnTimeout[5] = "ActivateReady";
stateName[6] = "Dead";
stateTransitionOnLoaded[6] = "ActivateReady";
stateTransitionOnTriggerDown[6] = "DryFire";
stateName[7] = "DryFire";
stateSound[7] = AssaultChaingunFireSound;
stateTimeoutValue[7] = 1.0;
stateTransitionOnTimeout[7] = "NoAmmo";
stateName[8] = "NoAmmo";
stateTransitionOnAmmo[8] = "Reload";
stateSequence[8] = "NoAmmo";
stateTransitionOnTriggerDown[8] = "DryFire";
};
datablock TurretImageData(CentaurColliderBarrel) {
shapeFile = "turret_tank_barrelmortar.dts";
mountPoint = 0;
// ammo = AssaultMortarAmmo;
projectile = MiniColliderShell;
projectileType = GrenadeProjectile;
usesEnergy = true;
useMountEnergy = true;
fireEnergy = 1.00;
minEnergy = 1.00;
useCapacitor = true;
// Turret parameters
activationMS = 4000;
deactivateDelayMS = 1500;
thinkTimeMS = 200;
degPerSecTheta = 360;
degPerSecPhi = 360;
attackRadius = 750;
// State transitions
stateName[0] = "Activate";
stateTransitionOnNotLoaded[0] = "Dead";
stateTransitionOnLoaded[0] = "ActivateReady";
stateName[1] = "ActivateReady";
stateSequence[1] = "Activate";
stateSound[1] = AssaultTurretActivateSound;
stateTimeoutValue[1] = 1.0;
stateTransitionOnTimeout[1] = "Ready";
stateTransitionOnNotLoaded[1] = "Deactivate";
stateName[2] = "Ready";
stateTransitionOnNotLoaded[2] = "Deactivate";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTransitionOnTriggerDown[2] = "Fire";
stateName[3] = "Fire";
stateSequence[3] = "Fire";
stateTransitionOnTimeout[3] = "Fire2";
stateTimeoutValue[3] = 1.0;
stateFire[3] = true;
stateRecoil[3] = LightRecoil;
stateAllowImageChange[3] = true;
stateSound[3] = CentaurArtilleryFireSound;
stateScript[3] = "onFire";
stateName[4] = "Fire2";
stateSequence[4] = "Fire";
stateTransitionOnTimeout[4] = "Fire3";
stateTimeoutValue[4] = 1.0;
stateFire[4] = true;
stateRecoil[4] = LightRecoil;
stateAllowImageChange[4] = true;
stateSound[4] = CentaurArtilleryFireSound;
stateScript[4] = "onFire";
stateName[5] = "Fire3";
stateSequence[5] = "Fire";
stateTransitionOnTimeout[5] = "Reload";
stateTimeoutValue[5] = 1.0;
stateFire[5] = true;
stateRecoil[5] = LightRecoil;
stateAllowImageChange[5] = true;
stateSound[5] = CentaurArtilleryFireSound;
stateScript[5] = "onFire";
stateName[6] = "Reload";
stateSequence[6] = "Reload";
stateTimeoutValue[6] = 7.0;
stateAllowImageChange[6] = false;
stateTransitionOnTimeout[6] = "Ready";
//stateTransitionOnNoAmmo[4] = "NoAmmo";
stateWaitForTimeout[6] = true;
stateName[7] = "Deactivate";
stateDirection[7] = false;
stateSequence[7] = "Activate";
stateTimeoutValue[7] = 1.0;
stateTransitionOnLoaded[7] = "ActivateReady";
stateTransitionOnTimeout[7] = "Dead";
stateName[8] = "Dead";
stateTransitionOnLoaded[8] = "ActivateReady";
stateTransitionOnTriggerDown[8] = "DryFire";
stateName[9] = "DryFire";
stateSound[9] = AssaultMortarDryFireSound;
stateTimeoutValue[9] = 1.0;
stateTransitionOnTimeout[9] = "NoAmmo";
stateName[10] = "NoAmmo";
stateSequence[10] = "NoAmmo";
stateTransitionOnAmmo[10] = "Reload";
stateTransitionOnTriggerDown[10] = "DryFire";
};
//
function CentaurVehicle::onAdd(%this, %obj) {
Parent::onAdd(%this, %obj);
setTargetSensorGroup(%obj.getTarget(),%obj.team);
%turret = TurretData::create(CentaurTurret);
%turret.selectedWeapon = 1;
MissionCleanup.add(%turret);
%turret.team = %obj.teamBought;
%turret.setSelfPowered();
%obj.mountObject(%turret, 10);
%turret.mountImage(Cent50CalBarrel, 0);
%obj.barrel = "Chain";
%obj.turretObject = %turret;
%turret.source = %obj;
%turret.setCapacitorRechargeRate(999);
%turret.setAutoFire(true);
%obj.schedule(6000, "playThread", $ActivateThread, "activate");
// set the turret's target info
setTargetSensorGroup(%turret.getTarget(), %obj.team);
setTargetNeverVisMask(%turret.getTarget(), 0xffffffff);
}
function CentaurVehicle::deleteAllMounted(%data, %obj) {
%turret = %obj.getMountNodeObject(10);
if (!%turret)
return;
if(%turret.getControllingClient()) {
%turret.getControllingClient().setControlObject(%turret.getControllingClient().player);
}
%turret.schedule(2000, delete);
}
function CentaurVehicle::onTrigger(%data, %obj, %trigger, %state) {
%plyr = %obj.getMountNodeObject(0);
if(%state == 1 && %trigger == 5) {
if(%obj.barrel $= "Chain") {
%obj.barrel = "Collider";
%obj.turretObject.schedule(3500, "mountImage", CentaurColliderBarrel, 0);
BottomPrint(%plyr.client, "Centaur: Switching to collider artillery", 3, 1);
%obj.setfrozenstate(true); //lock the artillery into place
%obj.turretObject.source = %obj;
}
else {
%obj.barrel = "Chain";
%obj.turretObject.schedule(3500, "mountImage", Cent50CalBarrel, 0);
BottomPrint(%plyr.client, "Centaur: Switching to 50Cal Chainguns", 3, 1);
%obj.setfrozenstate(false);
}
}
if(%state == 1 && %trigger == 4) {
%plyr.client.setControlObject(%obj.turretObject);
}
}
function CentaurTurret::onTrigger(%data, %obj, %trigger, %state) {
%cli = %obj.getControllingClient();
if(%state == 1 && %trigger == 5) {
if(%obj.source.barrel $= "Chain") {
%obj.source.barrel = "Collider";
%obj.schedule(3500, "mountImage", CentaurColliderBarrel, 0);
BottomPrint(%cli, "Centaur: Switching to collider artillery", 3, 1);
%obj.source.setfrozenstate(true); //lock the artillery into place
}
else {
%obj.source.barrel = "Chain";
%obj.schedule(3500, "mountImage", Cent50CalBarrel, 0);
BottomPrint(%cli, "Centaur: Switching to 50Cal Chainguns", 3, 1);
%obj.source.setfrozenstate(false);
}
}
if(%state == 1 && %trigger == 4) {
%cli.setControlObject(%obj.source);
}
}
function CentaurTurret::onDamage(%data, %obj) {
%newDamageVal = %obj.getDamageLevel();
if(%obj.lastDamageVal !$= "")
if(isObject(%obj.getObjectMount()) && %obj.lastDamageVal > %newDamageVal)
%obj.getObjectMount().setDamageLevel(%newDamageVal);
%obj.lastDamageVal = %newDamageVal;
}

View file

@ -0,0 +1,138 @@
// Escape Pod
datablock HoverVehicleData(EscapePodVehicle) : WildcatDamageProfile {
spawnOffset = "0 0 1";
canControl = false;
floatingGravMag = 2; // 3.5;
catagory = "Vehicles";
shapeFile = "vehicle_grav_scout.dts";
computeCRC = true;
debrisShapeName = "vehicle_grav_scout_debris.dts";
debris = ShapeDebris;
renderWhenDestroyed = false;
drag = 0.0;
density = 0.9;
mountPose[0] = sitting;
cameraMaxDist = 5.0;
cameraOffset = 0.7;
cameraLag = 0.5;
numMountPoints = 1;
isProtectedMountPoint[0] = true;
explosion = VehicleExplosion;
explosionDamage = 0; // 0.5;
explosionRadius = 0; // 5.0;
lightOnly = 0;
maxDamage = 0.60;
destroyedLevel = 0.60;
isShielded = true;
rechargeRate = 0.7;
energyPerDamagePoint = 75;
maxEnergy = 150;
minJetEnergy = 160; // disable?
jetEnergyDrain = 1.3;
// Rigid Body
mass = 100;
bodyFriction = 0.1;
bodyRestitution = 0.5;
softImpactSpeed = 20; // Play SoftImpact Sound
hardImpactSpeed = 28; // Play HardImpact Sound
// Ground Impact Damage (uses DamageType::Ground)
minImpactSpeed = 29;
speedDamageScale = 0.010;
// Object Impact Damage (uses DamageType::Impact)
collDamageThresholdVel = 23;
collDamageMultiplier = 0.030;
dragForce = 25 / 45.0;
vertFactor = 0.0;
floatingThrustFactor = 0.001; // 0.35;
mainThrustForce = 0.001;
reverseThrustForce = 0.001;
strafeThrustForce = 0.001;
turboFactor = 0.001;
brakingForce = 25;
brakingActivationSpeed = 20;
stabLenMin = 2.25;
stabLenMax = 3.75;
stabSpringConstant = 30;
stabDampingConstant = 16;
gyroDrag = 16;
normalForce = 10;
restorativeForce = 5;
steeringForce = 0.001;
rollForce = 0.001;
pitchForce = 0.001;
dustEmitter = VehicleLiftoffDustEmitter;
triggerDustHeight = 2.5;
dustHeight = 1.0;
dustTrailEmitter = TireEmitter;
dustTrailOffset = "0.0 -1.0 0.5";
triggerTrailHeight = 3.6;
dustTrailFreqMod = 15.0;
// jetSound = ScoutSqueelSound;
// engineSound = ScoutEngineSound;
// floatSound = ScoutThrustSound;
softImpactSound = GravSoftImpactSound;
hardImpactSound = HardImpactSound;
//
softSplashSoundVelocity = 10.0;
mediumSplashSoundVelocity = 20.0;
hardSplashSoundVelocity = 30.0;
exitSplashSoundVelocity = 10.0;
exitingWater = VehicleExitWaterSoftSound;
impactWaterEasy = VehicleImpactWaterSoftSound;
impactWaterMedium = VehicleImpactWaterSoftSound;
impactWaterHard = VehicleImpactWaterMediumSound;
waterWakeSound = VehicleWakeSoftSplashSound;
minMountDist = 4;
damageEmitter[0] = SmallLightDamageSmoke;
damageEmitter[1] = SmallHeavyDamageSmoke;
damageEmitter[2] = DamageBubbles;
damageEmitterOffset[0] = "0.0 -1.5 0.5 ";
damageLevelTolerance[0] = 0.3;
damageLevelTolerance[1] = 0.7;
numDmgEmitterAreas = 1;
splashEmitter[0] = VehicleFoamDropletsEmitter;
splashEmitter[1] = VehicleFoamEmitter;
shieldImpact = VehicleShieldImpact;
// forwardJetEmitter = WildcatJetEmitter;
cmdCategory = Tactical;
cmdIcon = CMDHoverScoutIcon;
cmdMiniIconName = "commander/MiniIcons/com_landscout_grey";
targetNameTag = 'Escape';
targetTypeTag = 'Pod';
sensorData = VehiclePulseSensor;
checkRadius = 1.7785;
observeParameters = "1 10 10";
runningLight[0] = WildcatLight1;
runningLight[1] = WildcatLight2;
runningLight[2] = WildcatLight3;
shieldEffectScale = "0.9375 1.125 0.6";
};

View file

@ -0,0 +1,628 @@
datablock SensorData(AerialGunshipSensor) {
detects = true;
detectsUsingLOS = true;
detectsPassiveJammed = false;
detectsActiveJammed = false;
detectsCloaked = false;
detectionPings = true;
detectRadius = 1750;
};
datablock ShockwaveData(ColliderWave) {
className = "ShockwaveData";
scale = "1 1 1";
delayMS = "0";
delayVariance = "0";
lifetimeMS = "2700";
lifetimeVariance = "0";
width = "1";
numSegments = "60";
numVertSegments = "30";
velocity = "10";
height = "20";
verticalCurve = "5";
acceleration = "9";
times[0] = "0";
times[1] = "0.25";
times[2] = "0.9";
times[3] = "1";
colors[0] = "1.000000 0.600000 0.200000 1.000000"; //1.0 0.9 0.9
colors[1] = "1.000000 0.600000 0.200000 1.000000"; //0.6 0.6 0.6
colors[2] = "1.000000 0.600000 0.200000 1.000000"; //0.6 0.6 0.6
colors[3] = "1.000000 0.600000 0.200000 0.000000";
texture[0] = "terraintiles/molten1";
texture[1] = "special/shockwave4"; //gradient";
texWrap = "1";
is2D = "0";
mapToTerrain = "0";
orientToNormal = "1";
renderBottom = "1";
renderSquare = "0";
};
datablock ParticleData(ColliderExpandersPaticle)
{
dragCoeffiecient = 0.0;
gravityCoefficient = 0.0;
inheritedVelFactor = 0.0;
lifetimeMS = 10000;
lifetimeVarianceMS = 0;
constantAcceleration = 0.1;
spinRandomMin = -30.0;
spinRandomMax = 30.0;
windcoefficient = 0;
textureName = "flarebase";
colors[0] = "1 0 0";
colors[1] = "0.8 1 0.2 0";
colors[2] = "0.8 1 0.2 0";
colors[3] = "0.8 1 0.2 0";
sizes[0] = 1;
sizes[1] = 2;
sizes[2] = 4;
sizes[3] = 5;
times[0] = "0";
times[1] = "0.25";
times[2] = "0.9";
times[3] = "1";
};
datablock ParticleEmitterData(ColliderExpandersEmitter)
{
lifetimeMS = 1000;
ejectionPeriodMS = 1;
periodVarianceMS = 0;
ejectionVelocity = 10;
velocityVariance = 0;
ejectionoffset = 5;
thetaMin = 0.0;
thetaMax = 180.0;
phiReferenceVel = "0";
phiVariance = "360";
orientParticles = false;
orientOnVelocity = false;
particles = "ColliderExpandersPaticle";
};
datablock ExplosionData(ProtonColliderExplosion) {
shakeCamera = true;
camShakeFreq = "20.0 18.0 17.0";
camShakeAmp = "70.0 70.0 70.0";
camShakeDuration = 1.3;
camShakeRadius = 35;
emitter[0] = "ColliderExpandersEmitter";
Shockwave = "ColliderWave";
};
datablock TracerProjectileData(ColliderBolt) {
doDynamicClientHits = true;
directDamage = 0.2; // Phantom139, From 1.45 (2.3)
directDamageType = $DamageType::GunTurret;
hasDamageRadius = true;
indirectDamage = 2.2;
damageRadius = 20.0;
radiusDamageType = $DamageType::GunTurret;
explosion = "ProtonColliderExplosion";
splash = ChaingunSplash;
kickBackStrength = 1500.0;
sound = ChaingunProjectile;
//dryVelocity = 425.0;
dryVelocity = 1250.0; // z0dd - ZOD, 8-12-02. Was 425.0
wetVelocity = 1000.0;
velInheritFactor = 0.0;
fizzleTimeMS = 30000;
lifetimeMS = 30000;
explodeOnDeath = false;
reflectOnWaterImpactAngle = 0.0;
explodeOnWaterImpact = false;
deflectionOnWaterImpact = 0.0;
fizzleUnderwaterMS = 3000;
tracerLength = 25.0;
tracerAlpha = false;
tracerMinPixels = 6;
tracerColor = 211.0/255.0 @ " " @ 215.0/255.0 @ " " @ 120.0/255.0 @ " 0.75";
tracerTex[0] = "special/tracer00";
tracerTex[1] = "special/tracercross";
tracerWidth = 2.25;
crossSize = 0.20;
crossViewAng = 0.990;
renderCross = true;
decalData[0] = ChaingunDecal1;
decalData[1] = ChaingunDecal2;
decalData[2] = ChaingunDecal3;
decalData[3] = ChaingunDecal4;
decalData[4] = ChaingunDecal5;
decalData[5] = ChaingunDecal6;
};
//PROJECTLE FUNCTIONS
function ColliderBolt::onExplode(%data, %proj, %pos, %mod) {
Parent::OnExplode(%data, %proj, %pos, %mod);
}
//Vehicle
datablock FlyingVehicleData(HarbingerGunship) : BomberDamageProfile
{
spawnOffset = "0 0 2";
canControl = true;
catagory = "Vehicles";
shapeFile = "vehicle_air_bomber.dts";
multipassenger = true;
computeCRC = true;
weaponNode = 1;
debrisShapeName = "vehicle_air_bomber_debris.dts";
debris = ShapeDebris;
renderWhenDestroyed = false;
drag = 0.2;
density = 1.0;
mountPose[0] = sitting;
mountPose[1] = sitting;
numMountPoints = 2;
isProtectedMountPoint[0] = true;
isProtectedMountPoint[1] = true;
cameraDefaultFov = 90.0;
cameraMinFov = 5.0;
cameraMaxFov = 120.0;
cameraMaxDist = 22;
cameraOffset = 5;
cameraLag = 1.0;
explosion = LargeAirVehicleExplosion;
explosionDamage = 0.5;
explosionRadius = 5.0;
maxDamage = 6.00; // Total health
destroyedLevel = 6.00; // Damage textures show up at this health level
isShielded = true;
energyPerDamagePoint = 150;
maxEnergy = 400; // Afterburner and any energy weapon pool
minDrag = 60; // Linear Drag (eventually slows you down when not thrusting...constant drag)
rotationalDrag = 1800; // Angular Drag (dampens the drift after you stop moving the mouse...also tumble drag)
rechargeRate = 0.8;
// Auto stabilize speed
maxAutoSpeed = 15; // Autostabilizer kicks in when less than this speed. (meters/second)
autoAngularForce = 1500; // Angular stabilizer force (this force levels you out when autostabilizer kicks in)
autoLinearForce = 300; // Linear stabilzer force (this slows you down when autostabilizer kicks in)
autoInputDamping = 0.95; // Dampen control input so you don't whack out at very slow speeds
// Maneuvering
maxSteeringAngle = 5; // Max radiens you can rotate the wheel. Smaller number is more maneuverable.
horizontalSurfaceForce = 5; // Horizontal center "wing" (provides "bite" into the wind for climbing/diving and turning)
verticalSurfaceForce = 8; // Vertical center "wing" (controls side slip. lower numbers make MORE slide.)
maneuveringForce = 4700; // Horizontal jets (W,S,D,A key thrust)
steeringForce = 1100; // Steering jets (force applied when you move the mouse)
steeringRollForce = 300; // Steering jets (how much you heel over when you turn)
rollForce = 8; // Auto-roll (self-correction to right you after you roll/invert)
hoverHeight = 5; // Height off the ground at rest
createHoverHeight = 3; // Height off the ground when created
maxForwardSpeed = 85; // speed in which forward thrust force is no longer applied (meters/second)
// Turbo Jet
jetForce = 3000; // Afterburner thrust (this is in addition to normal thrust)
minJetEnergy = 40.0; // Afterburner can't be used if below this threshhold.
jetEnergyDrain = 3.0; // Energy use of the afterburners (low number is less drain...can be fractional)
vertThrustMultiple = 3.0;
dustEmitter = LargeVehicleLiftoffDustEmitter;
triggerDustHeight = 4.0;
dustHeight = 2.0;
damageEmitter[0] = LightDamageSmoke;
damageEmitter[1] = HeavyDamageSmoke;
damageEmitter[2] = DamageBubbles;
damageEmitterOffset[0] = "3.0 -3.0 0.0 ";
damageEmitterOffset[1] = "-3.0 -3.0 0.0 ";
damageLevelTolerance[0] = 0.3;
damageLevelTolerance[1] = 0.7;
numDmgEmitterAreas = 2;
// Rigid body
mass = 350; // Mass of the vehicle
bodyFriction = 0; // Don't mess with this.
bodyRestitution = 0.5; // When you hit the ground, how much you rebound. (between 0 and 1)
minRollSpeed = 0; // Don't mess with this.
softImpactSpeed = 20; // Sound hooks. This is the soft hit.
hardImpactSpeed = 25; // Sound hooks. This is the hard hit.
// Ground Impact Damage (uses DamageType::Ground)
minImpactSpeed = 40; // If hit ground at speed above this then it's an impact. Meters/second
speedDamageScale = 0.060;
// Object Impact Damage (uses DamageType::Impact)
collDamageThresholdVel = 25;
collDamageMultiplier = 0.020;
//
minTrailSpeed = 15; // The speed your contrail shows up at.
trailEmitter = ContrailEmitter;
forwardJetEmitter = FlyerJetEmitter;
downJetEmitter = FlyerJetEmitter;
//
jetSound = BomberFlyerThrustSound;
engineSound = BomberFlyerEngineSound;
softImpactSound = SoftImpactSound;
hardImpactSound = HardImpactSound;
//wheelImpactSound = WheelImpactSound;
//
softSplashSoundVelocity = 15.0;
mediumSplashSoundVelocity = 20.0;
hardSplashSoundVelocity = 30.0;
exitSplashSoundVelocity = 10.0;
exitingWater = VehicleExitWaterHardSound;
impactWaterEasy = VehicleImpactWaterSoftSound;
impactWaterMedium = VehicleImpactWaterMediumSound;
impactWaterHard = VehicleImpactWaterHardSound;
waterWakeSound = VehicleWakeHardSplashSound;
minMountDist = 4;
splashEmitter[0] = VehicleFoamDropletsEmitter;
splashEmitter[1] = VehicleFoamEmitter;
shieldImpact = VehicleShieldImpact;
cmdCategory = "Tactical";
cmdIcon = CMDFlyingBomberIcon;
cmdMiniIconName = "commander/MiniIcons/com_bomber_grey";
targetNameTag = 'Harbinger';
targetTypeTag = 'Gunship';
sensorData = AerialGunshipSensor;
max[MiniChaingunAmmo] = 9999;
max[MortarAmmo] = 9999;
checkRadius = 7.1895;
observeParameters = "1 10 10";
shieldEffectScale = "0.75 0.975 0.375";
showPilotInfo = 1;
};
//TURRET
datablock TurretData(HarbingerGunshipTurret) : TurretDamageProfile
{
className = VehicleTurret;
catagory = "Turrets";
shapeFile = "turret_belly_base.dts";
preload = true;
canControl = false;
cmdCategory = "Tactical";
cmdIcon = CMDFlyingBomberIcon;
cmdMiniIconName = "commander/MiniIcons/com_bomber_grey";
targetNameTag = 'Harbinger Collider';
targetTypeTag = 'Cannon';
mass = 1.0; // Not really relevant
repairRate = 0;
maxDamage = HarbingerGunship.maxDamage;
destroyedLevel = HarbingerGunship.destroyedLevel;
thetaMin = 90;
thetaMax = 180;
inheritEnergyFromMount = true;
firstPersonOnly = true;
useEyePoint = true;
numWeapons = 2;
max[MiniChaingunAmmo] = 9999;
max[MortarAmmo] = 9999;
};
datablock TurretImageData(HarbingerGunshipCGImage) {
shapeFile = "turret_tank_barrelchain.dts";
offset = "-0.3 0 0";
mountPoint = 0;
item = MiniChaingun;
ammo = MiniChaingunAmmo;
projectile = GunshipCGBullet;
projectileType = TracerProjectile;
projectileSpread = 0.4 / 1000.0;
emap = true;
casing = ShellDebris;
shellExitDir = "1.0 0.3 1.0";
shellExitOffset = "0.15 -0.56 -0.1";
shellExitVariance = 5.0;
shellVelocity = 0.0;
usesEnergy = true;
useMountEnergy = false;
// Turret parameters
activationMS = 175; // z0dd - ZOD, 3/27/02. Was 250. Amount of time it takes turret to unfold
deactivateDelayMS = 500;
thinkTimeMS = 140; // z0dd - ZOD, 3/27/02. Was 200. Amount of time before turret starts to unfold (activate)
degPerSecTheta = 600;
degPerSecPhi = 1080;
attackRadius = 2000;
stateName[0] = "Activate";
stateSequence[0] = "Activate";
// stateSound[0] = GravChaingunIdleSound;
stateAllowImageChange[0] = true;
stateTimeoutValue[0] = 0.1;
stateTransitionOnTimeout[0] = "Ready";
stateName[1] = "Ready";
stateSpinThread[1] = Stop;
stateTransitionOnTriggerDown[1] = "Spinup";
stateName[2] = "Spinup";
stateSpinThread[2] = SpinUp;
//stateSound[3] = ChaingunSpinupSound;
stateTimeoutValue[2] = 0.2;
stateWaitForTimeout[2] = false;
stateTransitionOnTimeout[2] = "Fire";
stateTransitionOnTriggerUp[2] = "Spindown";
stateName[3] = "Fire";
stateSequence[3] = "Fire";
stateSequenceRandomFlash[3] = true;
stateSpinThread[3] = FullSpeed;
stateSound[3] = ChaingunFireSound;
//stateRecoil[4] = LightRecoil;
stateAllowImageChange[3] = true;
stateScript[3] = "onFire";
stateFire[3] = true;
stateEjectShell[3] = true;
stateTimeoutValue[3] = 0.01;
stateTransitionOnTimeout[3] = "Fire";
stateTransitionOnTriggerUp[3] = "Spindown";
stateName[4] = "Spindown";
//stateSound[5] = ChaingunSpinDownSound;
stateSpinThread[4] = SpinDown;
stateTimeoutValue[4] = 0.05;
stateWaitForTimeout[4] = true;
stateTransitionOnTimeout[4] = "Ready";
stateTransitionOnTriggerDown[4] = "Spinup";
stateName[5] = "DryFire";
stateSound[5] = ShrikeBlasterDryFireSound;
stateTimeoutValue[5] = 0.5;
};
datablock TurretImageData(HarbingerGunshipColliderImage) {
shapeFile = "turret_mortar_large.dts";
offset = "-0.3 0 0";
mountPoint = 0;
item = Mortar;
projectile = ColliderBolt;
projectileType = TracerProjectile;
projectileSpread = 0.4 / 1000.0;
emap = true;
casing = ShellDebris;
shellExitDir = "1.0 0.3 1.0";
shellExitOffset = "0.15 -0.56 -0.1";
shellExitVariance = 5.0;
shellVelocity = 0.0;
usesEnergy = true;
useMountEnergy = false;
// Turret parameters
activationMS = 175; // z0dd - ZOD, 3/27/02. Was 250. Amount of time it takes turret to unfold
deactivateDelayMS = 500;
thinkTimeMS = 140; // z0dd - ZOD, 3/27/02. Was 200. Amount of time before turret starts to unfold (activate)
degPerSecTheta = 600;
degPerSecPhi = 1080;
attackRadius = 2000;
// State transitions
stateName[0] = "Activate";
stateTransitionOnNotLoaded[0] = "Dead";
stateTransitionOnLoaded[0] = "ActivateReady";
stateName[1] = "ActivateReady";
stateSequence[1] = "Activate";
stateSound[1] = MBLSwitchSound;
stateTimeoutValue[1] = 1;
stateTransitionOnTimeout[1] = "Ready";
stateTransitionOnNotLoaded[1] = "Deactivate";
stateName[2] = "Ready";
stateTransitionOnNotLoaded[2] = "Deactivate";
stateTransitionOnTriggerDown[2] = "Fire1";
stateName[3] = "Fire1";
stateTransitionOnTimeout[3] = "Fire2";
stateTimeoutValue[3] = 0.3;
stateFire[3] = true;
stateRecoil[3] = LightRecoil;
stateAllowImageChange[3] = true;
stateSequence[3] = "Fire";
stateSound[3] = MBLFireSound;
stateScript[3] = "onFire";
stateName[4] = "Fire2";
stateTransitionOnTimeout[4] = "Reload";
stateTimeoutValue[4] = 0.3;
stateFire[4] = true;
stateRecoil[4] = LightRecoil;
stateAllowImageChange[4] = true;
stateSequence[4] = "Fire";
stateSound[4] = MBLFireSound;
stateScript[4] = "onFire";
stateName[5] = "Reload";
stateTimeoutValue[5] = 4.5;
stateAllowImageChange[5] = true;
stateSequence[5] = "Reload";
stateTransitionOnTimeout[5] = "Ready";
stateTransitionOnNotLoaded[5] = "Deactivate";
stateName[6] = "Deactivate";
stateSequence[6] = "Activate";
stateDirection[6] = false;
stateTimeoutValue[6] = 1;
stateTransitionOnLoaded[6] = "ActivateReady";
stateTransitionOnTimeout[6] = "Dead";
stateName[7] = "Dead";
stateTransitionOnLoaded[7] = "ActivateReady";
};
//Functions
function HarbingerGunship::playerMounted(%data, %obj, %player, %node) {
switch(%node) {
case 0:
bottomPrint(%player.client, "PILOT: Fly around \n [MINE] Toggle Weapons (No Gunner)", 2, 2);
case 1:
bottomPrint(%player.client, "GUNNER: Fire... \n [MINE] Toggle Weapons", 2, 2);
%player.isACGunner = 1;
%player.client.setControlObject(%obj.turretObject);
}
}
function HarbingerGunship::deleteAllMounted(%data, %obj) {
%turret = %obj.turretObject;
if (!%turret) {
}
else {
if(%turret.getControllingClient() != 0) {
%cl = %turret.getControllingClient();
if(isObject(%cl.player) && %cl.player.getState() !$= "dead") {
%cl.setControlObject(%cl.player);
}
}
%turret.schedule(1000, delete);
}
}
function HarbingerGunship::onAdd(%this, %obj) {
Parent::onAdd(%this, %obj);
setTargetSensorGroup(%obj.getTarget(),%obj.team);
%turret = TurretData::create(HarbingerGunshipTurret);
%turret.selectedWeapon = 1;
MissionCleanup.add(%turret);
%turret.setSelfPowered();
%obj.mountObject(%turret, 10);
%turret.setCapacitorRechargeRate(999);
%turret.mountobj = %obj;
%obj.turretObject = %turret;
%turret.team = %obj.team;
%turret.base = %obj;
%turret.mountImage(HarbingerGunshipCGImage,0);
setTargetSensorGroup(%turret.getTarget(),%obj.team);
%turret.setAutoFire(true); //YES
%turret.setInventory(MiniChaingunAmmo, 9999, true);
%turret.setInventory(MortarAmmo, 9999, true);
%obj.barrel = "Chain";
}
function HarbingerGunship::onTrigger(%data, %obj, %trigger, %state) {
%plyr = %obj.getMountNodeObject(0);
if(%obj.turretObject.getControllingClient() != 0) {
BottomPrint(%plyr.client, "Harbinger: There is a gunner, cannot change weapons", 3, 1);
return;
}
if(%state == 1 && %trigger == 5) {
if(%obj.barrel $= "Chain") {
%obj.barrel = "Collider";
%obj.turretObject.mountImage(HarbingerGunshipColliderImage, 0);
BottomPrint(%plyr.client, "Harbinger: Switching to collider cannon", 3, 1);
}
else {
%obj.barrel = "Chain";
%obj.turretObject.mountImage(HarbingerGunshipCGImage, 0);
BottomPrint(%plyr.client, "Harbinger: Switching to 50Cal Chaingun", 3, 1);
}
}
}
function HarbingerGunshipTurret::playerDismount(%data, %obj) {
%client = %obj.getControllingClient();
commandToClient( %client, 'VehicleDismount' );
%client.player.mountVehicle = false;
%client.player.isACGunner = 0;
if(%client.player.getState() !$= "Dead") {
%client.player.mountImage(%client.player.lastWeapon, $WeaponSlot);
}
}
function HarbingerGunshipTurret::onTrigger(%data, %obj, %trigger, %state) {
%cl = %obj.getControllingClient();
if(%state == 1) {
if(%trigger == 2 && %cl.player.isACGunner) {
%cl.setControlObject(%cl.player);
%obj.getDataBlock().playerDismount(%obj);
}
if(%trigger == 5) {
if(%obj.mountobj.barrel $= "Chain") {
%obj.mountobj.barrel = "Collider";
%obj.mountImage(HarbingerGunshipColliderImage, 0);
BottomPrint(%cl, "Harbinger: Switching to collider cannon", 3, 1);
commandToClient(%cl, 'setWeaponsHudActive', '', "gui/hud_ret_targlaser", true);
}
else {
%obj.mountobj.barrel = "Chain";
%obj.mountImage(HarbingerGunshipCGImage, 0);
BottomPrint(%cl, "Harbinger: Switching to 50Cal Chaingun", 3, 1);
commandToClient(%cl, 'setWeaponsHudActive', '', "gui/hud_ret_targlaser", true);
}
}
}
}
function HarbingerGunshipTurret::onDamage(%data, %obj) {
%newDamageVal = %obj.getDamageLevel();
if(%obj.lastDamageVal !$= "")
if(isObject(%obj.getObjectMount()) && %obj.lastDamageVal > %newDamageVal)
%obj.getObjectMount().setDamageLevel(%newDamageVal);
%obj.lastDamageVal = %newDamageVal;
}
function HarbingerGunshipColliderImage::onFire(%data, %obj, %slot) {
%p = Parent::onFire(%data, %obj, %slot);
if(isObject(%obj.GetControllingClient().player) && %obj.GetControllingClient().player.getState() !$= "dead") {
%p.sourceObject = %obj.GetControllingClient().player;
//Now I get ze killz... muhaha
//messageAllExcept(%obj.GetControllingClient(), -1, 'msgFia', "~wfx/powered/turret_mortar_fire.wav");
}
}
function HarbingerGunshipCGImage::onFire(%data, %obj, %slot) {
%p = Parent::onFire(%data, %obj, %slot);
if(isObject(%obj.GetControllingClient().player) && %obj.GetControllingClient().player.getState() !$= "dead") {
%p.sourceObject = %obj.GetControllingClient().player;
//Now I get ze killz... muhaha
//messageAllExcept(%obj.GetControllingClient(), -1, 'msgFia', "~wfx/weapons/chaingun_fire.wav");
}
}

View file

@ -0,0 +1,294 @@
datablock FlyingVehicleData(Harrier) : ShrikeDamageProfile {
spawnOffset = "0 0 2";
canControl = false;
catagory = "Vehicles";
shapeFile = "vehicle_air_scout.dts";
computeCRC = true;
debrisShapeName = "vehicle_air_scout_debris.dts";
debris = ShapeDebris;
renderWhenDestroyed = false;
mountPose[0] = sitting;
numMountPoints = 1;
isProtectedMountPoint[0] = true;
drag = 0.15;
density = 1.0;
canWarp = 1;
cameraMaxDist = 15;
cameraOffset = 2.5;
cameraLag = 0.9;
explosion = VehicleExplosion;
explosionDamage = 0.5;
explosionRadius = 5.0;
maxDamage = 5.40;
destroyedLevel = 5.40;
minDrag = 30; // Linear Drag (eventually slows you down when not thrusting...constant drag)
rotationalDrag = 900; // Anguler Drag (dampens the drift after you stop moving the mouse...also tumble drag)
maxAutoSpeed = 5; // Autostabilizer kicks in when less than this speed. (meters/second)
autoAngularForce = 50; // Angular stabilizer force (this force levels you out when autostabilizer kicks in)
autoLinearForce = 300; // Linear stabilzer force (this slows you down when autostabilizer kicks in)
autoInputDamping = 0.95; // Dampen control input so you don't` whack out at very slow speeds
// Maneuvering
maxSteeringAngle = 5; // Max radiens you can rotate the wheel. Smaller number is more maneuverable.
horizontalSurfaceForce = 6; // Horizontal center "wing" (provides "bite" into the wind for climbing/diving and turning)
verticalSurfaceForce = 8; // Vertical center "wing" (controls side slip. lower numbers make MORE slide.)
maneuveringForce = 3000; // Horizontal jets (W,S,D,A key thrust)
steeringForce = 1200; // Steering jets (force applied when you move the mouse)
steeringRollForce = 1600; // Steering jets (how much you heel over when you turn)
rollForce = 18; // Auto-roll (self-correction to right you after you roll/invert)
hoverHeight = 2; // Height off the ground at rest
createHoverHeight = 3; // Height off the ground when created
maxForwardSpeed = 400; // speed in which forward thrust force is no longer applied (meters/second)
// Turbo Jet
jetForce = 3000; // Afterburner thrust (this is in addition to normal thrust)
minJetEnergy = 1; // Afterburner can't be used if below this threshhold.
jetEnergyDrain = 0; // Energy use of the afterburners (low number is less drain...can be fractional) // Auto stabilize speed
vertThrustMultiple = 3.0;
// Rigid body
mass = 150; // Mass of the vehicle
bodyFriction = 0; // Don't mess with this.
bodyRestitution = 0.5; // When you hit the ground, how much you rebound. (between 0 and 1)
minRollSpeed = 0; // Don't mess with this.
softImpactSpeed = 14; // Sound hooks. This is the soft hit.
hardImpactSpeed = 25; // Sound hooks. This is the hard hit.
// Ground Impact Damage (uses DamageType::Ground)
minImpactSpeed = 10; // If hit ground at speed above this then it's an impact. Meters/second
speedDamageScale = 0.06;
// Object Impact Damage (uses DamageType::Impact)
collDamageThresholdVel = 23.0;
collDamageMultiplier = 0.02;
//
minTrailSpeed = 15; // The speed your contrail shows up at.
trailEmitter = ContrailEmitter;
forwardJetEmitter = FlyerJetEmitter;
downJetEmitter = FlyerJetEmitter;
//
jetSound = ScoutFlyerThrustSound;
engineSound = ScoutFlyerEngineSound;
softImpactSound = SoftImpactSound;
hardImpactSound = HardImpactSound;
//wheelImpactSound = WheelImpactSound;
//
softSplashSoundVelocity = 10.0;
mediumSplashSoundVelocity = 15.0;
hardSplashSoundVelocity = 20.0;
exitSplashSoundVelocity = 10.0;
exitingWater = VehicleExitWaterMediumSound;
impactWaterEasy = VehicleImpactWaterSoftSound;
impactWaterMedium = VehicleImpactWaterMediumSound;
impactWaterHard = VehicleImpactWaterMediumSound;
waterWakeSound = VehicleWakeMediumSplashSound;
dustEmitter = VehicleLiftoffDustEmitter;
triggerDustHeight = 4.0;
dustHeight = 1.0;
damageEmitter[0] = LightDamageSmoke;
damageEmitter[1] = HeavyDamageSmoke;
damageEmitter[2] = DamageBubbles;
damageEmitterOffset[0] = "0.0 -3.0 0.0 ";
damageLevelTolerance[0] = 0.3;
damageLevelTolerance[1] = 0.7;
numDmgEmitterAreas = 1;
//
max[MiniChaingun] = 1;
max[MiniChaingunAmmo] = 1000;
minMountDist = 4;
splashEmitter[0] = VehicleFoamDropletsEmitter;
splashEmitter[1] = VehicleFoamEmitter;
shieldImpact = VehicleShieldImpact;
cmdCategory = "Tactical";
cmdIcon = CMDFlyingScoutIcon;
cmdMiniIconName = "commander/MiniIcons/com_scout_grey";
targetNameTag = 'Plasma';
targetTypeTag = 'Harrier';
sensorData = VehiclePulseSensor;
sensorRadius = VehiclePulseSensor.detectRadius;
sensorColor = "255 194 9";
checkRadius = 5.5;
observeParameters = "1 10 10";
runningLight[0] = ShrikeLight1;
// runningLight[1] = ShrikeLight2;
shieldEffectScale = "0.937 1.125 0.60";
};
datablock TurretData(HarrierTurret) : TurretDamageProfile
{
className = VehicleTurret;
catagory = "Turrets";
shapeFile = "turret_belly_base.dts";
preload = true;
canControl = false;
cmdCategory = "Tactical";
cmdIcon = CMDFlyingBomberIcon;
cmdMiniIconName = "commander/MiniIcons/com_bomber_grey";
targetNameTag = 'Harrier Bottom';
targetTypeTag = 'Turret';
mass = 1.0; // Not really relevant
repairRate = 0;
maxDamage = Harrier.maxDamage;
destroyedLevel = Harrier.destroyedLevel;
maxEnergy = 5000;
max[MiniChaingun] = 1;
max[MiniChaingunAmmo] = 1000;
thetaMin = 90;
thetaMax = 180;
inheritEnergyFromMount = true;
firstPersonOnly = true;
useEyePoint = true;
numWeapons = 1;
};
datablock TurretImageData(HarrierPlasmaBarrelImage) {
shapeFile = "turret_belly_barrell.dts";
offset = "-0.3 0 0";
mountPoint = 0;
item = MiniChaingun;
ammo = MiniChaingunAmmo;
projectile = BomberFusionBolt;
projectileType = LinearFlareProjectile;
emap = true;
casing = ShellDebris;
shellExitDir = "1.0 0.3 1.0";
shellExitOffset = "0.15 -0.56 -0.1";
shellExitVariance = 5.0;
shellVelocity = 0.0;
usesEnergy = false;
useMountEnergy = false;
// Turret parameters
activationMS = 175; // z0dd - ZOD, 3/27/02. Was 250. Amount of time it takes turret to unfold
deactivateDelayMS = 500;
thinkTimeMS = 140; // z0dd - ZOD, 3/27/02. Was 200. Amount of time before turret starts to unfold (activate)
degPerSecTheta = 600;
degPerSecPhi = 1080;
attackRadius = 200;
stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "WaitFire1";
stateTimeoutValue[0] = 0.5;
stateSequence[0] = "Activate";
stateSound[0] = BomberTurretActivateSound;
stateName[1] = "WaitFire1";
stateTransitionOnTriggerDown[1] = "Fire1";
stateTransitionOnNoAmmo[1] = "NoAmmo1";
stateName[2] = "Fire1";
stateTransitionOnTimeout[2] = "Reload1";
stateTimeoutValue[2] = 0.2;
stateFire[2] = true;
stateRecoil[2] = LightRecoil;
stateAllowImageChange[2] = false;
stateSequence[2] = "Fire";
stateScript[2] = "onFire";
stateSound[2] = BomberTurretFireSound;
stateName[3] = "Reload1";
stateSequence[3] = "Reload";
stateTimeoutValue[3] = 0.1;
stateAllowImageChange[3] = false;
stateTransitionOnTimeout[3] = "WaitFire1";
stateTransitionOnNoAmmo[3] = "NoAmmo1";
stateName[4] = "NoAmmo1";
stateTransitionOnAmmo[4] = "Reload1";
// ---------------------------------------------
// z0dd - ZOD, 5/8/02. Incorrect parameter value
//stateSequence[4] = "NoAmmo";
stateSequence[4] = "NoAmmo1";
stateTransitionOnTriggerDown[4] = "DryFire1";
stateName[5] = "DryFire1";
stateSound[5] = BomberTurretDryFireSound;
stateTimeoutValue[5] = 0.5;
stateTransitionOnTimeout[5] = "NoAmmo1";
};
function Harrier::deleteAllMounted(%data, %obj) {
%turret = %obj.turretObject;
if (!%turret)
return;
%turret.schedule(1000, delete);
}
function Harrier::onAdd(%this, %obj) {
Parent::onAdd(%this, %obj);
if (%obj.clientControl)
serverCmdResetControlObject(%obj.clientControl);
%obj.mountImage(ScoutChaingunParam, 0);
%obj.mountImage(ScoutChaingunImage, 2);
%obj.mountImage(ScoutChaingunPairImage, 3);
%obj.mountImage(ShrikeMissileImage, 4);
%obj.mountImage(ShrikebombImage, 5);
%obj.selectedWeapon = 1;
%obj.nextWeaponFire = 1;
%obj.setInventory(MissileLauncherAmmo, 4);
%obj.setInventory(MortarAmmo, 2);
%obj.setInventory(MiniChaingunAmmo, 1500);
%obj.playThread($activatethread, "activate");
setTargetSensorGroup(%obj.getTarget(),%obj.team);
%turret = TurretData::create(HarrierTurret);
%turret.selectedWeapon = 1;
MissionCleanup.add(%turret);
%turret.setSelfPowered();
%obj.mountObject(%turret, 10);
%turret.setCapacitorRechargeRate(999);
%turret.mountobj = %obj;
%obj.turretObject = %turret;
%turret.team = %obj.team;
%turret.base = %obj;
%turret.mountImage(HarrierPlasmaBarrelImage,0);
setTargetSensorGroup(%turret.getTarget(),%obj.team);
%turret.setAutoFire(true); //YES
%turret.setInventory(MiniChaingunAmmo, 9999, true);
}
function HarrierTurret::onDamage(%data, %obj) {
%newDamageVal = %obj.getDamageLevel();
if(%obj.lastDamageVal !$= "")
if(isObject(%obj.getObjectMount()) && %obj.lastDamageVal > %newDamageVal)
%obj.getObjectMount().setDamageLevel(%newDamageVal);
%obj.lastDamageVal = %newDamageVal;
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,288 @@
//**************************************************************
// JERICHO FORWARD BASE (Mobile Point Base)
//**************************************************************
//**************************************************************
// SOUNDS
//**************************************************************
datablock AudioProfile(MPBEngineSound)
{
filename = "fx/vehicles/mpb_thrust.wav";
description = AudioDefaultLooping3d;
preload = true;
};
datablock AudioProfile(MPBThrustSound)
{
filename = "fx/vehicles/mpb_boost.wav";
description = AudioDefaultLooping3d;
preload = true;
};
datablock AudioProfile(MobileBaseDeploySound)
{
filename = "fx/vehicles/MPB_deploy.wav";
description = AudioClose3d;
preload = true;
};
datablock AudioProfile(MobileBaseUndeploySound)
{
filename = "fx/vehicles/MPB_undeploy_turret.wav";
description = AudioClose3d;
preload = true;
};
datablock AudioProfile(MobileBaseTurretDeploySound)
{
filename = "fx/vehicles/MPB_deploy_turret.wav";
description = AudioClose3d;
preload = true;
};
datablock AudioProfile(MobileBaseTurretUndeploySound)
{
filename = "fx/vehicles/MPB_undeploy_turret.wav";
description = AudioClose3d;
preload = true;
};
datablock AudioProfile(MobileBaseStationDeploySound)
{
filename = "fx/vehicles/MPB_deploy_station.wav";
description = AudioClose3d;
preload = true;
};
datablock AudioProfile(MobileBaseStationUndeploySound)
{
filename = "fx/vehicles/MPB_close_lid.wav";
description = AudioClose3d;
preload = true;
};
//**************************************************************
// LIGHTS
//**************************************************************
datablock RunningLightData(MPBLight1)
{
pointSize = 3.0;
pointColor = "1.0 1.0 1.0 0.3";
pointNodeName = "Headlight_node01";
texture = "special/expFlare";
};
datablock RunningLightData(MPBLight2)
{
pointSize = 3.0;
pointColor = "1.0 1.0 1.0 0.3";
pointNodeName = "Headlight_node02";
texture = "special/expFlare";
};
//**************************************************************
// VEHICLE CHARACTERISTICS
//**************************************************************
datablock SensorData(MPBDeployedSensor) : VehiclePulseSensor
{
jams = true;
jamsOnlyGroup = true;
jamsUsingLOS = false;
jamRadius = 50;
};
datablock WheeledVehicleData(MobileBaseVehicle) : MPBDamageProfile
{
spawnOffset = "0 0 1.0";
renderWhenDestroyed = false;
canControl = true;
catagory = "Vehicles";
shapeFile = "vehicle_land_mpbase.dts";
multipassenger = false;
computeCRC = true;
debrisShapeName = "vehicle_land_mpbase_debris.dts";
debris = ShapeDebris;
drag = 0.0;
density = 20.0;
mountPose[0] = sitting;
numMountPoints = 1;
isProtectedMountPoint[0] = true;
cantAbandon = 1;
cantTeamSwitch = 1;
cameraMaxDist = 20;
cameraOffset = 6;
cameraLag = 1.5;
explosion = LargeGroundVehicleExplosion;
explosionDamage = 0.5;
explosionRadius = 5.0;
maxSteeringAngle = 0.3; // 20 deg.
// Used to test if the station can deploy
stationPoints[1] = "-2.3 -7.38703 -0.65";
stationPoints[2] = "-2.3 -11.8 -0.65";
stationPoints[3] = "0 -7.38703 -0.65";
stationPoints[4] = "0 -11.8 -0.65";
stationPoints[5] = "2.3 -7.38703 -0.65";
stationPoints[6] = "2.3 -11.8 -0.65";
// Rigid Body
mass = 2000;
bodyFriction = 0.8;
bodyRestitution = 0.5;
minRollSpeed = 3;
gyroForce = 400;
gyroDamping = 0.3;
stabilizerForce = 10;
minDrag = 10;
softImpactSpeed = 15; // Play SoftImpact Sound
hardImpactSpeed = 25; // Play HardImpact Sound
// Ground Impact Damage (uses DamageType::Ground)
minImpactSpeed = 12;
speedDamageScale = 0.060;
// Object Impact Damage (uses DamageType::Impact)
collDamageThresholdVel = 18;
collDamageMultiplier = 0.070;
// Engine
engineTorque = 7.0 * 745;
breakTorque = 7.0 * 745;
maxWheelSpeed = 20;
// Springs
springForce = 8000;
springDamping = 1300;
antiSwayForce = 6000;
staticLoadScale = 2;
// Tires
tireRadius = 1.6;
tireFriction = 10.0;
tireRestitution = 0.5;
tireLateralForce = 3000;
tireLateralDamping = 400;
tireLateralRelaxation = 1;
tireLongitudinalForce = 12000;
tireLongitudinalDamping = 600;
tireLongitudinalRelaxation = 1;
tireEmitter = TireEmitter;
//
maxDamage = 3.85;
destroyedLevel = 3.85;
isShielded = true;
energyPerDamagePoint = 125;
maxEnergy = 600;
jetForce = 2800;
minJetEnergy = 60;
jetEnergyDrain = 2.75;
rechargeRate = 1.0;
jetSound = MPBThrustSound;
engineSound = MPBEngineSound;
squeelSound = AssaultVehicleSkid;
softImpactSound = GravSoftImpactSound;
hardImpactSound = HardImpactSound;
//wheelImpactSound = WheelImpactSound;
//
softSplashSoundVelocity = 5.0;
mediumSplashSoundVelocity = 8.0;
hardSplashSoundVelocity = 12.0;
exitSplashSoundVelocity = 8.0;
exitingWater = VehicleExitWaterSoftSound;
impactWaterEasy = VehicleImpactWaterSoftSound;
impactWaterMedium = VehicleImpactWaterMediumSound;
impactWaterHard = VehicleImpactWaterHardSound;
waterWakeSound = VehicleWakeMediumSplashSound;
minMountDist = 3;
damageEmitter[0] = LightDamageSmoke;
damageEmitter[1] = HeavyDamageSmoke;
damageEmitter[2] = DamageBubbles;
damageEmitterOffset[0] = "3.0 0.5 0.0 ";
damageEmitterOffset[1] = "-3.0 0.5 0.0 ";
damageLevelTolerance[0] = 0.3;
damageLevelTolerance[1] = 0.7;
numDmgEmitterAreas = 2;
splashEmitter[0] = VehicleFoamDropletsEmitter;
splashEmitter[1] = VehicleFoamEmitter;
shieldImpact = VehicleShieldImpact;
cmdCategory = "Tactical";
cmdIcon = CMDGroundMPBIcon;
cmdMiniIconName = "commander/MiniIcons/com_mpb_grey";
targetNameTag = 'Jericho';
targetTypeTag = 'MPB';
sensorData = VehiclePulseSensor;
checkRadius = 7.5225;
observeParameters = "1 12 12";
runningLight[0] = MPBLight1;
runningLight[1] = MPBLight2;
shieldEffectScale = "0.85 1.2 0.7";
};
//**************************************************************
// WEAPONS
//**************************************************************
datablock SensorData(MPBTurretMissileSensor)
{
detects = true;
detectsUsingLOS = true;
detectsPassiveJammed = false;
detectsActiveJammed = false;
detectsCloaked = false;
detectionPings = true;
detectRadius = 200;
};
datablock TurretData(MobileTurretBase)
{
className = VehicleTurret;
catagory = "Turrets";
shapeFile = "turret_base_mpb.dts";
preload = true;
mass = 1.0; // Not really relevant
maxDamage = MobileBaseVehicle.maxDamage;
destroyedLevel = MobileBaseVehicle.destroyedLevel;
thetaMin = 15;
thetaMax = 140;
energyPerDamagePoint = 33;
inheritEnergyFromMount = true;
firstPersonOnly = true;
sensorColor = "0 212 45";
sensorData = MPBTurretMissileSensor;
sensorRadius = MPBTurretMissileSensor.detectRadius;
cmdCategory = "Tactical";
cmdMiniIconName = "commander/MiniIcons/com_turret_grey";
targetNameTag = 'Jericho';
targetTypeTag = 'Turret';
canControl = true;
};

View file

@ -0,0 +1,727 @@
//**************************************************************
// SHRIKE SCOUT FLIER
//**************************************************************
datablock SensorData(combatSensor)
{
detects = true;
detectsUsingLOS = true;
detectsPassiveJammed = false;
detectsActiveJammed = false;
detectsCloaked = false;
detectionPings = true;
detectRadius = 500;
};
//**************************************************************
// SOUNDS
//**************************************************************
datablock AudioProfile(ScoutFlyerThrustSound)
{
filename = "fx/vehicles/shrike_boost.wav";
description = AudioDefaultLooping3d;
preload = true;
};
datablock AudioProfile(ScoutFlyerEngineSound)
{
filename = "fx/vehicles/shrike_engine.wav";
description = AudioDefaultLooping3d;
preload = true;
};
datablock AudioProfile(ShrikeBlasterFire)
{
filename = "fx/vehicles/tank_chaingun.wav";
description = AudioDefault3d;
preload = true;
};
datablock AudioProfile(ShrikeBlasterProjectile)
{
filename = "fx/weapons/shrike_blaster_projectile.wav";
description = ProjectileLooping3d;
preload = true;
};
datablock AudioProfile(ShrikeBlasterDryFireSound)
{
filename = "fx/weapons/chaingun_dryfire.wav";
description = AudioClose3d;
preload = true;
};
//**************************************************************
// LIGHTS
//**************************************************************
datablock RunningLightData(ShrikeLight1)
{
type = 1;
radius = 2.0;
length = 3.0;
color = "1.0 1.0 1.0 1.0";
direction = "0.0 1.0 -1.0 ";
offset = "0.0 0.0 -0.5";
texture = "special/lightcone04";
};
datablock RunningLightData(ShrikeLight2)
{
radius = 1.5;
color = "1.0 1.0 1.0 0.3";
direction = "0.0 0.0 -1.0";
offset = "0.0 0.8 -1.2";
texture = "special/headlight4";
};
//**************************************************************
// VEHICLE CHARACTERISTICS
//**************************************************************
datablock FlyingVehicleData(ScoutFlyer) : ShrikeDamageProfile
{
spawnOffset = "0 0 2";
canControl = false;
catagory = "Vehicles";
shapeFile = "vehicle_air_scout.dts";
multipassenger = false;
computeCRC = true;
debrisShapeName = "vehicle_air_scout.dts";
debris = MeShapeDebris;
renderWhenDestroyed = false;
drag = 0.15;
density = 1.0;
mountPose[0] = sitting;
numMountPoints = 1;
isProtectedMountPoint[0] = false;
cameraMaxDist = 15;
cameraOffset = 2.5;
cameraLag = 0.9;
explosion = MeVehicleExplosion;
explosionDamage = 1.0;
explosionRadius = 10.0;
maxDamage = 2.5;
destroyedLevel = 2.5;
HDAddMassLevel = 1.9;
HDMassImage = LflyerHDMassImage;
isShielded = false;
energyPerDamagePoint = 0;
maxEnergy = 1200; // Afterburner and any energy weapon pool
rechargeRate = 4;
minDrag = 22; // Linear Drag (eventually slows you down when not thrusting...constant drag)
rotationalDrag = 900; // Anguler Drag (dampens the drift after you stop moving the mouse...also tumble drag)
maxAutoSpeed = 50; // Autostabilizer kicks in when less than this speed. (meters/second)
autoAngularForce = 400; // Angular stabilizer force (this force levels you out when autostabilizer kicks in)
autoLinearForce = 1; // Linear stabilzer force (this slows you down when autostabilizer kicks in)
autoInputDamping = 0.8; // Dampen control input so you don't` whack out at very slow speeds
// Maneuvering
maxSteeringAngle = 4.5; // Max radiens you can rotate the wheel. Smaller number is more maneuverable.
horizontalSurfaceForce = 6; // Horizontal center "wing" (provides "bite" into the wind for climbing/diving and turning)
verticalSurfaceForce = 4; // Vertical center "wing" (controls side slip. lower numbers make MORE slide.)
maneuveringForce = 5250; // Horizontal jets (W,S,D,A key thrust)
steeringForce = 675; // Steering jets (force applied when you move the mouse)
steeringRollForce = 3000; // Steering jets (how much you heel over when you turn)
rollForce = 1; // Auto-roll (self-correction to right you after you roll/invert)
hoverHeight = 2.5; // Height off the ground at rest
createHoverHeight = 1; // Height off the ground when created
maxForwardSpeed = 165; // speed in which forward thrust force is no longer applied (meters/second)
// Turbo Jet
jetForce = 2500; // Afterburner thrust (this is in addition to normal thrust)
minJetEnergy = 40; // Afterburner can't be used if below this threshhold.
jetEnergyDrain = 10; // Energy use of the afterburners (low number is less drain...can be fractional) // Auto stabilize speed
vertThrustMultiple = 1.25;
// Rigid body
mass = 150; // Mass of the vehicle
bodyFriction = 0; // Don't mess with this.
bodyRestitution = 0.5; // When you hit the ground, how much you rebound. (between 0 and 1)
minRollSpeed = 0; // Don't mess with this.
softImpactSpeed = 14; // Sound hooks. This is the soft hit.
hardImpactSpeed = 25; // Sound hooks. This is the hard hit.
// Ground Impact Damage (uses DamageType::Ground)
minImpactSpeed = 20; // If hit ground at speed above this then it's an impact. Meters/second
speedDamageScale = 0.06;
// Object Impact Damage (uses DamageType::Impact)
collDamageThresholdVel = 23.0;
collDamageMultiplier = 0.02;
//
minTrailSpeed = 150; // The speed your contrail shows up at.
trailEmitter = ContrailEmitter;
forwardJetEmitter = FlyerJetEmitter;
downJetEmitter = FlyerJetEmitter;
//
jetSound = ScoutFlyerThrustSound;
engineSound = ScoutFlyerEngineSound;
softImpactSound = SoftImpactSound;
hardImpactSound = HardImpactSound;
//wheelImpactSound = WheelImpactSound;
//
softSplashSoundVelocity = 10.0;
mediumSplashSoundVelocity = 15.0;
hardSplashSoundVelocity = 20.0;
exitSplashSoundVelocity = 10.0;
exitingWater = VehicleExitWaterMediumSound;
impactWaterEasy = VehicleImpactWaterSoftSound;
impactWaterMedium = VehicleImpactWaterMediumSound;
impactWaterHard = VehicleImpactWaterMediumSound;
waterWakeSound = VehicleWakeMediumSplashSound;
dustEmitter = VehicleLiftoffDustEmitter;
triggerDustHeight = 4.0;
dustHeight = 1.0;
damageEmitter[0] = MeLightDamageSmoke;
damageEmitter[1] = MeHeavyDamageSmoke;
damageEmitter[2] = MeDamageBubbles;
damageEmitterOffset[0] = "0.0 -3.0 0.0 ";
damageLevelTolerance[0] = 0.4;
damageLevelTolerance[1] = 0.75;
numDmgEmitterAreas = 1;
//
max[MiniChaingunAmmo] = 1500;
max[MissileLauncherAmmo] = 4;
max[MortarAmmo] = 2;
minMountDist = 7;
splashEmitter[0] = VehicleFoamDropletsEmitter;
splashEmitter[1] = VehicleFoamEmitter;
shieldImpact = VehicleShieldImpact;
cmdCategory = "Tactical";
cmdIcon = CMDFlyingScoutIcon;
cmdMiniIconName = "commander/MiniIcons/com_scout_grey";
targetNameTag = 'F39';
targetTypeTag = 'Interceptor';
sensorData = combatSensor;
sensorRadius = combatSensor.detectRadius;
sensorColor = "9 9 255";
checkRadius = 5.5;
observeParameters = "1 10 10";
runningLight[0] = ShrikeLight1;
// runningLight[1] = ShrikeLight2;
shieldEffectScale = "0.937 1.125 0.60";
numWeapons = 3;
replaceTime = 90;
};
//--------------------------------------------------------------------------
// Projectile
//--------------------------------------
datablock TracerProjectileData(Shrike_special_gun)
{
doDynamicClientHits = true;
directDamage = 0.175;
directDamageType = $DamageType::Bullet;
explosion = ChaingunExplosion;
splash = ChaingunSplash;
hasDamageRadius = true;
indirectDamage = 0.025;
damageRadius = 0.5;
radiusDamageType = $DamageType::Bullet;
kickBackStrength = 5;
sound = ChaingunProjectile;
dryVelocity = 1750.0;
wetVelocity = 1250.0;
velInheritFactor = 1.0;
fizzleTimeMS = 3000;
lifetimeMS = 6000;
explodeOnDeath = false;
reflectOnWaterImpactAngle = 0.0;
explodeOnWaterImpact = false;
deflectionOnWaterImpact = 0.0;
fizzleUnderwaterMS = 3000;
tracerLength = 40.0;
tracerAlpha = false;
tracerMinPixels = 6;
tracerColor = 211.0/255.0 @ " " @ 215.0/255.0 @ " " @ 120.0/255.0 @ " 0.75";
tracerTex[0] = "special/tracer00";
tracerTex[1] = "special/tracercross";
tracerWidth = 0.20;
crossSize = 0.20;
crossViewAng = 0.990;
renderCross = true;
decalData[0] = ChaingunDecal1;
decalData[1] = ChaingunDecal2;
decalData[2] = ChaingunDecal3;
decalData[3] = ChaingunDecal4;
decalData[4] = ChaingunDecal5;
decalData[5] = ChaingunDecal6;
hasLight = true;
lightRadius = 5.0;
lightColor = "0.5 0.5 0.175";
};
//--------------------------------------------------------------------------
// Projectile
//--------------------------------------
datablock SeekerProjectileData(sidewinder)
{
casingShapeName = "weapon_missile_casement.dts";
projectileShapeName = "weapon_missile_projectile.dts";
hasDamageRadius = true;
indirectDamage = 1.5;
damageRadius = 6.0;
radiusDamageType = $DamageType::MissileTurret;
kickBackStrength = 500;
flareDistance = 200;
flareAngle = 30;
minSeekHeat = 0.0;
explosion = "MissileExplosion";
velInheritFactor = 1.0;
splash = MissileSplash;
baseEmitter = MissileSmokeEmitter;
delayEmitter = MissileFireEmitter;
puffEmitter = MissilePuffEmitter;
lifetimeMS = 15000; // z0dd - ZOD, 4/14/02. Was 6000
muzzleVelocity = 12.0;
maxVelocity = 225.0; // z0dd - ZOD, 4/14/02. Was 80.0
turningSpeed = 50.0;
acceleration = 100.0;
proximityRadius = 4;
terrainAvoidanceSpeed = 100;
terrainScanAhead = 50;
terrainHeightFail = 50;
terrainAvoidanceRadius = 150;
useFlechette = true;
flechetteDelayMs = 225;
casingDeb = FlechetteDebris;
};
//**************************************************************
// WEAPONS
//**************************************************************
datablock ShapeBaseImageData(ScoutChaingunPairImage)
{
className = WeaponImage;
shapeFile = "turret_tank_barrelchain.dts";
item = MiniChaingun;
ammo = MiniChaingunAmmo;
projectile = Shrike_special_gun;
projectileType = TracerProjectile;
mountPoint = 10;
//**original** offset = ".73 0 0";
offset = "1.05 0.8 0.45";
projectileSpread = 1.0 / 1000.0;
usesEnergy = false;
useMountEnergy = false;
// DAVEG -- balancing numbers below!
fireTimeout = 125;
//--------------------------------------
stateName[0] = "Activate";
stateSequence[0] = "Activate";
stateAllowImageChange[0] = false;
stateTimeoutValue[0] = 0.05;
stateTransitionOnTimeout[0] = "Ready";
stateTransitionOnNoAmmo[0] = "NoAmmo";
//--------------------------------------
stateName[1] = "Ready";
stateSpinThread[1] = Stop;
stateTransitionOnTriggerDown[1] = "Spinup";
stateTransitionOnNoAmmo[1] = "NoAmmo";
//--------------------------------------
stateName[2] = "NoAmmo";
stateTransitionOnAmmo[2] = "Ready";
stateSpinThread[2] = Stop;
stateTransitionOnTriggerDown[2] = "DryFire";
//--------------------------------------
stateName[3] = "Spinup";
stateSpinThread[3] = SpinUp;
stateTimeoutValue[3] = 0.01;
stateWaitForTimeout[3] = false;
stateTransitionOnTimeout[3] = "Fire";
stateTransitionOnTriggerUp[3] = "Spindown";
//--------------------------------------
stateName[4] = "Fire";
stateSpinThread[4] = FullSpeed;
stateRecoil[4] = LightRecoil;
stateAllowImageChange[4] = false;
stateScript[4] = "onFire";
stateFire[4] = true;
stateSound[4] = ShrikeBlasterFire;
// IMPORTANT! The stateTimeoutValue below has been replaced by fireTimeOut
// above.
stateTimeoutValue[4] = 0.01;
stateTransitionOnTimeout[4] = "checkState";
//--------------------------------------
stateName[5] = "Spindown";
stateSpinThread[5] = SpinDown;
stateTimeoutValue[5] = 0.01;
stateWaitForTimeout[5] = false;
stateTransitionOnTimeout[5] = "Ready";
stateTransitionOnTriggerDown[5] = "Spinup";
//--------------------------------------
stateName[6] = "EmptySpindown";
// stateSound[6] = ChaingunSpindownSound;
stateSpinThread[6] = SpinDown;
stateTransitionOnAmmo[6] = "Ready";
stateTimeoutValue[6] = 0.01;
stateTransitionOnTimeout[6] = "NoAmmo";
//--------------------------------------
stateName[7] = "DryFire";
stateSound[7] = ShrikeBlasterDryFireSound;
stateTransitionOnTriggerUp[7] = "NoAmmo";
stateTimeoutValue[7] = 0.25;
stateTransitionOnTimeout[7] = "NoAmmo";
stateName[8] = "checkState";
stateTransitionOnTriggerUp[8] = "Spindown";
stateTransitionOnNoAmmo[8] = "EmptySpindown";
stateTimeoutValue[8] = 0.01;
stateTransitionOnTimeout[8] = "ready";
};
datablock ShapeBaseImageData(ScoutChaingunImage) : ScoutChaingunPairImage {
item = MiniChaingun;
ammo = MiniChaingunAmmo;
//**original** offset = "-.73 0 0";
offset = "-1.05 0.8 0.45";
stateScript[3] = "onTriggerDown";
stateScript[5] = "onTriggerUp";
stateScript[6] = "onTriggerUp";
};
datablock ShapeBaseImageData(ShrikeMissileImage)
{
className = WeaponImage;
shapeFile = "weapon_energy_vehicle.dts";
item = MissileLauncher;
ammo = MissileLauncherAmmo;
projectile = sidewinder;
projectileType = SeekerProjectile;
mountPoint = 10;
offset = "0 -0 -0.15"; // L/R - F/B - T/B
usesEnergy = false;
useMountEnergy = true;
minEnergy = 100;
fireEnergy = 100;
fireTimeout = 125;
stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "ActivateReady";
stateTimeoutValue[0] = 0.5;
stateSequence[0] = "Activate";
stateName[1] = "ActivateReady";
stateTransitionOnLoaded[1] = "Ready";
stateTransitionOnNoAmmo[1] = "NoAmmo";
stateName[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTransitionOnTriggerDown[2] = "Fire";
stateName[3] = "Fire";
stateTransitionOnTimeout[3] = "Reload";
stateTimeoutValue[3] = 0.1;
stateFire[3] = true;
stateAllowImageChange[3] = false;
stateScript[3] = "onFire";
stateEmitterTime[3] = 0.2;
stateSound[3] = MissileFireSound;
stateName[4] = "Reload";
stateTransitionOnNoAmmo[4] = "NoAmmo";
stateTransitionOnTimeout[4] = "Ready";
stateTimeoutValue[4] = 5.0;
stateAllowImageChange[4] = false;
stateSound[4] = MissileReloadSound;
stateName[5] = "NoAmmo";
stateTransitionOnAmmo[5] = "Reload";
stateSequence[5] = "NoAmmo";
stateTransitionOnTriggerDown[5] = "DryFire";
stateName[6] = "DryFire";
stateSound[6] = ShrikeBlasterDryFireSound;
stateTimeoutValue[6] = 1.5;
stateTransitionOnTimeout[6] = "NoAmmo";
};
datablock BombProjectileData(shrikeBomb)
{
projectileShapeName = "bomb.dts";
emitterDelay = -1;
directDamage = 0.0;
hasDamageRadius = true;
indirectDamage = 3.5;
damageRadius = 20;
radiusDamageType = $DamageType::BomberBombs;
kickBackStrength = 2500;
explosion = "VehicleBombExplosion";
velInheritFactor = 1.0;
grenadeElasticity = 0.25;
grenadeFriction = 0.4;
armingDelayMS = 100;
muzzleVelocity = 0.1;
drag = 0.05;
minRotSpeed = "1.0 0.0 0.0";
maxRotSpeed = "2.0 0.0 0.0";
scale = "1.0 1.0 1.0";
sound = BomberBombProjectileSound;
};
datablock ShapeBaseImageData(ShrikeBombImage)
{
className = WeaponImage;
shapeFile = "weapon_energy_vehicle.dts";
item = Mortar;
ammo = MortarAmmo;
projectile = shrikeBomb;
projectileType = BombProjectile;
mountPoint = 10;
offset = "0 -0 -0.15"; // L/R - F/B - T/B
usesEnergy = false;
useMountEnergy = true;
minEnergy = 100;
fireEnergy = 100;
fireTimeout = 125;
stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "ActivateReady";
stateTimeoutValue[0] = 0.5;
stateSequence[0] = "Activate";
stateName[1] = "ActivateReady";
stateTransitionOnLoaded[1] = "Ready";
stateTransitionOnNoAmmo[1] = "NoAmmo";
stateName[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTransitionOnTriggerDown[2] = "Fire";
stateName[3] = "Fire";
stateTransitionOnTimeout[3] = "Reload";
stateTimeoutValue[3] = 0.1;
stateFire[3] = true;
stateAllowImageChange[3] = false;
stateScript[3] = "onFire";
stateEmitterTime[3] = 0.2;
stateSound[3] = BomberBombFireSound;
stateName[4] = "Reload";
stateTransitionOnNoAmmo[4] = "NoAmmo";
stateTransitionOnTimeout[4] = "Ready";
stateTimeoutValue[4] = 0.5;
stateAllowImageChange[4] = false;
stateSound[4] = MissileReloadSound;
stateName[5] = "NoAmmo";
stateTransitionOnAmmo[5] = "Reload";
stateSequence[5] = "NoAmmo";
stateTransitionOnTriggerDown[5] = "DryFire";
stateName[6] = "DryFire";
stateSound[6] = BomberBombDryFireSound;
stateTimeoutValue[6] = 1.5;
stateTransitionOnTimeout[6] = "NoAmmo";
};
datablock ShapeBaseImageData(ScoutChaingunParam)
{
mountPoint = 2;
shapeFile = "turret_muzzlepoint.dts";
projectile = sidewinder;
projectileType = SeekerProjectile;
isSeeker = true;
seekRadius = $Bomber::SeekRadius;
maxSeekAngle = 45;
seekTime = $Bomber::SeekTime;
minSeekHeat = $Bomber::minSeekHeat;
minTargetingDistance = $Bomber::minTargetingDistance;
useTargetAudio = $Bomber::useTargetAudio;
};
function shrikeMissileImage::onFire(%data,%obj,%slot)
{
%p = Parent::onFire(%data, %obj, %slot);
if(!%obj.isdrone)
%obj.getMountNodeObject(0).decInventory(%data.ammo, 1);
MissileSet.add(%p);
if(%obj.isdrone == 1)
%p.setObjectTarget(%obj.target);
else{
if (%obj.getControllingClient())
%target = %obj.getLockedTarget();
else
%target = %obj.getTargetObject();
%homein = missileCheckAirTarget(%target);
if(%target && %homein)
%p.setObjectTarget(%target);
else if(%obj.isLocked())
%p.setPositionTarget(%obj.getLockedPosition());
else
%p.setNoTarget();
}
}
function shrikebombImage::onFire(%data,%obj,%slot)
{
%p = Parent::onFire(%data, %obj, %slot);
%obj.getMountNodeObject(0).decInventory(%data.ammo, 1);
MissileSet.add(%p);
}
function scoutflyer::onDestroyed(%data, %obj, %prevState)
{
if(%obj.lastPilot.lastVehicle == %obj)
if(%obj.getMountNodeObject(0) == %obj.lastPilot)
schedule(200, %obj.lastPilot, "scKillPilot", %obj.lastPilot, %obj.lastDamagedBy);
Parent::onDestroyed(%data, %obj, %prevState);
}
function scKillPilot(%player, %source)
{
if(isObject(%player) && %player.getState() !$= "Dead")
%player.damage(%source, %player.position, %player.getDatablock().maxDamage, $DamageType::ShotDown);
}
function scoutflyer::onEnterLiquid(%data, %obj, %coverage, %type)
{
switch(%type)
{
case 0:
//Water
%obj.setHeat(0.0);
%obj.liquidDamage(%data, 0.1, $DamageType::Crash);
case 1:
//Ocean Water
%obj.setHeat(0.0);
%obj.liquidDamage(%data, 0.1, $DamageType::Crash);
case 2:
//River Water
%obj.setHeat(0.0);
%obj.liquidDamage(%data, 0.1, $DamageType::Crash);
case 3:
//Stagnant Water
%obj.setHeat(0.0);
%obj.liquidDamage(%data, 0.1, $DamageType::Crash);
case 4:
//Lava
%obj.liquidDamage(%data, $VehicleDamageLava, $DamageType::Lava);
case 5:
//Hot Lava
%obj.liquidDamage(%data, $VehicleDamageHotLava, $DamageType::Lava);
case 6:
//Crusty Lava
%obj.liquidDamage(%data, $VehicleDamageCrustyLava, $DamageType::Lava);
case 7:
//Quick Sand
}
}
function ScoutFlyer::onAdd(%this, %obj)
{
Parent::onAdd(%this, %obj);
if (%obj.clientControl)
serverCmdResetControlObject(%obj.clientControl);
%obj.mountImage(ScoutChaingunParam, 0);
%obj.mountImage(ScoutChaingunImage, 2);
%obj.mountImage(ScoutChaingunPairImage, 3);
%obj.mountImage(ShrikeMissileImage, 4);
%obj.mountImage(ShrikebombImage, 5);
%obj.selectedWeapon = 1;
%obj.nextWeaponFire = 1;
%obj.setInventory(MissileLauncherAmmo, 4);
%obj.setInventory(MortarAmmo, 2);
%obj.setInventory(MiniChaingunAmmo, 1500);
%obj.schedule(5500, "playThread", $ActivateThread, "activate");
}
function Scoutflyer::playerMounted(%data, %obj, %player, %node) {
$numVWeapons = 3;
%ammoAmt = %obj.inv[MiniChaingunAmmo];
if(%ammoAmt)
%obj.incInventory(MiniChaingunAmmo, %ammoAmt);
%ammoAmt = %obj.inv[MissileLauncherAmmo];
if(%ammoAmt)
%obj.incInventory(MissileLauncherAmmo, %ammoAmt);
%ammoAmt = %obj.inv[MortarAmmo];
if(%ammoAmt)
%obj.incInventory(MortarAmmo, %ammoAmt);
bottomPrint(%player.client, "Shrike: wep1 CG, wep2 missile, wep3 bombs", 5, 2 );
commandToClient(%player.client, 'setHudMode', 'Pilot', "Shrike2", %node);
%obj.selectedWeapon = 1;
commandToClient(%player.client, 'SetWeaponryVehicleKeys', true);
if( %player.client.observeCount > 0 )
resetObserveFollow( %player.client, false );
}
function missileCheckAirTarget(%obj){
if(!isobject(%obj))
return;
%mask = $TypeMasks::InteriorObjectType | $TypeMasks::TerrainObjectType;
%pos = %obj.getWorldBoxCenter();
%searchResult = containerRayCast(%pos,vectorAdd(%pos,"0 0 -15"), %mask, %obj);
if(%searchResult)
%result = false;
else
%result = true;
return %result;
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,853 @@
datablock FlyingVehicleData(StrikeFlyer) : ShrikeDamageProfile
{
spawnOffset = "0 0 2";
canControl = false;
catagory = "Vehicles";
shapeFile = "vehicle_air_scout.dts";
multipassenger = false;
computeCRC = true;
debrisShapeName = "vehicle_air_scout.dts";
debris = MeShapeDebris;
renderWhenDestroyed = false;
drag = 0.15;
density = 1.0;
mountPose[0] = sitting;
numMountPoints = 1;
isProtectedMountPoint[0] = false;
cameraMaxDist = 15;
cameraOffset = 2.5;
cameraLag = 0.9;
explosion = MeVehicleExplosion;
explosionDamage = 1.0;
explosionRadius = 10.0;
maxDamage = 3.5;
destroyedLevel = 3.5;
HDAddMassLevel = 2.625;
HDMassImage = LflyerHDMassImage;
isShielded = false;
energyPerDamagePoint = 0;
maxEnergy = 500; // Afterburner and any energy weapon pool
rechargeRate = 4;
minDrag = 25; // Linear Drag (eventually slows you down when not thrusting...constant drag)
rotationalDrag = 900; // Anguler Drag (dampens the drift after you stop moving the mouse...also tumble drag)
maxAutoSpeed = 57; // Autostabilizer kicks in when less than this speed. (meters/second)
autoAngularForce = 400; // Angular stabilizer force (this force levels you out when autostabilizer kicks in)
autoLinearForce = 1; // Linear stabilzer force (this slows you down when autostabilizer kicks in)
autoInputDamping = 0.8; // Dampen control input so you don't` whack out at very slow speeds
// Maneuvering
maxSteeringAngle = 7.0; // Max radiens you can rotate the wheel. Smaller number is more maneuverable.
horizontalSurfaceForce = 6; // Horizontal center "wing" (provides "bite" into the wind for climbing/diving and turning)
verticalSurfaceForce = 4; // Vertical center "wing" (controls side slip. lower numbers make MORE slide.)
maneuveringForce = 4750; // Horizontal jets (W,S,D,A key thrust)
steeringForce = 587; // Steering jets (force applied when you move the mouse)
steeringRollForce = 3000; // Steering jets (how much you heel over when you turn)
rollForce = 1; // Auto-roll (self-correction to right you after you roll/invert)
hoverHeight = 2.5; // Height off the ground at rest
createHoverHeight = 1; // Height off the ground when created
maxForwardSpeed = 190; // speed in which forward thrust force is no longer applied (meters/second)
// Turbo Jet
jetForce = 2000; // Afterburner thrust (this is in addition to normal thrust)
minJetEnergy = 40; // Afterburner can't be used if below this threshhold.
jetEnergyDrain = 12; // Energy use of the afterburners (low number is less drain...can be fractional) // Auto stabilize speed
vertThrustMultiple = 0.0;
// Rigid body
mass = 180; // Mass of the vehicle
bodyFriction = 0; // Don't mess with this.
bodyRestitution = 0.5; // When you hit the ground, how much you rebound. (between 0 and 1)
minRollSpeed = 0; // Don't mess with this.
softImpactSpeed = 14; // Sound hooks. This is the soft hit.
hardImpactSpeed = 25; // Sound hooks. This is the hard hit.
// Ground Impact Damage (uses DamageType::Ground)
minImpactSpeed = 20; // If hit ground at speed above this then it's an impact. Meters/second
speedDamageScale = 0.06;
// Object Impact Damage (uses DamageType::Impact)
collDamageThresholdVel = 23.0;
collDamageMultiplier = 0.02;
//
minTrailSpeed = 150; // The speed your contrail shows up at.
trailEmitter = ContrailEmitter;
forwardJetEmitter = FlyerJetEmitter;
downJetEmitter = FlyerJetEmitter;
//
jetSound = ScoutFlyerThrustSound;
engineSound = ScoutFlyerEngineSound;
softImpactSound = SoftImpactSound;
hardImpactSound = HardImpactSound;
//wheelImpactSound = WheelImpactSound;
//
softSplashSoundVelocity = 10.0;
mediumSplashSoundVelocity = 15.0;
hardSplashSoundVelocity = 20.0;
exitSplashSoundVelocity = 10.0;
exitingWater = VehicleExitWaterMediumSound;
impactWaterEasy = VehicleImpactWaterSoftSound;
impactWaterMedium = VehicleImpactWaterMediumSound;
impactWaterHard = VehicleImpactWaterMediumSound;
waterWakeSound = VehicleWakeMediumSplashSound;
dustEmitter = VehicleLiftoffDustEmitter;
triggerDustHeight = 4.0;
dustHeight = 1.0;
damageEmitter[0] = MeLightDamageSmoke;
damageEmitter[1] = MeHeavyDamageSmoke;
damageEmitter[2] = MeDamageBubbles;
damageEmitterOffset[0] = "0.0 -3.0 0.0 ";
damageLevelTolerance[0] = 0.4;
damageLevelTolerance[1] = 0.75;
numDmgEmitterAreas = 1;
//
max[chaingunAmmo] = 1500;
max[MissileLauncherAmmo] = 2;
max[MortarAmmo] = 3;
minMountDist = 7;
splashEmitter[0] = VehicleFoamDropletsEmitter;
splashEmitter[1] = VehicleFoamEmitter;
shieldImpact = VehicleShieldImpact;
cmdCategory = "Tactical";
cmdIcon = CMDFlyingScoutIcon;
cmdMiniIconName = "commander/MiniIcons/com_scout_grey";
targetNameTag = 'F41 Awring Strike';
targetTypeTag = 'Fighter';
sensorData = combatSensor;
sensorRadius = combatSensor.detectRadius;
sensorColor = "9 9 255";
checkRadius = 5.5;
observeParameters = "1 10 10";
runningLight[0] = ShrikeLight1;
// runningLight[1] = ShrikeLight2;
shieldEffectScale = "0.937 1.125 0.60";
numWeapons = 3;
replaceTime = 110;
};
//----------------------------------------------
//Projectiles
//----------------------------------------------
datablock BombProjectileData(NapalmBomb)
{
projectileShapeName = "bomb.dts";
emitterDelay = -1;
directDamage = 0.0;
hasDamageRadius = true;
indirectDamage = 1.0;
damageRadius = 30;
radiusDamageType = $DamageType::Plasma;
kickBackStrength = 2000;
explosion = "VehicleBombExplosion";
velInheritFactor = 1.0;
grenadeElasticity = 0.25;
grenadeFriction = 0.4;
armingDelayMS = 2000;
muzzleVelocity = 0.1;
drag = 0.3;
minRotSpeed = "60.0 0.0 0.0";
maxRotSpeed = "80.0 0.0 0.0";
scale = "1.0 1.0 1.0";
sound = BomberBombProjectileSound;
};
datablock SeekerProjectileData(sidewinder_MarkIII)
{
casingShapeName = "weapon_missile_casement.dts";
projectileShapeName = "weapon_missile_projectile.dts";
hasDamageRadius = true;
indirectDamage = 1.0;
damageRadius = 12.0;
radiusDamageType = $DamageType::Missile;
kickBackStrength = 750;
explosion = "MissileExplosion";
splash = MissileSplash;
velInheritFactor = 1.0; // to compensate for slow starting velocity, this value
// is cranked up to full so the missile doesn't start
// out behind the player when the player is moving
// very quickly - bramage
baseEmitter = MissileSmokeEmitter;
delayEmitter = MissileFireEmitter;
puffEmitter = MissilePuffEmitter;
bubbleEmitter = GrenadeBubbleEmitter;
bubbleEmitTime = 1.0;
exhaustEmitter = MissileLauncherExhaustEmitter;
exhaustTimeMs = 300;
exhaustNodeName = "muzzlePoint1";
lifetimeMS = 20000; // z0dd - ZOD, 4/14/02. Was 6000
muzzleVelocity = 12.0;
maxVelocity = 215.0; // z0dd - ZOD, 4/14/02. Was 80.0
turningSpeed = 60.0;
acceleration = 100.0;
proximityRadius = 5;
terrainAvoidanceSpeed = 100;
terrainScanAhead = 25;
terrainHeightFail = 12;
terrainAvoidanceRadius = 30;
flareDistance = 100;
flareAngle = 25;
minSeekHeat = 0.5;
sound = MissileProjectileSound;
hasLight = true;
lightRadius = 5.0;
lightColor = "0.2 0.05 0";
useFlechette = true;
flechetteDelayMs = 100;
casingDeb = FlechetteDebris;
explodeOnWaterImpact = false;
};
//--------------------------------------------------
//weaponImages
//--------------------------------------------------
datablock ShapeBaseImageData(StrikeChaingunImage)
{
className = WeaponImage;
shapeFile = "turret_missile_large.dts"; //was turret_tank_barrelchain.dts
item = MiniChaingun;
ammo = MiniChaingunAmmo;
projectile = ApacheCGBullet;
projectileType = TracerProjectile;
mountPoint = 10;
offset = "0 1.5 -0.2"; // L/R - F/B - T/B was "0 3.25 0.75"
rotation = "0 1 0 180";
projectileSpread = 1.0 / 1000.0;
usesEnergy = false;
stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "ActivateReady";
stateTimeoutValue[0] = 0.1;
stateSequence[0] = "Activate";
stateName[1] = "ActivateReady";
stateTransitionOnLoaded[1] = "Ready";
stateTransitionOnNoAmmo[1] = "NoAmmo";
stateName[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTransitionOnTriggerDown[2] = "Fire";
stateName[3] = "Fire";
stateFire[3] = true;
stateScript[3] = "onFire";
stateSound[3] = ShrikeBlasterFire;
stateTimeoutValue[3] = 0.01;
stateTransitionOnTimeout[3] = "Reload";
stateAllowImageChange[3] = false;
stateName[4] = "Reload";
stateTransitionOnNoAmmo[4] = "NoAmmo";
stateTransitionOnTimeout[4] = "Ready";
stateTimeoutValue[4] = 0.01;
stateAllowImageChange[4] = false;
stateSound[4] = MissileReloadSound;
stateName[5] = "NoAmmo";
stateTransitionOnAmmo[5] = "Reload";
stateSequence[5] = "NoAmmo";
stateTransitionOnTriggerDown[5] = "DryFire";
stateName[6] = "DryFire";
stateSound[6] = ShrikeBlasterDryFireSound;
stateTimeoutValue[6] = 1.0;
stateTransitionOnTimeout[6] = "NoAmmo";
};
datablock ShapeBaseImageData(StrikeMissileImage)
{
className = WeaponImage;
shapeFile = "weapon_energy_vehicle.dts";
item = MissileLauncher;
ammo = MissileLauncherAmmo;
projectile = sidewinder_MarkIII;
projectileType = SeekerProjectile;
mountPoint = 10;
offset = "0 -0 -0.15"; // L/R - F/B - T/B
usesEnergy = false;
useMountEnergy = true;
minEnergy = 100;
fireEnergy = 100;
fireTimeout = 125;
stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "ActivateReady";
stateTimeoutValue[0] = 0.5;
stateSequence[0] = "Activate";
stateName[1] = "ActivateReady";
stateTransitionOnLoaded[1] = "Ready";
stateTransitionOnNoAmmo[1] = "NoAmmo";
stateName[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTransitionOnTriggerDown[2] = "Fire";
stateName[3] = "Fire";
stateTransitionOnTimeout[3] = "Reload";
stateTimeoutValue[3] = 0.1;
stateFire[3] = true;
stateAllowImageChange[3] = false;
stateScript[3] = "onFire";
stateEmitterTime[3] = 0.2;
stateSound[3] = MissileFireSound;
stateName[4] = "Reload";
stateTransitionOnNoAmmo[4] = "NoAmmo";
stateTransitionOnTimeout[4] = "Ready";
stateTimeoutValue[4] = 0.1;
stateAllowImageChange[4] = false;
stateSound[4] = MissileReloadSound;
stateName[5] = "NoAmmo";
stateTransitionOnAmmo[5] = "Reload";
stateSequence[5] = "NoAmmo";
stateTransitionOnTriggerDown[5] = "DryFire";
stateName[6] = "DryFire";
stateSound[6] = ShrikeBlasterDryFireSound;
stateTimeoutValue[6] = 1.5;
stateTransitionOnTimeout[6] = "NoAmmo";
};
datablock ShapeBaseImageData(StrikeBombImage)
{
className = WeaponImage;
shapeFile = "weapon_energy_vehicle.dts";
item = Mortar;
ammo = MortarAmmo;
projectile = NapalmBomb;
projectileType = BombProjectile;
mountPoint = 10;
offset = "0 -0 -0.15"; // L/R - F/B - T/B
usesEnergy = false;
useMountEnergy = true;
minEnergy = 100;
fireEnergy = 100;
fireTimeout = 125;
stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "ActivateReady";
stateTimeoutValue[0] = 0.5;
stateSequence[0] = "Activate";
stateName[1] = "ActivateReady";
stateTransitionOnLoaded[1] = "Ready";
stateTransitionOnNoAmmo[1] = "NoAmmo";
stateName[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTransitionOnTriggerDown[2] = "Fire";
stateName[3] = "Fire";
stateTransitionOnTimeout[3] = "Reload";
stateTimeoutValue[3] = 0.1;
stateFire[3] = true;
stateAllowImageChange[3] = false;
stateScript[3] = "onFire";
stateEmitterTime[3] = 0.2;
stateSound[3] = BomberBombFireSound;
stateName[4] = "Reload";
stateTransitionOnNoAmmo[4] = "NoAmmo";
stateTransitionOnTimeout[4] = "Ready";
stateTimeoutValue[4] = 0.5;
stateAllowImageChange[4] = false;
stateSound[4] = MissileReloadSound;
stateName[5] = "NoAmmo";
stateTransitionOnAmmo[5] = "Reload";
stateSequence[5] = "NoAmmo";
stateTransitionOnTriggerDown[5] = "DryFire";
stateName[6] = "DryFire";
stateSound[6] = BomberBombDryFireSound;
stateTimeoutValue[6] = 1.5;
stateTransitionOnTimeout[6] = "NoAmmo";
};
//------------------------------------------------------
//Vehicle Functions
//------------------------------------------------------
function StrikeFlyer::onAdd(%this, %obj)
{
Parent::onAdd(%this, %obj);
if (%obj.clientControl)
serverCmdResetControlObject(%obj.clientControl);
%obj.mountImage(ScoutChaingunParam, 0);
%obj.mountImage(StrikeMissileImage, 2);
%obj.mountImage(StrikeBombImage, 3);
%obj.mountImage(StrikeChaingunImage, 4);
%obj.selectedWeapon = 1;
%obj.nextWeaponFire = 2;
%obj.setInventory(MiniChaingunAmmo, 1500);
%obj.setInventory(MissileLauncherAmmo, 2);
%obj.setInventory(MortarAmmo, 3);
%obj.schedule(5500, "playThread", $ActivateThread, "activate");
}
function StrikeFlyer::playerMounted(%data, %obj, %player, %node)
{
%ammoAmt = %obj.inv[MissileLauncherAmmo];
if(%ammoAmt)
%obj.setInventory(MissileLauncherAmmo, 2);
%ammoAmt = %obj.inv[MortarAmmo];
if(%ammoAmt)
%obj.setInventory(MortarAmmo, 3);
%ammoAmt = %obj.inv[MiniChaingunAmmo];
if(%ammoAmt)
%obj.incInventory(MiniChaingunAmmo, %ammoAmt);
bottomPrint(%player.client, "Strike Fighter: wep1 CG, wep2 missile, wep3 Napalm bombs", 5, 2 );
commandToClient(%player.client, 'setHudMode', 'Pilot', "Shrike2", %node);
%obj.selectedWeapon = 1;
$numVWeapons = 3;
commandToClient(%player.client, 'SetWeaponryVehicleKeys', true);
if( %player.client.observeCount > 0 )
resetObserveFollow( %player.client, false );
}
function StrikeFlyer::playerDismounted(%data, %obj, %player)
{
%obj.fireWeapon = false;
%obj.setImageTrigger(2, false);
%obj.setImageTrigger(3, false);
%obj.setImageTrigger(4, false);
%obj.setImageTrigger(5, false);
%obj.setImageTrigger(6, false);
setTargetSensorGroup(%obj.getTarget(), %obj.team);
if( %player.client.observeCount > 0 )
resetObserveFollow( %player.client, true );
}
function StrikeFlyer::onTrigger(%data, %obj, %trigger, %state)
{
// data = ScoutFlyer datablock
// obj = ScoutFlyer object number
// trigger = 0 for "fire", 1 for "jump", 3 for "thrust"
// state = 1 for firing, 0 for not firing
if(%trigger == 0)
{
switch (%state) {
case 0:
%obj.fireWeapon = false;
%obj.setImageTrigger(2, false);
%obj.setImageTrigger(3, false);
%obj.setImageTrigger(4, false);
case 1:
%obj.fireWeapon = true;
if(%obj.selectedWeapon == 1)
{
%obj.setImageTrigger(2, false);
%obj.setImageTrigger(3, false);
%obj.setImageTrigger(4, true);
}
else if(%obj.selectedWeapon == 2)
{
%obj.setImageTrigger(2, true);
%obj.setImageTrigger(3, false);
%obj.setImageTrigger(4, false);
}
else
{
%obj.setImageTrigger(2, false);
%obj.setImageTrigger(3, true);
%obj.setImageTrigger(4, false);
}
}
}
}
function strikeflyer::onDestroyed(%data, %obj, %prevState)
{
if(%obj.lastPilot.lastVehicle == %obj)
if(%obj.getMountNodeObject(0) == %obj.lastPilot)
schedule(200, %obj.lastPilot, "scKillPilot", %obj.lastPilot, %obj.lastDamagedBy);
Parent::onDestroyed(%data, %obj, %prevState);
}
//------------------------------------------------------
//Weapon Functions
//------------------------------------------------------
function StrikeMissileImage::onFire(%data,%obj,%slot)
{
%p = Parent::onFire(%data, %obj, %slot);
if(isobject(%obj) || %obj) {
%obj.getMountNodeObject(0).decInventory(%data.ammo, 1);
}
MissileSet.add(%p);
if (%obj.getControllingClient())
if(isobject(%obj) || %obj)
%target = %obj.getLockedTarget();
else
if(isobject(%obj) || %obj)
%target = %obj.getTargetObject();
%homein = missileCheckAirTarget(%target);
if(%target && %homein)
%p.setObjectTarget(%target);
else if(%obj.isLocked())
%p.setPositionTarget(%obj.getLockedPosition());
else
%p.setNoTarget();
}
function StrikeBombImage::onFire(%data,%obj,%slot){
if(isobject(%obj) || %obj) {
%p = Parent::onFire(%data, %obj, %slot);
%obj.getMountNodeObject(0).decInventory(%data.ammo, 1);
%p.spdvec = %obj.getVelocity();
}
}
function Strikeflyer::onEnterLiquid(%data, %obj, %coverage, %type)
{
switch(%type)
{
case 0:
//Water
%obj.setHeat(0.0);
%obj.liquidDamage(%data, 0.1, $DamageType::Crash);
case 1:
//Ocean Water
%obj.setHeat(0.0);
%obj.liquidDamage(%data, 0.1, $DamageType::Crash);
case 2:
//River Water
%obj.setHeat(0.0);
%obj.liquidDamage(%data, 0.1, $DamageType::Crash);
case 3:
//Stagnant Water
%obj.setHeat(0.0);
%obj.liquidDamage(%data, 0.1, $DamageType::Crash);
case 4:
//Lava
%obj.liquidDamage(%data, $VehicleDamageLava, $DamageType::Lava);
case 5:
//Hot Lava
%obj.liquidDamage(%data, $VehicleDamageHotLava, $DamageType::Lava);
case 6:
//Crusty Lava
%obj.liquidDamage(%data, $VehicleDamageCrustyLava, $DamageType::Lava);
case 7:
//Quick Sand
}
}
datablock ParticleData(NapalmInitExpFlameParticle)
{
dragCoefficient = 0;
gravityCoefficient = 0.0;
inheritedVelFactor = 0.2;
constantAcceleration = -1.1;
lifetimeMS = 2000;
lifetimeVarianceMS = 0;
textureName = "special/cloudflash";
colors[0] = "1 0.18 0.03 0.6";
colors[1] = "1 0.18 0.03 0.0";
sizes[0] = 7;
sizes[1] = 8;
};
datablock ParticleEmitterData(NapalmInitExpFlameEmitter)
{
ejectionPeriodMS = 3;
periodVarianceMS = 0;
ejectionOffset = 2.0;
ejectionVelocity = 30.0;
velocityVariance = 10.0;
thetaMin = 0.0;
thetaMax = 90.0;
lifetimeMS = 250;
particles = "NapalmInitExpFlameParticle";
};
datablock ParticleData(NapalmExpGroundBurnParticle)
{
dragCoefficient = 2;
gravityCoefficient = -0.4;
inheritedVelFactor = 0.2;
constantAcceleration = 0.0;
lifetimeMS = 3000;
lifetimeVarianceMS = 0;
textureName = "special/cloudflash";
colors[0] = "1 0.18 0.03 0.6";
colors[1] = "1 0.18 0.03 0.0";
sizes[0] = 6;
sizes[1] = 6.75;
};
datablock ParticleEmitterData(NapalmExpGroundBurnEmitter)
{
ejectionPeriodMS = 8;
periodVarianceMS = 0;
ejectionOffset = 0.0;
ejectionVelocity = 10.0;
velocityVariance = 10.0;
thetaMin = 87.0;
thetaMax = 88.0;
lifetimeMS = 10000;
particles = "NapalmExpGroundBurnParticle";
};
datablock ExplosionData(NapalmExplosion)
{
// soundProfile = BombExplosionSound;
soundProfile = MortarExplosionSound;
emitter[0] = NapalmInitExpFlameEmitter;
emitter[1] = NapalmExpGroundBurnEmitter;
explosionShape = "effect_plasma_explosion.dts";
faceViewer = true;
lifetimeMS = 10000;
playSpeed = 0.7;
sizes[0] = "7.0 7.0 7.0";
sizes[1] = "7.0 7.0 7.0";
times[0] = 0.0;
times[1] = 1.0;
};
datablock TracerProjectileData(napalmSubExplosion)
{
doDynamicClientHits = true;
directDamage = 0.0;
directDamageType = $DamageType::Plasma;
explosion = NapalmExplosion;
splash = ChaingunSplash;
hasDamageRadius = true;
indirectDamage = 0.3;
damageRadius = 20;
radiusDamageType = $DamageType::Plasma;
kickBackStrength = 5;
sound = ChaingunProjectile;
dryVelocity = 30.0;
wetVelocity = 30.0;
velInheritFactor = 0;
fizzleTimeMS = 3000;
lifetimeMS = 6000;
explodeOnDeath = false;
reflectOnWaterImpactAngle = 0.0;
explodeOnWaterImpact = false;
deflectionOnWaterImpact = 0.0;
fizzleUnderwaterMS = 3000;
tracerLength = 1.0;
tracerAlpha = false;
tracerMinPixels = 6;
tracerColor = 211.0/255.0 @ " " @ 215.0/255.0 @ " " @ 120.0/255.0 @ " 0.75";
tracerTex[0] = "special/tracer00";
tracerTex[1] = "special/tracercross";
tracerWidth = 0.20;
crossSize = 0.20;
crossViewAng = 0.990;
renderCross = true;
decalData[0] = ChaingunDecal1;
decalData[1] = ChaingunDecal2;
decalData[2] = ChaingunDecal3;
decalData[3] = ChaingunDecal4;
decalData[4] = ChaingunDecal5;
decalData[5] = ChaingunDecal6;
hasLight = true;
lightRadius = 1.0;
lightColor = "0.5 0.5 0.175";
};
function NapalmBomb::onExplode(%data, %proj, %pos, %mod)
{
%vec = %proj.spdvec;
%vec = getword(%vec, 0)@" "@getword(%vec, 1)@" 0";
%vec = vectorNormalize(%vec);
%vec = vectorscale(%vec, 30);
%result = containerRayCast(vectoradd(%pos,"0 0 10"), vectoradd(%pos,%vec), $TypeMasks::StaticShapeObjectType | $TypeMasks::InteriorObjectType | $TypeMasks::ForceFieldObjectType | $TypeMasks::TerrainObjectType, %proj);
for(%i = 0; %i < 3; %i++){
if(%result)
schedule((5 * %i), 0, "NapalmFindNewDir", %pos, %vec, %proj.sourceobject, 0, 0);
else {
%rndvec = (getRandom(1, 15) - 7.5)@" "@(getRandom(1, 15) - 7.5)@" "@((getRandom() * 5) + 5);
%newvec = vectoradd(%vec,%rndvec);
%newvec = vectoradd(%pos,%newvec);
%p = new TracerProjectile()
{
dataBlock = napalmSubExplosion;
initialDirection = "0 0 -1";
initialPosition = %newvec;
sourceSlot = 5;
};
%p.sourceobject = %proj.sourceobject;
%p.vector = %vec;
%p.count = 1;
}
}
if (%data.hasDamageRadius)
RadiusExplosion(%proj, %pos, %data.damageRadius, %data.indirectDamage, %data.kickBackStrength, %proj.sourceObject, %data.radiusDamageType);
}
function napalmSubExplosion::onExplode(%data, %proj, %pos, %mod)
{
if(!isSet(%proj.maxCount)) {
%proj.maxCount = 5;
}
if(%proj.count < %proj.maxCount){
%vec = vectorscale(vectornormalize(%proj.vector), 24);
%result = containerRayCast(vectoradd(%pos,"0 0 10"), vectoradd(%pos,%vec), $TypeMasks::StaticShapeObjectType | $TypeMasks::InteriorObjectType | $TypeMasks::ForceFieldObjectType | $TypeMasks::TerrainObjectType, %proj);
if(%result)
schedule(5, 0, "NapalmFindNewDir", %pos, %vec, %proj.sourceobject, %proj.count, 0);
else{
%rndvec = (getRandom(1, 10) - 5)@" "@(getRandom(1, 10) - 5)@" "@((getRandom() * 5) + 5);
%newvec = vectoradd(%vec,%rndvec);
%newvec = vectoradd(%pos,%newvec);
%p = new TracerProjectile()
{
dataBlock = napalmSubExplosion;
initialDirection = "0 0 -1";
initialPosition = %newvec;
sourceObject = %proj.sourceobject;
sourceSlot = 5;
};
%p.sourceobject = %proj.sourceobject;
%p.vector = %vec;
%p.count = %proj.count + 1;
%p.maxCount = %proj.maxCount;
}
}
if (%data.hasDamageRadius)
RadiusExplosion(%proj, %pos, %data.damageRadius, %data.indirectDamage, %data.kickBackStrength, %proj.sourceObject, %data.radiusDamageType);
}
function NapalmFindNewDir(%pos, %vec, %source, %count, %count2){
if(%count2 == 2){
%rndvec = getRandom(1, 10)@" "@getRandom(1, 10)@" "@((getRandom() * 5) + 4);
%newvec = vectoradd(%pos,%rndvec);
%p = new TracerProjectile()
{
dataBlock = napalmSubExplosion;
initialDirection = "0 0 -1";
initialPosition = %newvec;
sourceObject = %source;
sourceSlot = 5;
};
%p.sourceobject = %source;
%p.vector = %vec;
%p.count = %count+1;
return;
}
if(%count2 == 1){
%vec = vectorscale(%vec,-1);
%result = containerRayCast(vectoradd(%pos,"0 0 10"), vectoradd(%pos,%vec), $TypeMasks::StaticShapeObjectType | $TypeMasks::InteriorObjectType | $TypeMasks::ForceFieldObjectType | $TypeMasks::TerrainObjectType, 0);
if(!(%result)){
%rndvec = getRandom(1, 10)@" "@getRandom(1, 10)@" "@((getRandom() * 5) + 4);
%newvec = vectoradd(%vec,%rndvec);
%newvec = vectoradd(%pos,%newvec);
%p = new TracerProjectile()
{
dataBlock = napalmSubExplosion;
initialDirection = "0 0 -1";
initialPosition = %newvec;
sourceObject = %source;
sourceSlot = 5;
};
%p.sourceobject = %source;
%p.vector = %vec;
%p.count = %count+1;
return;
}
}
else {
%chance = getrandom(1,4);
if(%chance <= 2){
%nv2 = (getword(%vec, 0) * -1);
%nv1 = getword(%vec, 1);
%vec = %nv1@" "@%nv2@" 0";
}else{
%nv2 = getword(%vec, 0);
%nv1 = (getword(%vec, 1) * -1);
%vec = %nv1@" "@%nv2@" 0";
}
%result = containerRayCast(vectoradd(%pos,"0 0 10"), vectoradd(%pos,%vec), $TypeMasks::StaticShapeObjectType | $TypeMasks::InteriorObjectType | $TypeMasks::ForceFieldObjectType | $TypeMasks::TerrainObjectType, 0);
if(!(%result)){
%rndvec = getRandom(1, 10)@" "@getRandom(1, 10)@" "@((getRandom() * 5) + 4);
%newvec = vectoradd(%vec,%rndvec);
%newvec = vectoradd(%pos,%newvec);
%p = new TracerProjectile()
{
dataBlock = napalmSubExplosion;
initialDirection = "0 0 -1";
initialPosition = %newvec;
sourceObject = %source;
sourceSlot = 5;
};
%p.sourceobject = %source;
%p.vector = %vec;
%p.count = %count+1;
return;
}
}
%count2++;
schedule(2, 0, "NapalmFindNewDir", %pos, %vec, %source, %count, %count2);
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,206 @@
//**************************************************************
// WILDCAT GRAV CYCLE
//**************************************************************
//**************************************************************
// SOUNDS
//**************************************************************
datablock AudioProfile(ScoutSqueelSound)
{
filename = "fx/vehicles/outrider_skid.wav";
description = ClosestLooping3d;
preload = true;
};
// Scout
datablock AudioProfile(ScoutEngineSound)
{
filename = "fx/vehicles/outrider_engine.wav";
description = AudioDefaultLooping3d;
preload = true;
};
datablock AudioProfile(ScoutThrustSound)
{
filename = "fx/vehicles/outrider_boost.wav";
description = AudioDefaultLooping3d;
preload = true;
};
//**************************************************************
// LIGHTS
//**************************************************************
datablock RunningLightData(WildcatLight1)
{
radius = 1.0;
color = "1.0 1.0 1.0 0.3";
nodeName = "Headlight_node01";
direction = "-1.0 1.0 0.0";
texture = "special/headlight4";
};
datablock RunningLightData(WildcatLight2)
{
radius = 1.0;
color = "1.0 1.0 1.0 0.3";
nodeName = "Headlight_node02";
direction = "1.0 1.0 0.0";
texture = "special/headlight4";
};
datablock RunningLightData(WildcatLight3)
{
type = 2;
radius = 100.0;
color = "1.0 1.0 1.0 1.0";
offset = "0.0 0.0 0.0";
direction = "0.0 1.0 0.0";
texture = "special/projheadlight";
};
//**************************************************************
// VEHICLE CHARACTERISTICS
//**************************************************************
datablock HoverVehicleData(ScoutVehicle) : WildcatDamageProfile
{
spawnOffset = "0 0 1";
canControl = true;
floatingGravMag = 3.5;
catagory = "Vehicles";
shapeFile = "vehicle_grav_scout.dts";
computeCRC = true;
debrisShapeName = "vehicle_grav_scout_debris.dts";
debris = ShapeDebris;
renderWhenDestroyed = false;
drag = 0.0;
density = 0.9;
mountPose[0] = scoutRoot;
cameraMaxDist = 5.0;
cameraOffset = 0.7;
cameraLag = 0.5;
numMountPoints = 1;
isProtectedMountPoint[0] = true;
explosion = VehicleExplosion;
explosionDamage = 0.5;
explosionRadius = 5.0;
lightOnly = 1;
maxDamage = 0.60;
destroyedLevel = 0.60;
isShielded = true;
rechargeRate = 0.7;
energyPerDamagePoint = 75;
maxEnergy = 150;
minJetEnergy = 15;
jetEnergyDrain = 1.3;
// Rigid Body
mass = 400;
bodyFriction = 0.1;
bodyRestitution = 0.5;
softImpactSpeed = 20; // Play SoftImpact Sound
hardImpactSpeed = 28; // Play HardImpact Sound
// Ground Impact Damage (uses DamageType::Ground)
minImpactSpeed = 29;
speedDamageScale = 0.010;
// Object Impact Damage (uses DamageType::Impact)
collDamageThresholdVel = 23;
collDamageMultiplier = 0.030;
dragForce = 25 / 45.0;
vertFactor = 0.0;
floatingThrustFactor = 0.35;
mainThrustForce = 30;
reverseThrustForce = 10;
strafeThrustForce = 8;
turboFactor = 1.5;
brakingForce = 25;
brakingActivationSpeed = 4;
stabLenMin = 2.25;
stabLenMax = 3.75;
stabSpringConstant = 30;
stabDampingConstant = 16;
gyroDrag = 16;
normalForce = 30;
restorativeForce = 20;
steeringForce = 30;
rollForce = 15;
pitchForce = 7;
dustEmitter = VehicleLiftoffDustEmitter;
triggerDustHeight = 2.5;
dustHeight = 1.0;
dustTrailEmitter = TireEmitter;
dustTrailOffset = "0.0 -1.0 0.5";
triggerTrailHeight = 3.6;
dustTrailFreqMod = 15.0;
jetSound = ScoutSqueelSound;
engineSound = ScoutEngineSound;
floatSound = ScoutThrustSound;
softImpactSound = GravSoftImpactSound;
hardImpactSound = HardImpactSound;
//wheelImpactSound = WheelImpactSound;
//
softSplashSoundVelocity = 10.0;
mediumSplashSoundVelocity = 20.0;
hardSplashSoundVelocity = 30.0;
exitSplashSoundVelocity = 10.0;
exitingWater = VehicleExitWaterSoftSound;
impactWaterEasy = VehicleImpactWaterSoftSound;
impactWaterMedium = VehicleImpactWaterSoftSound;
impactWaterHard = VehicleImpactWaterMediumSound;
waterWakeSound = VehicleWakeSoftSplashSound;
minMountDist = 4;
damageEmitter[0] = SmallLightDamageSmoke;
damageEmitter[1] = SmallHeavyDamageSmoke;
damageEmitter[2] = DamageBubbles;
damageEmitterOffset[0] = "0.0 -1.5 0.5 ";
damageLevelTolerance[0] = 0.3;
damageLevelTolerance[1] = 0.7;
numDmgEmitterAreas = 1;
splashEmitter[0] = VehicleFoamDropletsEmitter;
splashEmitter[1] = VehicleFoamEmitter;
shieldImpact = VehicleShieldImpact;
forwardJetEmitter = WildcatJetEmitter;
cmdCategory = Tactical;
cmdIcon = CMDHoverScoutIcon;
cmdMiniIconName = "commander/MiniIcons/com_landscout_grey";
targetNameTag = 'WildCat';
targetTypeTag = 'Grav Cycle';
sensorData = VehiclePulseSensor;
checkRadius = 1.7785;
observeParameters = "1 10 10";
runningLight[0] = WildcatLight1;
runningLight[1] = WildcatLight2;
runningLight[2] = WildcatLight3;
shieldEffectScale = "0.9375 1.125 0.6";
};
//**************************************************************
// WEAPONS
//**************************************************************