2018-06-28 18:34:52 +00:00
|
|
|
// ------------------------------------------------------------------
|
|
|
|
|
// SENSOR JAMMER PACK
|
|
|
|
|
//
|
|
|
|
|
// When activated, the sensor jammer pack emits a sensor-jamming field of
|
|
|
|
|
// 20m radius. Any players within this field are completely invisible to
|
|
|
|
|
// all sensors, turrets and cameras.
|
|
|
|
|
//
|
|
|
|
|
// When not activated, the pack has no effect.
|
|
|
|
|
//
|
|
|
|
|
datablock EffectProfile(SensorJammerPackActivateEffect)
|
|
|
|
|
{
|
|
|
|
|
effectname = "packs/cloak_on";
|
|
|
|
|
minDistance = 2.5;
|
|
|
|
|
maxDistance = 2.5;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
datablock AudioProfile(SensorJammerActivateSound)
|
|
|
|
|
{
|
|
|
|
|
filename = "fx/packs/sensorjammerpack_on.wav";
|
|
|
|
|
description = ClosestLooping3d;
|
|
|
|
|
preload = true;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
datablock ShapeBaseImageData(SensorJammerPackImage)
|
|
|
|
|
{
|
|
|
|
|
shapeFile = "pack_upgrade_sensorjammer.dts";
|
|
|
|
|
item = SensorJammerPack;
|
|
|
|
|
mountPoint = 1;
|
|
|
|
|
offset = "0 0 0";
|
|
|
|
|
|
|
|
|
|
usesEnergy = true;
|
|
|
|
|
minEnergy = 3;
|
|
|
|
|
|
|
|
|
|
stateName[0] = "Idle";
|
|
|
|
|
stateTransitionOnTriggerDown[0] = "Activate";
|
2023-01-14 21:08:31 +00:00
|
|
|
|
2018-06-28 18:34:52 +00:00
|
|
|
stateName[1] = "Activate";
|
|
|
|
|
stateScript[1] = "onActivate";
|
|
|
|
|
stateSequence[1] = "fire";
|
|
|
|
|
stateSound[1] = SensorJammerActivateSound;
|
|
|
|
|
stateEnergyDrain[1] = 10.5;
|
|
|
|
|
stateTransitionOnTriggerUp[1] = "Deactivate";
|
|
|
|
|
stateTransitionOnNoAmmo[1] = "Deactivate";
|
|
|
|
|
|
|
|
|
|
stateName[2] = "Deactivate";
|
|
|
|
|
stateScript[2] = "onDeactivate";
|
|
|
|
|
stateTransitionOnTimeout[2] = "Idle";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
datablock ItemData(SensorJammerPack)
|
|
|
|
|
{
|
|
|
|
|
className = Pack;
|
|
|
|
|
catagory = "Packs";
|
|
|
|
|
shapeFile = "pack_upgrade_sensorjammer.dts";
|
|
|
|
|
mass = 1;
|
|
|
|
|
elasticity = 0.2;
|
|
|
|
|
friction = 0.6;
|
|
|
|
|
pickupRadius = 2;
|
|
|
|
|
rotate = true;
|
|
|
|
|
image = "SensorJammerPackImage";
|
|
|
|
|
pickUpName = "a sensor jammer pack";
|
|
|
|
|
|
|
|
|
|
computeCRC = true;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
2025-09-27 21:49:57 +00:00
|
|
|
datablock SensorData(JammerSensorObjectPassive)
|
2018-06-28 18:34:52 +00:00
|
|
|
{
|
|
|
|
|
// same detection info as 'PlayerObject' sensorData
|
|
|
|
|
detects = true;
|
|
|
|
|
detectsUsingLOS = true;
|
|
|
|
|
detectsPassiveJammed = true;
|
|
|
|
|
detectRadius = 2000;
|
|
|
|
|
detectionPings = false;
|
|
|
|
|
detectsFOVOnly = true;
|
|
|
|
|
detectFOVPercent = 1.3;
|
|
|
|
|
useObjectFOV = true;
|
2023-01-14 21:08:31 +00:00
|
|
|
|
2025-09-27 21:49:57 +00:00
|
|
|
//detectscloaked = 1; //v2
|
2023-01-14 21:08:31 +00:00
|
|
|
|
2018-06-28 18:34:52 +00:00
|
|
|
jams = true;
|
|
|
|
|
jamsOnlyGroup = true;
|
|
|
|
|
jamsUsingLOS = true;
|
|
|
|
|
jamRadius = 0;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
datablock SensorData(JammerSensorObjectActive)
|
|
|
|
|
{
|
|
|
|
|
// same detection info as 'PlayerObject' sensorData
|
|
|
|
|
detects = true;
|
|
|
|
|
detectsUsingLOS = true;
|
|
|
|
|
detectsPassiveJammed = true;
|
|
|
|
|
detectRadius = 2000;
|
|
|
|
|
detectionPings = false;
|
|
|
|
|
detectsFOVOnly = true;
|
|
|
|
|
detectFOVPercent = 1.3;
|
|
|
|
|
useObjectFOV = true;
|
2023-01-14 21:08:31 +00:00
|
|
|
|
2025-09-27 21:49:57 +00:00
|
|
|
//detectscloaked = 1; //v2
|
2023-01-14 21:08:31 +00:00
|
|
|
|
2018-06-28 18:34:52 +00:00
|
|
|
jams = true;
|
|
|
|
|
jamsOnlyGroup = true;
|
|
|
|
|
jamsUsingLOS = true;
|
2025-09-27 21:49:57 +00:00
|
|
|
jamRadius = 30;
|
2018-06-28 18:34:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
function SensorJammerPackImage::onMount(%data, %obj, %slot)
|
|
|
|
|
{
|
2025-09-27 21:49:57 +00:00
|
|
|
setTargetSensorData(%obj.client.target, JammerSensorObjectPassive);
|
2018-06-28 18:34:52 +00:00
|
|
|
}
|
|
|
|
|
|
2025-09-27 21:49:57 +00:00
|
|
|
function SensorJammerPackImage::onUnmount(%data, %obj, %slot)
|
2018-06-28 18:34:52 +00:00
|
|
|
{
|
|
|
|
|
setTargetSensorData(%obj.client.target, PlayerSensor);
|
2025-09-27 21:49:57 +00:00
|
|
|
%obj.setImageTrigger(%slot, false);
|
2018-06-28 18:34:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function SensorJammerPackImage::onActivate(%data, %obj, %slot)
|
|
|
|
|
{
|
|
|
|
|
messageClient(%obj.client, 'MsgSensorJammerPackOn', '\c2Sensor jammer pack on.');
|
|
|
|
|
setTargetSensorData(%obj.client.target, JammerSensorObjectActive);
|
2025-09-27 21:49:57 +00:00
|
|
|
// z0dd - ZOD, 9/29/02. Removed T2 demo code from here
|
2018-06-28 18:34:52 +00:00
|
|
|
commandToClient( %obj.client, 'setSenJamIconOn' );
|
2025-09-27 21:49:57 +00:00
|
|
|
|
2023-01-14 21:08:31 +00:00
|
|
|
%obj.setJammerFX( true );
|
2018-06-28 18:34:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function SensorJammerPackImage::onDeactivate(%data, %obj, %slot)
|
|
|
|
|
{
|
|
|
|
|
messageClient(%obj.client, 'MsgSensorJammerPackOff', '\c2Sensor jammer pack off.');
|
|
|
|
|
%obj.setImageTrigger(%slot, false);
|
2025-09-27 21:49:57 +00:00
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
|
// z0dd - ZOD, 4/25/02. This function is actually getting called AFTER
|
|
|
|
|
// ::onUnmount. We must check to see what the players current sensor data
|
|
|
|
|
// is, then if it is NOT PlayerSensor, set to passive jam, bug fix.
|
|
|
|
|
if(getTargetSensorData(%obj.client.target).getName() !$= "PlayerSensor")
|
|
|
|
|
setTargetSensorData(%obj.client.target, JammerSensorObjectPassive);
|
|
|
|
|
// ----------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
// z0dd - ZOD, 9/29/02. Removed T2 demo code from here
|
2018-06-28 18:34:52 +00:00
|
|
|
commandToClient( %obj.client, 'setSenJamIconOff' );
|
|
|
|
|
|
2025-09-27 21:49:57 +00:00
|
|
|
%obj.setJammerFX( false );
|
2018-06-28 18:34:52 +00:00
|
|
|
}
|
2025-09-27 21:49:57 +00:00
|
|
|
// z0dd - ZOD, 5/18/03. Removed functions, created parent. Streamline.
|
|
|
|
|
//function SensorJammerPack::onPickup(%this, %obj, %shape, %amount)
|
|
|
|
|
//{
|
|
|
|
|
// created to prevent console errors
|
|
|
|
|
//}
|