mirror of
https://github.com/haydenmc/Krypton.git
synced 2026-07-13 23:44:36 +00:00
Initial commit of Krypton Construction Mod for Tribes 2.
This commit is contained in:
commit
846a7a73ea
179 changed files with 109631 additions and 0 deletions
232
Construction/scripts/turrets/chaingunBarrelLarge.cs
Normal file
232
Construction/scripts/turrets/chaingunBarrelLarge.cs
Normal file
|
|
@ -0,0 +1,232 @@
|
|||
//--------------------------------------------------------------------------
|
||||
// Chaingun Turret
|
||||
//
|
||||
// Tip for players: 2-3 of these can chew up light to medium armors in an instant.
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
|
||||
datablock ParticleData(ChaingunBarrelSparks) // This sets sparks flying when the bullet projectiles hit anything.
|
||||
{
|
||||
dragCoefficient = 1;
|
||||
gravityCoefficient = 0.0;
|
||||
inheritedVelFactor = 0.2;
|
||||
constantAcceleration = 0.0;
|
||||
lifetimeMS = 300;
|
||||
lifetimeVarianceMS = 0;
|
||||
textureName = "special/spark00";
|
||||
colors[0] = 211.0/255.0 @ " " @ 215.0/255.0 @ " " @ 120.0/255.0 @ " 0.75";
|
||||
colors[1] = 211.0/255.0 @ " " @ 215.0/255.0 @ " " @ 120.0/255.0 @ " 0.75";
|
||||
colors[2] = 211.0/255.0 @ " " @ 215.0/255.0 @ " " @ 120.0/255.0 @ " 0.75";
|
||||
sizes[0] = 1.2;
|
||||
sizes[1] = 0.4;
|
||||
sizes[2] = 0.1;
|
||||
times[0] = 0.0;
|
||||
times[1] = 0.2;
|
||||
times[2] = 1.0;
|
||||
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(ChaingunBarrelSparkEmitter)
|
||||
{
|
||||
ejectionPeriodMS = 4;
|
||||
periodVarianceMS = 0;
|
||||
ejectionVelocity = 6;
|
||||
velocityVariance = 4.0;
|
||||
ejectionOffset = 0.0;
|
||||
thetaMin = 0;
|
||||
thetaMax = 50;
|
||||
phiReferenceVel = 0;
|
||||
phiVariance = 360;
|
||||
overrideAdvances = false;
|
||||
orientParticles = true;
|
||||
lifetimeMS = 100;
|
||||
particles = "ChaingunBarrelSparks";
|
||||
};
|
||||
|
||||
|
||||
datablock ExplosionData(ChaingunBarrelExplosion)
|
||||
{
|
||||
soundProfile = ChaingunImpact;
|
||||
|
||||
//emitter[0] = ChaingunBarrelImpactSmoke;
|
||||
emitter[0] = ChaingunBarrelSparkEmitter;
|
||||
|
||||
faceViewer = false;
|
||||
};
|
||||
|
||||
//---------------------------
|
||||
|
||||
datablock ExplosionData(ChaingunBarrelBoltExplosion)
|
||||
{
|
||||
soundProfile = PlasmaBarrelExpSound;
|
||||
particleEmitter = PlasmaBarrelExplosionEmitter;
|
||||
particleDensity = 100;
|
||||
particleRadius = 0.6;
|
||||
faceViewer = true;
|
||||
|
||||
emitter[0] = PlasmaBarrelCrescentEmitter;
|
||||
|
||||
subExplosion[0] = PlasmaBarrelSubExplosion1;
|
||||
subExplosion[1] = PlasmaBarrelSubExplosion2;
|
||||
subExplosion[2] = PlasmaBarrelSubExplosion3;
|
||||
|
||||
shakeCamera = true;
|
||||
camShakeFreq = "10.0 9.0 9.0";
|
||||
camShakeAmp = "1.0 1.0 1.0";
|
||||
camShakeDuration = 0.1;
|
||||
camShakeRadius = 5.0;
|
||||
};
|
||||
//--------------------------------------------------------------------------
|
||||
// Projectile
|
||||
//--------------------------------------
|
||||
|
||||
datablock TracerProjectileData(ChaingunTurretBullet)
|
||||
{
|
||||
doDynamicClientHits = true;
|
||||
|
||||
directDamage = 0.05;
|
||||
directDamageType = $DamageType::Bullet;
|
||||
explosion = "ChaingunBarrelExplosion";
|
||||
splash = ChaingunBarrelSplash;
|
||||
|
||||
kickBackStrength = 0.0;
|
||||
sound = ChaingunProjectile;
|
||||
|
||||
dryVelocity = 560; //g=425.0;
|
||||
wetVelocity = 100.0;
|
||||
velInheritFactor = 1.0;
|
||||
fizzleTimeMS = 3000;
|
||||
lifetimeMS = 3000;
|
||||
explodeOnDeath = false;
|
||||
reflectOnWaterImpactAngle = 0.0;
|
||||
explodeOnWaterImpact = false;
|
||||
deflectionOnWaterImpact = 0.0;
|
||||
fizzleUnderwaterMS = 3000;
|
||||
|
||||
|
||||
tracerLength = 75.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.055; //v2 0.10;
|
||||
crossSize = 0.1; //v2 0.20;
|
||||
crossViewAng = 0.990;
|
||||
renderCross = true;
|
||||
};
|
||||
|
||||
datablock ShockwaveData(ChaingunTurretMuzzleFlash) // Since I don`t make custom skins, this is a muzzle flash, rendered in real-time, in 3d from within the game.
|
||||
{
|
||||
width = 0.5;
|
||||
numSegments = 13;
|
||||
numVertSegments = 1;
|
||||
velocity = 2.0;
|
||||
acceleration = -1.0;
|
||||
lifetimeMS = 300;
|
||||
height = 0.1;
|
||||
verticalCurve = 0.5;
|
||||
|
||||
mapToTerrain = false;
|
||||
renderBottom = false;
|
||||
orientToNormal = true;
|
||||
renderSquare = true;
|
||||
|
||||
texture[0] = "special/tracer00";
|
||||
texture[1] = "special/tracercross";
|
||||
texWrap = 3.0;
|
||||
|
||||
times[0] = 0.0;
|
||||
times[1] = 0.5;
|
||||
times[2] = 1.0;
|
||||
|
||||
colors[0] = 211.0/255.0 @ " " @ 215.0/255.0 @ " " @ 120.0/255.0 @ "0.75";
|
||||
colors[1] = 211.0/255.0 @ " " @ 215.0/255.0 @ " " @ 120.0/255.0 @ "0.75";
|
||||
colors[2] = 211.0/255.0 @ " " @ 215.0/255.0 @ " " @ 120.0/255.0 @ "0.75";
|
||||
};
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Heavy Chaingun Turret Image
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
datablock TurretImageData(ChaingunBarrelLarge)
|
||||
{
|
||||
shapeFile = "turret_fusion_large.dts";
|
||||
item = ChaingunBarrelLargePack;
|
||||
|
||||
projectile = ChaingunTurretBullet;
|
||||
projectileType = TracerProjectile;
|
||||
usesEnergy = true;
|
||||
fireEnergy = 0;
|
||||
minEnergy = 1;
|
||||
emap = true;
|
||||
|
||||
projectileSpread = 3.0 / 1000.0; // The less spread, the more accurate.
|
||||
|
||||
muzzleFlash = ChaingunTurretMuzzleFlash;
|
||||
|
||||
// Turret parameters
|
||||
activationMS = 300;
|
||||
deactivateDelayMS = 600;
|
||||
thinkTimeMS = 200;
|
||||
degPerSecTheta = 580;
|
||||
degPerSecPhi = 960;
|
||||
attackRadius = 170;
|
||||
|
||||
// State transitions
|
||||
stateName[0] = "Activate";
|
||||
stateTransitionOnNotLoaded[0] = "Dead";
|
||||
stateTransitionOnLoaded[0] = "ActivateReady";
|
||||
|
||||
stateName[1] = "ActivateReady";
|
||||
stateSequence[1] = "Activate";
|
||||
stateSound[1] = ChaingunSwitchSound;
|
||||
stateTimeoutValue[1] = 1;
|
||||
stateTransitionOnTimeout[1] = "Ready";
|
||||
stateTransitionOnNotLoaded[1] = "Deactivate";
|
||||
stateTransitionOnNoAmmo[1] = "NoAmmo";
|
||||
|
||||
stateName[2] = "Ready";
|
||||
stateTransitionOnNotLoaded[2] = "Deactivate";
|
||||
stateTransitionOnTriggerDown[2] = "Fire";
|
||||
stateTransitionOnNoAmmo[2] = "NoAmmo";
|
||||
|
||||
// fire off about 2 quick shots
|
||||
stateName[3] = "Fire";
|
||||
stateFire[3] = true;
|
||||
stateAllowImageChange[3] = false;
|
||||
stateSequence[3] = "Fire";
|
||||
stateSound[3] = ChaingunFireSound;
|
||||
stateScript[3] = "onFire";
|
||||
stateTimeoutValue[3] = 0.06; //0.3
|
||||
stateTransitionOnTimeout[3] = "Fire";
|
||||
stateTransitionOnTriggerUp[3] = "Ready";
|
||||
// stateTransitionOnTriggerUp[3] = "Reload";
|
||||
stateTransitionOnNoAmmo[3] = "NoAmmo";
|
||||
|
||||
stateName[8] = "Reload";
|
||||
stateTimeoutValue[7] = 1.0;
|
||||
stateAllowImageChange[8] = false;
|
||||
stateSequence[8] = "Reload";
|
||||
stateTransitionOnTimeout[8] = "Ready";
|
||||
stateTransitionOnNotLoaded[8] = "Deactivate";
|
||||
stateTransitionOnNoAmmo[8] = "NoAmmo";
|
||||
|
||||
stateName[9] = "Deactivate";
|
||||
stateSequence[9] = "Activate";
|
||||
stateDirection[9] = false;
|
||||
stateTimeoutValue[9] = 1;
|
||||
stateTransitionOnLoaded[9] = "ActivateReady";
|
||||
stateTransitionOnTimeout[9] = "Dead";
|
||||
|
||||
stateName[10] = "Dead";
|
||||
stateTransitionOnLoaded[10] = "ActivateReady";
|
||||
|
||||
stateName[11] = "NoAmmo";
|
||||
stateTransitionOnAmmo[11] = "Reload";
|
||||
stateSequence[11] = "NoAmmo";
|
||||
};
|
||||
342
Construction/scripts/turrets/indoorDeployableBarrel.cs
Normal file
342
Construction/scripts/turrets/indoorDeployableBarrel.cs
Normal file
|
|
@ -0,0 +1,342 @@
|
|||
datablock EffectProfile(IBLSwitchEffect)
|
||||
{
|
||||
effectname = "powered/turret_light_activate";
|
||||
minDistance = 5.0;
|
||||
maxDistance = 5.0;
|
||||
};
|
||||
|
||||
datablock EffectProfile(IBLFireEffect)
|
||||
{
|
||||
effectname = "powered/turret_indoor_fire";
|
||||
minDistance = 2.5;
|
||||
maxDistance = 5.0;
|
||||
};
|
||||
|
||||
datablock AudioProfile(IBLSwitchSound)
|
||||
{
|
||||
filename = "fx/powered/turret_light_activate.wav";
|
||||
description = AudioClose3d;
|
||||
preload = true;
|
||||
effect = IBLSwitchEffect;
|
||||
};
|
||||
|
||||
datablock AudioProfile(IBLFireSound)
|
||||
{
|
||||
filename = "fx/powered/turret_indoor_fire.wav";
|
||||
description = AudioDefault3d;
|
||||
preload = true;
|
||||
effect = IBLFireEffect;
|
||||
};
|
||||
|
||||
datablock SensorData(DeployedIndoorTurretSensor)
|
||||
{
|
||||
detects = true;
|
||||
detectsUsingLOS = true;
|
||||
detectsPassiveJammed = false;
|
||||
detectsActiveJammed = false;
|
||||
detectsCloaked = false;
|
||||
detectionPings = true;
|
||||
detectRadius = 40;
|
||||
};
|
||||
|
||||
datablock ShockwaveData(IndoorTurretMuzzleFlash)
|
||||
{
|
||||
width = 0.5;
|
||||
numSegments = 13;
|
||||
numVertSegments = 1;
|
||||
velocity = 2.0;
|
||||
acceleration = -1.0;
|
||||
lifetimeMS = 300;
|
||||
height = 0.1;
|
||||
verticalCurve = 0.5;
|
||||
|
||||
mapToTerrain = false;
|
||||
renderBottom = false;
|
||||
orientToNormal = true;
|
||||
renderSquare = true;
|
||||
|
||||
texture[0] = "special/blasterHit";
|
||||
texture[1] = "special/gradient";
|
||||
texWrap = 3.0;
|
||||
|
||||
times[0] = 0.0;
|
||||
times[1] = 0.5;
|
||||
times[2] = 1.0;
|
||||
|
||||
colors[0] = "1.0 0.3 0.3 1.0";
|
||||
colors[1] = "1.0 0.3 0.3 1.0";
|
||||
colors[2] = "1.0 0.3 0.3 0.0";
|
||||
};
|
||||
|
||||
datablock TurretData(TurretDeployedFloorIndoor) : TurretDamageProfile
|
||||
{
|
||||
className = DeployedTurret;
|
||||
shapeFile = "turret_indoor_deployf.dts";
|
||||
|
||||
mass = 5.0;
|
||||
maxDamage = 0.5;
|
||||
destroyedLevel = 0.5;
|
||||
disabledLevel = 0.21;
|
||||
explosion = SmallTurretExplosion;
|
||||
expDmgRadius = 5.0;
|
||||
expDamage = 0.25;
|
||||
expImpulse = 500.0;
|
||||
repairRate = 0;
|
||||
heatSignature = 0.0;
|
||||
|
||||
deployedObject = true;
|
||||
|
||||
thetaMin = 5;
|
||||
thetaMax = 145;
|
||||
thetaNull = 90;
|
||||
|
||||
primaryAxis = zaxis;
|
||||
|
||||
isShielded = true;
|
||||
energyPerDamagePoint = 110;
|
||||
maxEnergy = 30;
|
||||
rechargeRate = 0.10;
|
||||
barrel = DeployableIndoorBarrel;
|
||||
|
||||
canControl = true;
|
||||
cmdCategory = "DTactical";
|
||||
cmdIcon = CMDTurretIcon;
|
||||
cmdMiniIconName = "commander/MiniIcons/com_turret_grey";
|
||||
targetNameTag = 'Spider Clamp';
|
||||
targetTypeTag = 'Turret';
|
||||
sensorData = DeployedIndoorTurretSensor;
|
||||
sensorRadius = DeployedIndoorTurretSensor.detectRadius;
|
||||
sensorColor = "191 0 226";
|
||||
|
||||
firstPersonOnly = true;
|
||||
renderWhenDestroyed = true;
|
||||
|
||||
debrisShapeName = "debris_generic_small.dts";
|
||||
debris = TurretDebrisSmall;
|
||||
};
|
||||
|
||||
datablock TurretData(TurretDeployedWallIndoor) : TurretDamageProfile
|
||||
{
|
||||
className = DeployedTurret;
|
||||
shapeFile = "turret_indoor_deployw.dts";
|
||||
|
||||
mass = 5.0;
|
||||
maxDamage = 0.5;
|
||||
destroyedLevel = 0.5;
|
||||
disabledLevel = 0.21;
|
||||
explosion = SmallTurretExplosion;
|
||||
expDmgRadius = 5.0;
|
||||
expDamage = 0.25;
|
||||
expImpulse = 500.0;
|
||||
repairRate = 0;
|
||||
heatSignature = 0.0;
|
||||
|
||||
thetaMin = 5;
|
||||
thetaMax = 145;
|
||||
thetaNull = 90;
|
||||
|
||||
deployedObject = true;
|
||||
|
||||
primaryAxis = yaxis;
|
||||
|
||||
isShielded = true;
|
||||
energyPerDamagePoint = 110;
|
||||
maxEnergy = 30;
|
||||
rechargeRate = 0.10;
|
||||
barrel = DeployableIndoorBarrel;
|
||||
|
||||
canControl = true;
|
||||
cmdCategory = "DTactical";
|
||||
cmdIcon = CMDTurretIcon;
|
||||
cmdMiniIconName = "commander/MiniIcons/com_turret_grey";
|
||||
targetNameTag = 'Spider Clamp';
|
||||
targetTypeTag = 'Turret';
|
||||
sensorData = DeployedIndoorTurretSensor;
|
||||
sensorRadius = DeployedIndoorTurretSensor.detectRadius;
|
||||
sensorColor = "191 0 226";
|
||||
|
||||
firstPersonOnly = true;
|
||||
renderWhenDestroyed = true;
|
||||
|
||||
debrisShapeName = "debris_generic_small.dts";
|
||||
debris = TurretDebrisSmall;
|
||||
};
|
||||
|
||||
datablock TurretData(TurretDeployedCeilingIndoor) : TurretDamageProfile
|
||||
{
|
||||
className = DeployedTurret;
|
||||
shapeFile = "turret_indoor_deployc.dts";
|
||||
|
||||
mass = 5.0;
|
||||
maxDamage = 0.5;
|
||||
destroyedLevel = 0.5;
|
||||
disabledLevel = 0.21;
|
||||
explosion = SmallTurretExplosion;
|
||||
expDmgRadius = 5.0;
|
||||
expDamage = 0.25;
|
||||
expImpulse = 500.0;
|
||||
repairRate = 0;
|
||||
explosion = SmallTurretExplosion;
|
||||
|
||||
//thetaMin = 5;
|
||||
//thetaMax = 145;
|
||||
thetaMin = 35;
|
||||
thetaMax = 175;
|
||||
thetaNull = 90;
|
||||
heatSignature = 0.0;
|
||||
|
||||
deployedObject = true;
|
||||
|
||||
primaryAxis = revzaxis;
|
||||
|
||||
isShielded = true;
|
||||
energyPerDamagePoint = 110;
|
||||
maxEnergy = 30;
|
||||
rechargeRate = 0.10;
|
||||
barrel = DeployableIndoorBarrel;
|
||||
|
||||
canControl = true;
|
||||
cmdCategory = "DTactical";
|
||||
cmdIcon = CMDTurretIcon;
|
||||
cmdMiniIconName = "commander/MiniIcons/com_turret_grey";
|
||||
targetNameTag = 'Spider Clamp';
|
||||
targetTypeTag = 'Turret';
|
||||
sensorData = DeployedIndoorTurretSensor;
|
||||
sensorRadius = DeployedIndoorTurretSensor.detectRadius;
|
||||
sensorColor = "191 0 226";
|
||||
|
||||
firstPersonOnly = true;
|
||||
renderWhenDestroyed = true;
|
||||
|
||||
debrisShapeName = "debris_generic_small.dts";
|
||||
debris = TurretDebrisSmall;
|
||||
};
|
||||
|
||||
datablock LinearFlareProjectileData(IndoorTurretBolt)
|
||||
{
|
||||
directDamage = 0.14;
|
||||
directDamageType = $DamageType::IndoorDepTurret;
|
||||
explosion = "BlasterExplosion";
|
||||
kickBackStrength = 0.0;
|
||||
|
||||
dryVelocity = 120.0;
|
||||
wetVelocity = 40.0;
|
||||
velInheritFactor = 0.5;
|
||||
fizzleTimeMS = 2000;
|
||||
lifetimeMS = 3000;
|
||||
explodeOnDeath = false;
|
||||
reflectOnWaterImpactAngle = 0.0;
|
||||
explodeOnWaterImpact = false;
|
||||
deflectionOnWaterImpact = 0.0;
|
||||
fizzleUnderwaterMS = 3000;
|
||||
|
||||
numFlares = 20;
|
||||
size = 0.45;
|
||||
flareColor = "1 0.35 0.35";
|
||||
flareModTexture = "flaremod";
|
||||
flareBaseTexture = "flarebase";
|
||||
|
||||
sound = BlasterProjectileSound;
|
||||
|
||||
hasLight = true;
|
||||
lightRadius = 3.0;
|
||||
lightColor = "1 0.35 0.35";
|
||||
};
|
||||
|
||||
datablock TurretImageData(DeployableIndoorBarrel)
|
||||
{
|
||||
shapeFile = "turret_muzzlepoint.dts";
|
||||
// ---------------------------------------------
|
||||
// z0dd - ZOD, 5/8/02. Incorrect parameter value
|
||||
//item = IndoorTurretBarrel;
|
||||
item = TurretIndoorDeployable;
|
||||
|
||||
projectile = IndoorTurretBolt;
|
||||
projectileType = LinearFlareProjectile;
|
||||
|
||||
usesEnergy = true;
|
||||
fireEnergy = 4.5;
|
||||
minEnergy = 4.5;
|
||||
|
||||
lightType = "WeaponFireLight";
|
||||
lightColor = "0.25 0.15 0.15 1.0";
|
||||
lightTime = "1000";
|
||||
lightRadius = "2";
|
||||
|
||||
muzzleFlash = IndoorTurretMuzzleFlash;
|
||||
|
||||
// Turret parameters
|
||||
activationMS = 150;
|
||||
deactivateDelayMS = 300;
|
||||
thinkTimeMS = 150;
|
||||
degPerSecTheta = 580;
|
||||
degPerSecPhi = 960;
|
||||
attackRadius = 60;
|
||||
|
||||
// State transitions
|
||||
stateName[0] = "Activate";
|
||||
stateTransitionOnNotLoaded[0] = "Dead";
|
||||
stateTransitionOnLoaded[0] = "ActivateReady";
|
||||
|
||||
stateName[1] = "ActivateReady";
|
||||
stateSequence[1] = "Activate";
|
||||
stateSound[1] = IBLSwitchSound;
|
||||
stateTimeoutValue[1] = 1;
|
||||
stateTransitionOnTimeout[1] = "Ready";
|
||||
stateTransitionOnNotLoaded[1] = "Deactivate";
|
||||
stateTransitionOnNoAmmo[1] = "NoAmmo";
|
||||
|
||||
stateName[2] = "Ready";
|
||||
stateTransitionOnNotLoaded[2] = "Deactivate";
|
||||
stateTransitionOnTriggerDown[2] = "Fire";
|
||||
stateTransitionOnNoAmmo[2] = "NoAmmo";
|
||||
|
||||
stateName[3] = "Fire";
|
||||
stateTransitionOnTimeout[3] = "Reload";
|
||||
stateTimeoutValue[3] = 0.3;
|
||||
stateFire[3] = true;
|
||||
stateShockwave[3] = true;
|
||||
stateRecoil[3] = LightRecoil;
|
||||
stateAllowImageChange[3] = false;
|
||||
stateSequence[3] = "Fire";
|
||||
stateSound[3] = IBLFireSound;
|
||||
stateScript[3] = "onFire";
|
||||
|
||||
stateName[4] = "Reload";
|
||||
stateTimeoutValue[4] = 0.8;
|
||||
stateAllowImageChange[4] = false;
|
||||
stateSequence[4] = "Reload";
|
||||
stateTransitionOnTimeout[4] = "Ready";
|
||||
stateTransitionOnNotLoaded[4] = "Deactivate";
|
||||
stateTransitionOnNoAmmo[4] = "NoAmmo";
|
||||
|
||||
stateName[5] = "Deactivate";
|
||||
stateSequence[5] = "Activate";
|
||||
stateDirection[5] = false;
|
||||
stateTimeoutValue[5] = 1;
|
||||
stateTransitionOnLoaded[5] = "ActivateReady";
|
||||
stateTransitionOnTimeout[5] = "Dead";
|
||||
|
||||
stateName[6] = "Dead";
|
||||
stateTransitionOnLoaded[6] = "ActivateReady";
|
||||
|
||||
stateName[7] = "NoAmmo";
|
||||
stateTransitionOnAmmo[7] = "Reload";
|
||||
stateSequence[7] = "NoAmmo";
|
||||
};
|
||||
|
||||
function TurretIndoorDeployableImage::onDeploy(%item, %plyr, %slot)
|
||||
{
|
||||
%deplObj = Parent::onDeploy(%item, %plyr, %slot);
|
||||
|
||||
%deplObj.firemode = %plyr.packSet; //Targeting modes.
|
||||
}
|
||||
|
||||
function TurretIndoorDeployableImage::onMount(%data, %obj, %node) {
|
||||
%obj.hasBaseTurret = true;
|
||||
%obj.packSet = 0;
|
||||
}
|
||||
function TurretIndoorDeployableImage::onUnmount(%data, %obj, %node) {
|
||||
%obj.hasBaseTurret = "";
|
||||
%obj.packSet = 0;
|
||||
}
|
||||
269
Construction/scripts/turrets/outdoorDeployableBarrel.cs
Normal file
269
Construction/scripts/turrets/outdoorDeployableBarrel.cs
Normal file
|
|
@ -0,0 +1,269 @@
|
|||
// --------------------------------------------------------------
|
||||
// Outdoor Deployable Turret barrel
|
||||
// --------------------------------------------------------------
|
||||
|
||||
// --------------------------------------------------------------
|
||||
// Sound datablocks
|
||||
// --------------------------------------------------------------
|
||||
datablock EffectProfile(OBLSwitchEffect)
|
||||
{
|
||||
effectname = "powered/turret_light_activate";
|
||||
minDistance = 2.5;
|
||||
maxDistance = 5.0;
|
||||
};
|
||||
|
||||
datablock EffectProfile(OBLFireEffect)
|
||||
{
|
||||
effectname = "powered/turret_outdoor_fire";
|
||||
minDistance = 2.5;
|
||||
maxDistance = 5.0;
|
||||
};
|
||||
|
||||
datablock AudioProfile(OBLSwitchSound)
|
||||
{
|
||||
filename = "fx/powered/turret_light_activate.wav";
|
||||
description = AudioClose3d;
|
||||
preload = true;
|
||||
effect = OBLSwitchEffect;
|
||||
};
|
||||
|
||||
datablock AudioProfile(OBLFireSound)
|
||||
{
|
||||
filename = "fx/powered/turret_outdoor_fire.wav";
|
||||
description = AudioDefault3d;
|
||||
preload = true;
|
||||
effect = OBLFireEffect;
|
||||
};
|
||||
|
||||
// --------------------------------------------------------------
|
||||
// Projectile data
|
||||
// --------------------------------------------------------------
|
||||
|
||||
datablock TracerProjectileData(FusionBolt)
|
||||
{
|
||||
doDynamicClientHits = true;
|
||||
|
||||
projectileShapeName = "";
|
||||
directDamage = 0.0;
|
||||
directDamageType = $DamageType::OutdoorDepTurret;
|
||||
hasDamageRadius = true;
|
||||
indirectDamage = 0.24;
|
||||
damageRadius = 4.0;
|
||||
kickBackStrength = 0.0;
|
||||
radiusDamageType = $DamageType::OutdoorDepTurret;
|
||||
sound = BlasterProjectileSound;
|
||||
explosion = PlasmaBoltExplosion;
|
||||
|
||||
dryVelocity = 60.0;
|
||||
wetVelocity = 40.0;
|
||||
velInheritFactor = 1.0;
|
||||
fizzleTimeMS = 4000;
|
||||
lifetimeMS = 6000;
|
||||
explodeOnDeath = false;
|
||||
reflectOnWaterImpactAngle = 0.0;
|
||||
explodeOnWaterImpact = true;
|
||||
deflectionOnWaterImpact = 0.0;
|
||||
fizzleUnderwaterMS = -1;
|
||||
|
||||
activateDelayMS = 100;
|
||||
|
||||
tracerLength = 5;
|
||||
tracerAlpha = false;
|
||||
tracerMinPixels = 3;
|
||||
tracerColor = "1 0 0 1";
|
||||
tracerTex[0] = "special/landSpikeBolt";
|
||||
tracerTex[1] = "special/landSpikeBoltCross";
|
||||
tracerWidth = 0.35;
|
||||
crossSize = 0.79;
|
||||
crossViewAng = 0.990;
|
||||
renderCross = true;
|
||||
emap = true;
|
||||
};
|
||||
|
||||
// --------------------------------------------------------------
|
||||
|
||||
datablock SensorData(DeployedOutdoorTurretSensor)
|
||||
{
|
||||
detects = true;
|
||||
detectsUsingLOS = true;
|
||||
detectsPassiveJammed = false;
|
||||
detectsActiveJammed = false;
|
||||
detectsCloaked = false;
|
||||
detectionPings = true;
|
||||
detectRadius = 60;
|
||||
};
|
||||
|
||||
datablock ShockwaveData(OutdoorTurretMuzzleFlash)
|
||||
{
|
||||
width = 0.5;
|
||||
numSegments = 13;
|
||||
numVertSegments = 1;
|
||||
velocity = 2.0;
|
||||
acceleration = -1.0;
|
||||
lifetimeMS = 300;
|
||||
height = 0.1;
|
||||
verticalCurve = 0.5;
|
||||
|
||||
mapToTerrain = false;
|
||||
renderBottom = false;
|
||||
orientToNormal = true;
|
||||
renderSquare = true;
|
||||
|
||||
texture[0] = "special/blasterHit";
|
||||
texture[1] = "special/gradient";
|
||||
texWrap = 3.0;
|
||||
|
||||
times[0] = 0.0;
|
||||
times[1] = 0.5;
|
||||
times[2] = 1.0;
|
||||
|
||||
colors[0] = "1.0 0.8 0.5 1.0";
|
||||
colors[1] = "1.0 0.8 0.5 1.0";
|
||||
colors[2] = "1.0 0.8 0.5 0.0";
|
||||
};
|
||||
|
||||
datablock TurretData(TurretDeployedOutdoor) : TurretDamageProfile
|
||||
{
|
||||
className = DeployedTurret;
|
||||
shapeFile = "turret_outdoor_deploy.dts";
|
||||
|
||||
rechargeRate = 0.15;
|
||||
|
||||
mass = 5.0;
|
||||
maxDamage = 0.80;
|
||||
destroyedLevel = 0.80;
|
||||
disabledLevel = 0.35;
|
||||
explosion = HandGrenadeExplosion;
|
||||
expDmgRadius = 5.0;
|
||||
expDamage = 0.3;
|
||||
expImpulse = 500.0;
|
||||
repairRate = 0;
|
||||
|
||||
deployedObject = true;
|
||||
|
||||
thetaMin = 0;
|
||||
thetaMax = 145;
|
||||
thetaNull = 90;
|
||||
|
||||
yawVariance = 30.0; // these will smooth out the elf tracking code.
|
||||
pitchVariance = 30.0; // more or less just tolerances
|
||||
|
||||
isShielded = true;
|
||||
energyPerDamagePoint = 110;
|
||||
maxEnergy = 60;
|
||||
renderWhenDestroyed = true;
|
||||
barrel = DeployableOutdoorBarrel;
|
||||
heatSignature = 0;
|
||||
|
||||
canControl = true;
|
||||
cmdCategory = "DTactical";
|
||||
cmdIcon = CMDTurretIcon;
|
||||
cmdMiniIconName = "commander/MiniIcons/com_turret_grey";
|
||||
targetNameTag = 'Landspike';
|
||||
targetTypeTag = 'Turret';
|
||||
sensorData = DeployedOutdoorTurretSensor;
|
||||
sensorRadius = DeployedOutdoorTurretSensor.detectRadius;
|
||||
sensorColor = "191 0 226";
|
||||
|
||||
firstPersonOnly = true;
|
||||
|
||||
debrisShapeName = "debris_generic_small.dts";
|
||||
debris = TurretDebrisSmall;
|
||||
};
|
||||
|
||||
datablock TurretImageData(DeployableOutdoorBarrel)
|
||||
{
|
||||
shapeFile = "turret_muzzlepoint.dts";
|
||||
// ---------------------------------------------
|
||||
// z0dd - ZOD, 5/8/02. Incorrect parameter value
|
||||
//item = OutdoorTurretBarrel;
|
||||
item = TurretOutdoorDeployable;
|
||||
|
||||
projectileType = TracerProjectile;
|
||||
projectile = FusionBolt;
|
||||
usesEnergy = true;
|
||||
fireEnergy = 11.0;
|
||||
minEnergy = 11.0;
|
||||
|
||||
lightType = "WeaponFireLight";
|
||||
lightColor = "0.25 0.25 0.15 0.2";
|
||||
lightTime = "1000";
|
||||
lightRadius = "2";
|
||||
|
||||
muzzleFlash = OutdoorTurretMuzzleFlash;
|
||||
|
||||
// Turret parameters
|
||||
activationMS = 300;
|
||||
deactivateDelayMS = 600;
|
||||
thinkTimeMS = 200;
|
||||
degPerSecTheta = 580;
|
||||
degPerSecPhi = 960;
|
||||
attackRadius = 100;
|
||||
|
||||
// State transitions
|
||||
stateName[0] = "Activate";
|
||||
stateTransitionOnNotLoaded[0] = "Dead";
|
||||
stateTransitionOnLoaded[0] = "ActivateReady";
|
||||
|
||||
stateName[1] = "ActivateReady";
|
||||
stateSequence[1] = "Activate";
|
||||
stateSound[1] = OBLSwitchSound;
|
||||
stateTimeoutValue[1] = 1;
|
||||
stateTransitionOnTimeout[1] = "Ready";
|
||||
stateTransitionOnNotLoaded[1] = "Deactivate";
|
||||
stateTransitionOnNoAmmo[1] = "NoAmmo";
|
||||
|
||||
stateName[2] = "Ready";
|
||||
stateTransitionOnNotLoaded[2] = "Deactivate";
|
||||
stateTransitionOnTriggerDown[2] = "Fire";
|
||||
stateTransitionOnNoAmmo[2] = "NoAmmo";
|
||||
|
||||
stateName[3] = "Fire";
|
||||
stateTransitionOnTimeout[3] = "Reload";
|
||||
stateTimeoutValue[3] = 0.3;
|
||||
stateFire[3] = true;
|
||||
stateShockwave[3] = true;
|
||||
stateRecoil[3] = LightRecoil;
|
||||
stateAllowImageChange[3] = false;
|
||||
stateSequence[3] = "Fire";
|
||||
stateSound[3] = OBLFireSound;
|
||||
stateScript[3] = "onFire";
|
||||
|
||||
stateName[4] = "Reload";
|
||||
stateTimeoutValue[4] = 1.2;
|
||||
stateAllowImageChange[4] = false;
|
||||
stateSequence[4] = "Reload";
|
||||
stateTransitionOnTimeout[4] = "Ready";
|
||||
stateTransitionOnNotLoaded[4] = "Deactivate";
|
||||
stateTransitionOnNoAmmo[4] = "NoAmmo";
|
||||
|
||||
stateName[5] = "Deactivate";
|
||||
stateSequence[5] = "Activate";
|
||||
stateDirection[5] = false;
|
||||
stateTimeoutValue[5] = 1;
|
||||
stateTransitionOnLoaded[5] = "ActivateReady";
|
||||
stateTransitionOnTimeout[5] = "Dead";
|
||||
|
||||
stateName[6] = "Dead";
|
||||
stateTransitionOnLoaded[6] = "ActivateReady";
|
||||
|
||||
stateName[7] = "NoAmmo";
|
||||
stateTransitionOnAmmo[7] = "Reload";
|
||||
stateSequence[7] = "NoAmmo";
|
||||
};
|
||||
|
||||
function TurretOutdoorDeployableImage::onDeploy(%item, %plyr, %slot)
|
||||
{
|
||||
%deplObj = Parent::onDeploy(%item, %plyr, %slot);
|
||||
|
||||
%deplObj.firemode = %plyr.packSet; //Targeting modes.
|
||||
}
|
||||
|
||||
function TurretOutdoorDeployableImage::onMount(%data, %obj, %node) {
|
||||
%obj.hasBaseTurret = true;
|
||||
%obj.packSet = 0;
|
||||
}
|
||||
function TurretOutdoorDeployableImage::onUnmount(%data, %obj, %node) {
|
||||
%obj.hasBaseTurret = "";
|
||||
%obj.packSet = 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue