mirror of
https://github.com/mostlikely4r/construction-mod.git
synced 2026-07-12 06:54:34 +00:00
Initial commit
This commit is contained in:
parent
d305f694ac
commit
cbb5d08a0c
128 changed files with 82385 additions and 0 deletions
430
scripts/vehicles/serverVehicleHud.cs
Normal file
430
scripts/vehicles/serverVehicleHud.cs
Normal file
|
|
@ -0,0 +1,430 @@
|
|||
//------------------------------------------------------------------------------
|
||||
datablock EffectProfile(VehicleAppearEffect)
|
||||
{
|
||||
effectname = "vehicles/inventory_pad_appear";
|
||||
minDistance = 5;
|
||||
maxDistance = 10;
|
||||
};
|
||||
|
||||
datablock EffectProfile(ActivateVehiclePadEffect)
|
||||
{
|
||||
effectname = "powered/vehicle_pad_on";
|
||||
minDistance = 20;
|
||||
maxDistance = 30;
|
||||
};
|
||||
|
||||
datablock AudioProfile(VehicleAppearSound)
|
||||
{
|
||||
filename = "fx/vehicles/inventory_pad_appear.wav";
|
||||
description = AudioClosest3d;
|
||||
preload = true;
|
||||
effect = VehicleAppearEffect;
|
||||
};
|
||||
|
||||
datablock AudioProfile(ActivateVehiclePadSound)
|
||||
{
|
||||
filename = "fx/powered/vehicle_pad_on.wav";
|
||||
description = AudioClose3d;
|
||||
preload = true;
|
||||
effect = ActivateVehiclePadEffect;
|
||||
};
|
||||
|
||||
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)
|
||||
{
|
||||
%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();
|
||||
%pData.damageObject(%removeObjects[%i], 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;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function VehicleHud::updateHud( %obj, %client, %tag ) {
|
||||
%client.vehInvTag = %tag;
|
||||
%client.vehInvPage = "";
|
||||
if (%client.usedVehHud != 1) {
|
||||
bottomPrint(%client, "(cycle weapons to view more vehicles)", 5, 1);
|
||||
%client.usedVehHud = 1;
|
||||
}
|
||||
cycleVehicleHud(%obj, %client);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function cycleVehicleHud(%obj, %client,%data) {
|
||||
%tag = %client.vehInvTag;
|
||||
%page = %client.vehInvPage;
|
||||
if (%page $= "")
|
||||
%page = 0;
|
||||
else {
|
||||
if (%data $= "prev")
|
||||
%page--;
|
||||
else
|
||||
%page++;
|
||||
}
|
||||
%count = %client.player.station.lastCount;
|
||||
VehicleHud::clearHud( %obj, %client, %tag, %count );
|
||||
%station = %client.player.station;
|
||||
%team = %client.getSensorGroup();
|
||||
%count = 0;
|
||||
%i = 0;
|
||||
|
||||
if ( %station.vehicle[scoutVehicle] ) {
|
||||
%vehicleSet[scoutVehicle] = %i;
|
||||
%i++;
|
||||
}
|
||||
if ( %station.vehicle[AssaultVehicle] ) {
|
||||
%vehicleSet[AssaultVehicle] = %i;
|
||||
%i++;
|
||||
}
|
||||
if ( %station.vehicle[mobileBaseVehicle] ) {
|
||||
%vehicleSet[mobileBaseVehicle] = %i;
|
||||
%i++;
|
||||
}
|
||||
if ( %station.vehicle[scoutFlyer] ) {
|
||||
%vehicleSet[scoutFlyer] = %i;
|
||||
%i++;
|
||||
}
|
||||
if ( %station.vehicle[bomberFlyer] ) {
|
||||
%vehicleSet[bomberFlyer] = %i;
|
||||
%i++;
|
||||
}
|
||||
if ( %station.vehicle[hapcFlyer] ) {
|
||||
%vehicleSet[hapcFlyer] = %i;
|
||||
%i++;
|
||||
}
|
||||
if ( %station.vehicle[SuperScoutVehicle] && $Host::Purebuild == 1) {
|
||||
%vehicleSet[SuperScoutVehicle] = %i;
|
||||
%i++;
|
||||
}
|
||||
if ( %station.vehicle[SuperHAPCFlyer] && $Host::Purebuild == 1) {
|
||||
%vehicleSet[SuperHAPCFlyer] = %i;
|
||||
%i++;
|
||||
}
|
||||
if ( %station.vehicle[Artillery] ) {
|
||||
%vehicleSet[Artillery] = %i;
|
||||
%i++;
|
||||
}
|
||||
|
||||
%totalPages = mCeil(%i / 6) - 1;
|
||||
if (%page < 0)
|
||||
%page = %totalPages;
|
||||
if (%page > %totalPages)
|
||||
%page = 0;
|
||||
%initPos = (%page * 6);
|
||||
%endPos = %initPos + 5;
|
||||
|
||||
if ( checkVehSet(%vehicleSet[scoutVehicle], %initPos)) {
|
||||
messageClient( %client, 'SetLineHud', "", %tag, %count, "GRAV CYCLE", "", ScoutVehicle, $VehicleMax[ScoutVehicle] - $VehicleTotalCount[%team, ScoutVehicle] );
|
||||
%count++;
|
||||
}
|
||||
if ( checkVehSet(%vehicleSet[AssaultVehicle], %initPos)) {
|
||||
messageClient( %client, 'SetLineHud', "", %tag, %count, "ASSAULT TANK", "", AssaultVehicle, $VehicleMax[AssaultVehicle] - $VehicleTotalCount[%team, AssaultVehicle] );
|
||||
%count++;
|
||||
}
|
||||
if ( checkVehSet(%vehicleSet[mobileBaseVehicle], %initPos)) {
|
||||
messageClient( %client, 'SetLineHud', "", %tag, %count, "MOBILE POINT BASE", "", MobileBaseVehicle, $VehicleMax[MobileBaseVehicle] - $VehicleTotalCount[%team, MobileBaseVehicle] );
|
||||
%count++;
|
||||
}
|
||||
if ( checkVehSet(%vehicleSet[scoutFlyer], %initPos)) {
|
||||
messageClient( %client, 'SetLineHud', "", %tag, %count, "SCOUT FLIER", "", ScoutFlyer, $VehicleMax[ScoutFlyer] - $VehicleTotalCount[%team, ScoutFlyer] );
|
||||
%count++;
|
||||
}
|
||||
if ( checkVehSet(%vehicleSet[bomberFlyer], %initPos)) {
|
||||
messageClient( %client, 'SetLineHud', "", %tag, %count, "BOMBER", "", BomberFlyer, $VehicleMax[BomberFlyer] - $VehicleTotalCount[%team, BomberFlyer] );
|
||||
%count++;
|
||||
}
|
||||
if ( checkVehSet(%vehicleSet[hapcFlyer], %initPos)) {
|
||||
messageClient( %client, 'SetLineHud', "", %tag, %count, "TRANSPORT", "", HAPCFlyer, $VehicleMax[HAPCFlyer] - $VehicleTotalCount[%team, HAPCFlyer] );
|
||||
%count++;
|
||||
}
|
||||
if ( checkVehSet(%vehicleSet[SuperScoutVehicle], %initPos)) {
|
||||
messageClient( %client, 'SetLineHud', "", %tag, %count, "SUPER GRAV CYCLE", "", SuperScoutVehicle, $VehicleMax[SuperScoutVehicle] - $VehicleTotalCount[%team, SuperScoutVehicle] );
|
||||
%count++;
|
||||
}
|
||||
if ( checkVehSet(%vehicleSet[SuperHAPCFlyer], %initPos)) {
|
||||
messageClient( %client, 'SetLineHud', "", %tag, %count, "SUPER TRANSPORT", "", SuperHAPCFlyer, $VehicleMax[SuperHAPCFlyer] - $VehicleTotalCount[%team, SuperHAPCFlyer] );
|
||||
%count++;
|
||||
}
|
||||
if ( checkVehSet(%vehicleSet[Artillery], %initPos)) {
|
||||
messageClient( %client, 'SetLineHud', "", %tag, %count, "LONG RANGE ARTILLERY", "", Artillery, $VehicleMax[Artillery] - $VehicleTotalCount[%team, Artillery] );
|
||||
%count++;
|
||||
}
|
||||
|
||||
%station.lastCount = %count;
|
||||
%client.vehInvPage = %page;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
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 );
|
||||
}
|
||||
2131
scripts/vehicles/vehicle.cs
Normal file
2131
scripts/vehicles/vehicle.cs
Normal file
File diff suppressed because it is too large
Load diff
780
scripts/vehicles/vehicle_artillery.cs
Normal file
780
scripts/vehicles/vehicle_artillery.cs
Normal file
|
|
@ -0,0 +1,780 @@
|
|||
//**************************************************************
|
||||
// Long Range Artillery
|
||||
//**************************************************************
|
||||
//**************************************************************
|
||||
// SOUNDS
|
||||
//**************************************************************
|
||||
|
||||
datablock AudioProfile(ArtillerySkid)
|
||||
{
|
||||
filename = "fx/vehicles/tank_skid.wav";
|
||||
description = ClosestLooping3d;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
datablock AudioProfile(ArtilleryEngineSound)
|
||||
{
|
||||
filename = "fx/vehicles/tank_engine.wav";
|
||||
description = AudioDefaultLooping3d;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
datablock AudioProfile(ArtilleryThrustSound)
|
||||
{
|
||||
filename = "fx/vehicles/tank_boost.wav";
|
||||
description = AudioDefaultLooping3d;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
datablock AudioProfile(ArtilleryChaingunFireSound)
|
||||
{
|
||||
filename = "fx/vehicles/tank_chaingun.wav";
|
||||
description = AudioDefaultLooping3d;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
datablock AudioProfile(ArtilleryChaingunReloadSound)
|
||||
{
|
||||
filename = "fx/weapons/chaingun_dryfire.wav";
|
||||
description = AudioClose3d;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
datablock AudioProfile(TankChaingunProjectile)
|
||||
{
|
||||
filename = "fx/weapons/chaingun_projectile.wav";
|
||||
description = ProjectileLooping3d;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
datablock AudioProfile(ArtilleryTurretActivateSound)
|
||||
{
|
||||
filename = "fx/vehicles/tank_activate.wav";
|
||||
description = AudioClose3d;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
datablock AudioProfile(ArtilleryChaingunDryFireSound)
|
||||
{
|
||||
filename = "fx/weapons/chaingun_dryfire.wav";
|
||||
description = AudioClose3d;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
datablock AudioProfile(ArtilleryChaingunIdleSound)
|
||||
{
|
||||
filename = "fx/misc/diagnostic_on.wav";
|
||||
description = ClosestLooping3d;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
datablock AudioProfile(ArtilleryMortarDryFireSound)
|
||||
{
|
||||
filename = "fx/weapons/mortar_dryfire.wav";
|
||||
description = AudioClose3d;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
datablock AudioProfile(ArtilleryMortarFireSound)
|
||||
{
|
||||
filename = "fx/vehicles/tank_mortar_fire.wav";
|
||||
description = AudioClose3d;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
datablock AudioProfile(ArtilleryMortarReloadSound)
|
||||
{
|
||||
filename = "fx/weapons/mortar_reload.wav";
|
||||
description = AudioClose3d;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
datablock AudioProfile(ArtilleryMortarIdleSound)
|
||||
{
|
||||
filename = "fx/misc/diagnostic_on.wav";
|
||||
description = ClosestLooping3d;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
//**************************************************************
|
||||
// LIGHTS
|
||||
//**************************************************************
|
||||
datablock RunningLightData(TankLight1)
|
||||
{
|
||||
radius = 1.5;
|
||||
color = "1.0 1.0 1.0 0.2";
|
||||
nodeName = "Headlight_node01";
|
||||
direction = "0.0 1.0 0.0";
|
||||
texture = "special/headlight4";
|
||||
};
|
||||
|
||||
datablock RunningLightData(TankLight2)
|
||||
{
|
||||
radius = 1.5;
|
||||
color = "1.0 1.0 1.0 0.2";
|
||||
nodeName = "Headlight_node02";
|
||||
direction = "0.0 1.0 0.0";
|
||||
texture = "special/headlight4";
|
||||
};
|
||||
|
||||
datablock RunningLightData(TankLight3)
|
||||
{
|
||||
radius = 1.5;
|
||||
color = "1.0 1.0 1.0 0.2";
|
||||
nodeName = "Headlight_node03";
|
||||
direction = "0.0 1.0 0.0";
|
||||
texture = "special/headlight4";
|
||||
};
|
||||
|
||||
datablock RunningLightData(TankLight4)
|
||||
{
|
||||
radius = 1.5;
|
||||
color = "1.0 1.0 1.0 0.2";
|
||||
nodeName = "Headlight_node04";
|
||||
direction = "0.0 1.0 0.0";
|
||||
texture = "special/headlight4";
|
||||
};
|
||||
|
||||
//**************************************************************
|
||||
// VEHICLE CHARACTERISTICS
|
||||
//**************************************************************
|
||||
|
||||
datablock HoverVehicleData(Artillery) : TankDamageProfile
|
||||
{
|
||||
spawnOffset = "0 0 4";
|
||||
|
||||
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;
|
||||
mountPose[1] = sitting;
|
||||
numMountPoints = 2;
|
||||
isProtectedMountPoint[0] = true;
|
||||
isProtectedMountPoint[1] = true;
|
||||
|
||||
cameraMaxDist = 20;
|
||||
cameraOffset = 3;
|
||||
cameraLag = 1.5;
|
||||
explosion = LargeGroundVehicleExplosion2;
|
||||
explosionDamage = 0.5;
|
||||
explosionRadius = 5.0;
|
||||
|
||||
maxSteeringAngle = 0.5; // 20 deg.
|
||||
|
||||
maxDamage = 1.575;
|
||||
destroyedLevel = 1.575;
|
||||
|
||||
isShielded = true;
|
||||
rechargeRate = 1.0;
|
||||
energyPerDamagePoint = 300;
|
||||
maxEnergy = 400;
|
||||
minJetEnergy = 15;
|
||||
jetEnergyDrain = 2.0;
|
||||
|
||||
// Rigid Body
|
||||
mass = 4000;
|
||||
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 = ArtilleryThrustSound;
|
||||
engineSound = ArtilleryEngineSound;
|
||||
floatSound = ArtillerySkid;
|
||||
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 = 'Beowulf';
|
||||
targetTypeTag = 'Long Range 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;
|
||||
};
|
||||
|
||||
//**************************************************************
|
||||
// WEAPONS
|
||||
//**************************************************************
|
||||
|
||||
//-------------------------------------
|
||||
// Artillery CHAINGUN (projectile)
|
||||
//-------------------------------------
|
||||
|
||||
datablock TracerProjectileData(ArtilleryChaingunBullet)
|
||||
{
|
||||
doDynamicClientHits = true;
|
||||
|
||||
projectileShapeName = "";
|
||||
directDamage = 0.16;
|
||||
directDamageType = $DamageType::TankChaingun;
|
||||
hasDamageRadius = false;
|
||||
splash = ChaingunSplash;
|
||||
|
||||
kickbackstrength = 0.0;
|
||||
sound = TankChaingunProjectile;
|
||||
|
||||
dryVelocity = 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 = 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 = 0.10;
|
||||
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;
|
||||
|
||||
activateDelayMS = 100;
|
||||
|
||||
explosion = ChaingunExplosion;
|
||||
};
|
||||
|
||||
//-------------------------------------
|
||||
// Artillery CHAINGUN CHARACTERISTICS
|
||||
//-------------------------------------
|
||||
|
||||
datablock TurretData(ArtilleryPlasmaTurret) : TurretDamageProfile
|
||||
{
|
||||
className = VehicleTurret;
|
||||
catagory = "Turrets";
|
||||
shapeFile = "Turret_tank_base.dts";
|
||||
preload = true;
|
||||
|
||||
mass = 1.0; // Not really relevant
|
||||
|
||||
maxEnergy = 1;
|
||||
maxDamage = Artillery.maxDamage;
|
||||
destroyedLevel = Artillery.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 = 'Artillery Chaingun';
|
||||
targetTypeTag = 'Turret';
|
||||
};
|
||||
|
||||
datablock TurretImageData(ArtilleryTurretParam)
|
||||
{
|
||||
mountPoint = 2;
|
||||
shapeFile = "turret_muzzlepoint.dts";
|
||||
|
||||
projectile = ArtilleryChaingunBullet;
|
||||
projectileType = TracerProjectile;
|
||||
|
||||
useCapacitor = true;
|
||||
usesEnergy = true;
|
||||
|
||||
// Turret parameters
|
||||
activationMS = 10;
|
||||
deactivateDelayMS = 15;
|
||||
thinkTimeMS = 20;
|
||||
degPerSecTheta = 500;
|
||||
degPerSecPhi = 500;
|
||||
|
||||
attackRadius = 750;
|
||||
};
|
||||
|
||||
datablock TurretImageData(ArtilleryPlasmaTurretBarrel)
|
||||
{
|
||||
shapeFile = "turret_tank_barrelchain.dts";
|
||||
mountPoint = 1;
|
||||
|
||||
projectile = ArtilleryChaingunBullet;
|
||||
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 = 12.0 / 1000.0;
|
||||
|
||||
useCapacitor = true;
|
||||
usesEnergy = true;
|
||||
useMountEnergy = true;
|
||||
fireEnergy = 3.75;
|
||||
minEnergy = 15.0;
|
||||
|
||||
// Turret parameters
|
||||
activationMS = 400;
|
||||
deactivateDelayMS = 50;
|
||||
thinkTimeMS = 20;
|
||||
degPerSecTheta = 360;
|
||||
degPerSecPhi = 360;
|
||||
attackRadius = 750;
|
||||
|
||||
// State transitions
|
||||
stateName[0] = "Activate";
|
||||
stateTransitionOnNotLoaded[0] = "Dead";
|
||||
stateTransitionOnLoaded[0] = "ActivateReady";
|
||||
stateSound[0] = ArtilleryTurretActivateSound;
|
||||
|
||||
stateName[1] = "ActivateReady";
|
||||
stateSequence[1] = "Activate";
|
||||
stateSound[1] = ArtilleryTurretActivateSound;
|
||||
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] = false;
|
||||
stateSound[3] = ArtilleryChaingunFireSound;
|
||||
stateScript[3] = "onFire";
|
||||
stateTimeoutValue[3] = 0.1;
|
||||
stateTransitionOnTimeout[3] = "Fire";
|
||||
stateTransitionOnTriggerUp[3] = "Reload";
|
||||
stateTransitionOnNoAmmo[3] = "noAmmo";
|
||||
|
||||
stateName[4] = "Reload";
|
||||
stateSequence[4] = "Reload";
|
||||
stateTimeoutValue[4] = 0.1;
|
||||
stateAllowImageChange[4] = false;
|
||||
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] = ArtilleryChaingunDryFireSound;
|
||||
stateTimeoutValue[7] = 0.1;
|
||||
stateTransitionOnTimeout[7] = "NoAmmo";
|
||||
|
||||
stateName[8] = "NoAmmo";
|
||||
stateTransitionOnAmmo[8] = "Reload";
|
||||
stateSequence[8] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[8] = "DryFire";
|
||||
};
|
||||
|
||||
datablock TurretImageData(ArtilleryPlasmaTurretBarrel2) : ArtilleryPlasmaTurretBarrel
|
||||
{
|
||||
mountPoint = 0;
|
||||
};
|
||||
|
||||
datablock ShapeBaseImageData(ArtilleryCannonTurret)
|
||||
{
|
||||
className = WeaponImage;
|
||||
shapeFile = "turret_tank_barrelmortar.dts";
|
||||
mountPoint = 3;
|
||||
offset = "2 -2.5 1.5";
|
||||
rotation = "-1 0 0 80";
|
||||
activationMS = 100;
|
||||
deactivateDelayMS = 150;
|
||||
thinkTimeMS = 20;
|
||||
degPerSecTheta = 500;
|
||||
degPerSecPhi = 500;
|
||||
attackRadius = 500;
|
||||
};
|
||||
|
||||
datablock ShapeBaseImageData(ArtilleryCannonTurret2)
|
||||
{
|
||||
className = WeaponImage;
|
||||
shapeFile = "turret_tank_barrelmortar.dts";
|
||||
mountPoint = 3;
|
||||
offset = "-2 -2.5 1.5";
|
||||
rotation = "-1 0 0 80";
|
||||
activationMS = 100;
|
||||
deactivateDelayMS = 150;
|
||||
thinkTimeMS = 20;
|
||||
degPerSecTheta = 500;
|
||||
degPerSecPhi = 500;
|
||||
attackRadius = 500;
|
||||
};
|
||||
|
||||
function Artillery::onAdd(%this, %obj)
|
||||
{
|
||||
Parent::onAdd(%this, %obj);
|
||||
%turret = TurretData::create(ArtilleryPlasmaTurret);
|
||||
%turret.selectedWeapon = 1;
|
||||
MissionCleanup.add(%turret);
|
||||
%turret.team = %obj.teamBought;
|
||||
%turret.setSelfPowered();
|
||||
%obj.mountObject(%turret, 10);
|
||||
%turret.setCapacitorRechargeRate( %turret.getDataBlock().capacitorRechargeRate );
|
||||
%obj.turretObject = %turret;
|
||||
%turret.setAutoFire(false);
|
||||
%turret.mountImage(ArtilleryPlasmaTurretBarrel, 2);
|
||||
%turret.mountImage(ArtilleryPlasmaTurretBarrel2, 4);
|
||||
%turret.mountImage(AssaultTurretParam, 0);
|
||||
%obj.schedule(6000, "playThread", $ActivateThread, "activate");
|
||||
setTargetSensorGroup(%turret.getTarget(), %turret.team);
|
||||
setTargetNeverVisMask(%turret.getTarget(), 0xffffffff);
|
||||
|
||||
%obj.mountImage(ArtilleryCannonTurret, 3);
|
||||
%obj.mountImage(ArtilleryCannonTurret2, 4);
|
||||
schedule(6100, 0, "ArtilleryLookForTarget", %obj);
|
||||
}
|
||||
|
||||
function Artillery::deleteAllMounted(%data, %obj)
|
||||
{
|
||||
%turret = %obj.getMountNodeObject(10);
|
||||
if (%turret)
|
||||
{
|
||||
if(%client = %turret.getControllingClient())
|
||||
{
|
||||
%client.player.setControlObject(%client.player);
|
||||
%client.player.mountImage(%client.player.lastWeapon, $WeaponSlot);
|
||||
%client.player.mountVehicle = false;
|
||||
}
|
||||
%turret.delete();
|
||||
}
|
||||
%turret = %obj.getMountNodeObject(10);
|
||||
if(%turret)
|
||||
%turret.delete();
|
||||
}
|
||||
|
||||
function Artillery::playerMounted(%data, %obj, %player, %node)
|
||||
{
|
||||
if(%node == 0)
|
||||
commandToClient(%player.client, 'setHudMode', 'Pilot', "Assault", %node);
|
||||
else if(%node == 1)
|
||||
{
|
||||
%turret = %obj.getMountNodeObject(10);
|
||||
%player.vehicleTurret = %turret;
|
||||
%player.setTransform("0 0 0 0 0 1 0");
|
||||
%player.lastWeapon = %player.getMountedImage($WeaponSlot);
|
||||
%player.unmountImage($WeaponSlot);
|
||||
if(!%player.client.isAIControlled())
|
||||
{
|
||||
%player.setControlObject(%turret);
|
||||
%player.client.setObjectActiveImage(%turret, 2);
|
||||
}
|
||||
%turret.turreteer = %player;
|
||||
$aWeaponActive = 0;
|
||||
commandToClient(%player.client,'SetWeaponryVehicleKeys', true);
|
||||
%obj.getMountNodeObject(10).selectedWeapon = 1;
|
||||
commandToClient(%player.client, 'setHudMode', 'Pilot', "Assault", %node);
|
||||
}
|
||||
if( %player.client.observeCount > 0 )
|
||||
resetObserveFollow( %player.client, false );
|
||||
%passString = buildPassengerString(%obj);
|
||||
for(%i = 0; %i < %data.numMountPoints; %i++)
|
||||
if(%obj.getMountNodeObject(%i) > 0)
|
||||
commandToClient(%obj.getMountNodeObject(%i).client, 'checkPassengers', %passString);
|
||||
}
|
||||
|
||||
function ArtilleryPlasmaTurret::onDamage(%data, %obj)
|
||||
{
|
||||
%newDamageVal = %obj.getDamageLevel();
|
||||
if(%obj.lastDamageVal !$= "")
|
||||
if(isObject(%obj.getObjectMount()) && %obj.lastDamageVal > %newDamageVal)
|
||||
%obj.getObjectMount().setDamageLevel(%newDamageVal);
|
||||
%obj.lastDamageVal = %newDamageVal;
|
||||
}
|
||||
|
||||
function ArtilleryPlasmaTurret::damageObject(%this, %targetObject, %sourceObject, %position, %amount, %damageType ,%vec, %client, %projectile)
|
||||
{
|
||||
%vehicle = %targetObject.getObjectMount();
|
||||
if(%vehicle)
|
||||
%vehicle.getDataBlock().damageObject(%vehicle, %sourceObject, %position, %amount, %damageType, %vec, %client, %projectile);
|
||||
}
|
||||
|
||||
function ArtilleryPlasmaTurret::onTrigger(%data, %obj, %trigger, %state)
|
||||
{
|
||||
switch (%trigger)
|
||||
{
|
||||
case 0:
|
||||
%obj.fireTrigger = %state;
|
||||
if(%state)
|
||||
{
|
||||
%obj.setImageTrigger(2, true);
|
||||
%obj.setImageTrigger(4, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
%obj.setImageTrigger(2, false);
|
||||
%obj.setImageTrigger(4, false);
|
||||
}
|
||||
case 2:
|
||||
if(%state)
|
||||
%obj.getDataBlock().playerDismount(%obj);
|
||||
}
|
||||
}
|
||||
|
||||
function ArtilleryPlasmaTurret::playerDismount(%data, %obj)
|
||||
{
|
||||
%obj.fireTrigger = 0;
|
||||
%obj.setImageTrigger(2, false);
|
||||
%obj.setImageTrigger(4, false);
|
||||
%client = %obj.getControllingClient();
|
||||
%client.player.mountImage(%client.player.lastWeapon, $WeaponSlot);
|
||||
%client.player.mountVehicle = false;
|
||||
setTargetSensorGroup(%obj.getTarget(), 0);
|
||||
setTargetNeverVisMask(%obj.getTarget(), 0xffffffff);
|
||||
}
|
||||
|
||||
function ArtilleryCannonTurret::onMount(%this, %obj, %slot)
|
||||
{
|
||||
}
|
||||
|
||||
function ArtilleryCannonTurret::onUnmount(%this, %obj, %slot)
|
||||
{
|
||||
}
|
||||
|
||||
function ArtilleryCannonTurret2::onMount(%this, %obj, %slot)
|
||||
{
|
||||
}
|
||||
|
||||
function ArtilleryCannonTurret2::onUnmount(%this, %obj, %slot)
|
||||
{
|
||||
}
|
||||
|
||||
function ArtilleryLookForTarget(%obj)
|
||||
{
|
||||
if (isObject(%obj))
|
||||
{
|
||||
if (%obj.lastcannon == 3)
|
||||
%obj.lastcannon = 4;
|
||||
else
|
||||
%obj.lastcannon = 3;
|
||||
%pos = %obj.getMuzzlePoint(%obj.lastcannon);
|
||||
%vec = %obj.getMuzzleVector(%obj.lastcannon);
|
||||
%count = ClientGroup.getCount();
|
||||
%mainDist = 1760;
|
||||
%targetPos = "";
|
||||
%damageMasks = $TypeMasks::PlayerObjectType | $TypeMasks::VehicleObjectType |
|
||||
$TypeMasks::StationObjectType | $TypeMasks::GeneratorObjectType |
|
||||
$TypeMasks::SensorObjectType | $TypeMasks::TurretObjectType |
|
||||
$TypeMasks::InteriorObjectType | $TypeMasks::TerrainObjectType;
|
||||
for (%i=0;%i<%count;%i++)
|
||||
{
|
||||
%obj2 = ClientGroup.getObject(%i);
|
||||
%player = %obj2.player;
|
||||
if (%player)
|
||||
{
|
||||
if ((%player.team == %obj.team) && (%player.posLaze))
|
||||
{
|
||||
%muzzlePos = %player.getMuzzlePoint($WeaponSlot);
|
||||
%muzzleVec = %player.getMuzzleVector($WeaponSlot);
|
||||
%endPos = VectorAdd(%muzzlePos, VectorScale(%muzzleVec, 1000));
|
||||
%hit = ContainerRayCast(%muzzlePos, %endPos, %damageMasks, %player);
|
||||
if (%hit)
|
||||
%pos2 = getWords(%hit, 1, 3);
|
||||
%dist = VectorDist(%pos, %pos2);
|
||||
if ((%dist > 2) && (%dist < 7500) && (%dist < %mainDist))
|
||||
{
|
||||
%targetPos = %pos2;
|
||||
%mainDist = %dist;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (%targetPos)
|
||||
{
|
||||
%p = new GrenadeProjectile() {
|
||||
dataBlock = ArtilleryShot;
|
||||
initialDirection = %vec;
|
||||
initialPosition = %pos;
|
||||
sourceObject = %obj.lastpilot;
|
||||
sourceSlot = %obj.lastcannon;
|
||||
vehicleObject = %obj;
|
||||
};
|
||||
MissionCleanup.add(%p);
|
||||
schedule(200, 0, ArtilleryShotDrop, %p, %pos, %targetPos);
|
||||
}
|
||||
schedule (50, 0, ArtilleryLookForTarget, %obj);
|
||||
}
|
||||
}
|
||||
|
||||
function ArtilleryShotDrop(%b, %pos, %pos2)
|
||||
{
|
||||
if (isObject(%b))
|
||||
{
|
||||
%dist = VectorDist(%pos, %pos2);
|
||||
%accuracy = %dist / 100;
|
||||
%b.schedule(50, "delete");
|
||||
%pos3 = VectorAdd(%pos2, "0 0 500");
|
||||
%vec = "0 0 -1";
|
||||
%x = (getRandom() - 0.5) * 2 * 3.1415926 * %accuracy / 10000;
|
||||
%y = (getRandom() - 0.5) * 2 * 3.1415926 * %accuracy / 10000;
|
||||
%z = (getRandom() - 0.5) * 2 * 3.1415926 * %accuracy / 10000;
|
||||
%mat = MatrixCreateFromEuler(%x @ " " @ %y @ " " @ %z);
|
||||
%vec = MatrixMulVector(%mat, %vec);
|
||||
%p = new GrenadeProjectile() {
|
||||
dataBlock = ArtilleryShot;
|
||||
initialDirection = %vec;
|
||||
initialPosition = %pos3;
|
||||
sourceObject = %b.sourceObject;
|
||||
sourceSlot = %b.sourceSlot;
|
||||
vehicleObject = %b.vehicleObject;
|
||||
};
|
||||
MissionCleanup.add(%p);
|
||||
}
|
||||
}
|
||||
|
||||
datablock GrenadeProjectileData(ArtilleryShot)
|
||||
{
|
||||
projectileShapeName = "mortar_projectile.dts";
|
||||
emitterDelay = -1;
|
||||
directDamage = 0.0;
|
||||
hasDamageRadius = true;
|
||||
indirectDamage = 1.0;
|
||||
damageRadius = 25.0;
|
||||
radiusDamageType = $DamageType::Mortar;
|
||||
kickBackStrength = 2500;
|
||||
scale = "2 2 2";
|
||||
explosion = "MortarExplosion";
|
||||
underwaterExplosion = "UnderwaterMortarExplosion";
|
||||
velInheritFactor = 0.5;
|
||||
splash = MortarSplash;
|
||||
depthTolerance = 10.0; // depth at which it uses underwater explosion
|
||||
baseEmitter = MortarSmokeEmitter;
|
||||
bubbleEmitter = MortarBubbleEmitter;
|
||||
grenadeElasticity = 0.15;
|
||||
grenadeFriction = 0.4;
|
||||
armingDelayMS = 10;
|
||||
muzzleVelocity = 300;
|
||||
drag = 0.01;
|
||||
sound = MortarProjectileSound;
|
||||
hasLight = true;
|
||||
lightRadius = 4;
|
||||
lightColor = "0.05 0.2 0.05";
|
||||
hasLightUnderwaterColor = true;
|
||||
underWaterLightColor = "0.05 0.075 0.2";
|
||||
};
|
||||
997
scripts/vehicles/vehicle_bomber.cs
Normal file
997
scripts/vehicles/vehicle_bomber.cs
Normal file
|
|
@ -0,0 +1,997 @@
|
|||
//**************************************************************
|
||||
// THUNDERSWORD BOMBER
|
||||
//**************************************************************
|
||||
//**************************************************************
|
||||
// SOUNDS
|
||||
//**************************************************************
|
||||
datablock EffectProfile(BomberFlyerEngineEffect)
|
||||
{
|
||||
effectname = "vehicles/bomber_engine";
|
||||
minDistance = 5.0;
|
||||
maxDistance = 10.0;
|
||||
};
|
||||
|
||||
datablock EffectProfile(BomberFlyerThrustEffect)
|
||||
{
|
||||
effectname = "vehicles/bomber_boost";
|
||||
minDistance = 5.0;
|
||||
maxDistance = 10.0;
|
||||
};
|
||||
|
||||
datablock EffectProfile(BomberTurretFireEffect)
|
||||
{
|
||||
effectname = "vehicles/bomber_turret_fire";
|
||||
minDistance = 5.0;
|
||||
maxDistance = 10.0;
|
||||
};
|
||||
|
||||
datablock EffectProfile(BomberTurretActivateEffect)
|
||||
{
|
||||
effectname = "vehicles/bomber_turret_activate";
|
||||
minDistance = 5.0;
|
||||
maxDistance = 10.0;
|
||||
};
|
||||
|
||||
datablock EffectProfile(BomberTurretReloadEffect)
|
||||
{
|
||||
effectname = "vehicles/bomber_turret_reload";
|
||||
minDistance = 5.0;
|
||||
maxDistance = 10.0;
|
||||
};
|
||||
|
||||
datablock EffectProfile(BomberTurretDryFireEffect)
|
||||
{
|
||||
effectname = "vehicles/bomber_turret_dryfire";
|
||||
minDistance = 5.0;
|
||||
maxDistance = 10.0;
|
||||
};
|
||||
|
||||
datablock EffectProfile(BomberBombReloadEffect)
|
||||
{
|
||||
effectname = "vehicles/bomber_bomb_reload";
|
||||
minDistance = 5.0;
|
||||
maxDistance = 10.0;
|
||||
};
|
||||
|
||||
datablock EffectProfile(BomberBombDryFireEffect)
|
||||
{
|
||||
effectname = "vehicles/bomber_bomb_dryfire";
|
||||
minDistance = 5.0;
|
||||
maxDistance = 10.0;
|
||||
};
|
||||
|
||||
datablock EffectProfile(BomberBombFireEffect)
|
||||
{
|
||||
effectname = "weapons/generic_throw";
|
||||
minDistance = 10.0;
|
||||
maxDistance = 20.0;
|
||||
};
|
||||
|
||||
datablock AudioProfile(BomberFlyerEngineSound)
|
||||
{
|
||||
filename = "fx/vehicles/bomber_engine.wav";
|
||||
description = AudioDefaultLooping3d;
|
||||
preload = true;
|
||||
effect = BomberFlyerEngineEffect;
|
||||
};
|
||||
|
||||
datablock AudioProfile(BomberFlyerThrustSound)
|
||||
{
|
||||
filename = "fx/vehicles/bomber_boost.wav";
|
||||
description = AudioDefaultLooping3d;
|
||||
preload = true;
|
||||
effect = BomberFlyerThrustEffect;
|
||||
};
|
||||
|
||||
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;
|
||||
effect = BomberTurretFireEffect;
|
||||
};
|
||||
|
||||
datablock AudioProfile(BomberTurretActivateSound)
|
||||
{
|
||||
filename = "fx/vehicles/bomber_turret_activate.wav";
|
||||
description = AudioClose3d;
|
||||
preload = true;
|
||||
effect = BomberTurretActivateEffect;
|
||||
};
|
||||
|
||||
datablock AudioProfile(BomberTurretReloadSound)
|
||||
{
|
||||
filename = "fx/vehicles/bomber_turret_reload.wav";
|
||||
description = AudioClose3d;
|
||||
preload = true;
|
||||
effect = BomberTurretReloadEffect;
|
||||
};
|
||||
|
||||
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;
|
||||
effect = BomberTurretDryFireEffect;
|
||||
};
|
||||
|
||||
datablock AudioProfile(BomberBombReloadSound)
|
||||
{
|
||||
filename = "fx/vehicles/bomber_bomb_reload.wav";
|
||||
description = AudioClose3d;
|
||||
preload = true;
|
||||
effect = BomberBombReloadEffect;
|
||||
};
|
||||
|
||||
datablock AudioProfile(BomberBombProjectileSound)
|
||||
{
|
||||
filename = "fx/vehicles/bomber_bomb_projectile.wav";
|
||||
description = AudioDefaultLooping3d;
|
||||
preload = true;
|
||||
effect = BomberBombFireEffect;
|
||||
};
|
||||
|
||||
datablock AudioProfile(BomberBombDryFireSound)
|
||||
{
|
||||
filename = "fx/vehicles/bomber_bomb_dryfire.wav";
|
||||
description = AudioClose3d;
|
||||
preload = true;
|
||||
effect = BomberBombDryFireEffect;
|
||||
};
|
||||
|
||||
datablock AudioProfile(BomberBombFireSound)
|
||||
{
|
||||
filename = "fx/vehicles/bomber_bomb_reload.wav";
|
||||
description = AudioClose3d;
|
||||
preload = true;
|
||||
effect = BomberBombFireEffect;
|
||||
};
|
||||
|
||||
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 = 75;
|
||||
|
||||
// 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;
|
||||
};
|
||||
138
scripts/vehicles/vehicle_escapepod.cs
Normal file
138
scripts/vehicles/vehicle_escapepod.cs
Normal 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";
|
||||
};
|
||||
226
scripts/vehicles/vehicle_havoc.cs
Normal file
226
scripts/vehicles/vehicle_havoc.cs
Normal file
|
|
@ -0,0 +1,226 @@
|
|||
//**************************************************************
|
||||
// HAVOC HEAVY TRANSPORT FLIER
|
||||
//**************************************************************
|
||||
//**************************************************************
|
||||
// SOUNDS
|
||||
//**************************************************************
|
||||
datablock EffectProfile(HAPCFlyerEngineEffect)
|
||||
{
|
||||
effectname = "vehicles/htransport_thrust";
|
||||
minDistance = 5.0;
|
||||
maxDistance = 10.0;
|
||||
};
|
||||
|
||||
datablock EffectProfile(HAPCFlyerThrustEffect)
|
||||
{
|
||||
effectname = "vehicles/htransport_boost";
|
||||
minDistance = 5.0;
|
||||
maxDistance = 10.0;
|
||||
};
|
||||
|
||||
datablock AudioProfile(HAPCFlyerEngineSound)
|
||||
{
|
||||
filename = "fx/vehicles/htransport_thrust.wav";
|
||||
description = AudioDefaultLooping3d;
|
||||
effect = HAPCFlyerEngineEffect;
|
||||
};
|
||||
|
||||
datablock AudioProfile(HAPCFlyerThrustSound)
|
||||
{
|
||||
filename = "fx/vehicles/htransport_boost.wav";
|
||||
description = AudioDefaultLooping3d;
|
||||
effect = HAPCFlyerThrustEffect;
|
||||
};
|
||||
|
||||
//**************************************************************
|
||||
// VEHICLE CHARACTERISTICS
|
||||
//**************************************************************
|
||||
|
||||
datablock FlyingVehicleData(HAPCFlyer) : 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;
|
||||
// mountPose[1] = sitting;
|
||||
numMountPoints = 6;
|
||||
isProtectedMountPoint[0] = true;
|
||||
isProtectedMountPoint[1] = true;
|
||||
isProtectedMountPoint[2] = true;
|
||||
isProtectedMountPoint[3] = true;
|
||||
isProtectedMountPoint[4] = true;
|
||||
isProtectedMountPoint[5] = true;
|
||||
canControl = true;
|
||||
cameraMaxDist = 17;
|
||||
cameraOffset = 2;
|
||||
cameraLag = 8.5;
|
||||
explosion = LargeAirVehicleExplosion;
|
||||
explosionDamage = 0.5;
|
||||
explosionRadius = 5.0;
|
||||
|
||||
maxDamage = 3.50;
|
||||
destroyedLevel = 3.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 = 8;
|
||||
horizontalSurfaceForce = 10; // Horizontal center "wing"
|
||||
verticalSurfaceForce = 10; // Vertical center "wing"
|
||||
maneuveringForce = 6000; // Horizontal jets
|
||||
steeringForce = 1000; // Steering jets
|
||||
steeringRollForce = 400; // Steering jets
|
||||
rollForce = 12; // Auto-roll
|
||||
hoverHeight = 8; // Height off the ground at rest
|
||||
createHoverHeight = 6; // Height off the ground when created
|
||||
maxForwardSpeed = 71; // speed in which forward thrust force is no longer applied (meters/second)
|
||||
|
||||
// Turbo Jet
|
||||
jetForce = 5000;
|
||||
minJetEnergy = 55;
|
||||
jetEnergyDrain = 3.6;
|
||||
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 = 550;
|
||||
bodyFriction = 0;
|
||||
bodyRestitution = 0.3;
|
||||
minRollSpeed = 0;
|
||||
softImpactSpeed = 12; // Sound hooks. This is the soft hit.
|
||||
hardImpactSpeed = 15; // 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 = 'Havoc';
|
||||
targetTypeTag = 'Heavy Transport';
|
||||
sensorData = VehiclePulseSensor;
|
||||
|
||||
checkRadius = 7.8115;
|
||||
observeParameters = "1 15 15";
|
||||
|
||||
stuckTimerTicks = 32; // If the hapc spends more than 1 sec in contact with something
|
||||
stuckTimerAngle = 80; // with a > 80 deg. pitch, BOOM!
|
||||
|
||||
shieldEffectScale = "1.0 0.9375 0.45";
|
||||
};
|
||||
|
||||
function HAPCFlyer::hasDismountOverrides(%data, %obj)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
function HAPCFlyer::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
|
||||
//**************************************************************
|
||||
|
||||
|
||||
|
||||
304
scripts/vehicles/vehicle_mpb.cs
Normal file
304
scripts/vehicles/vehicle_mpb.cs
Normal file
|
|
@ -0,0 +1,304 @@
|
|||
//**************************************************************
|
||||
// JERICHO FORWARD BASE (Mobile Point Base)
|
||||
//**************************************************************
|
||||
//**************************************************************
|
||||
// SOUNDS
|
||||
//**************************************************************
|
||||
datablock EffectProfile(MPBEngineEffect)
|
||||
{
|
||||
effectname = "vehicles/mpb_thrust";
|
||||
minDistance = 5.0;
|
||||
maxDistance = 10.0;
|
||||
};
|
||||
|
||||
datablock EffectProfile(MPBThrustEffect)
|
||||
{
|
||||
effectname = "vehicles/mpb_boost";
|
||||
minDistance = 5.0;
|
||||
maxDistance = 10.0;
|
||||
};
|
||||
|
||||
datablock AudioProfile(MPBEngineSound)
|
||||
{
|
||||
filename = "fx/vehicles/mpb_thrust.wav";
|
||||
description = AudioDefaultLooping3d;
|
||||
preload = true;
|
||||
effect = MPBEngineEffect;
|
||||
};
|
||||
|
||||
datablock AudioProfile(MPBThrustSound)
|
||||
{
|
||||
filename = "fx/vehicles/mpb_boost.wav";
|
||||
description = AudioDefaultLooping3d;
|
||||
preload = true;
|
||||
effect = MPBThrustEffect;
|
||||
};
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
|
||||
|
||||
344
scripts/vehicles/vehicle_shrike.cs
Normal file
344
scripts/vehicles/vehicle_shrike.cs
Normal file
|
|
@ -0,0 +1,344 @@
|
|||
//**************************************************************
|
||||
// SHRIKE SCOUT FLIER
|
||||
//**************************************************************
|
||||
//**************************************************************
|
||||
// SOUNDS
|
||||
//**************************************************************
|
||||
datablock EffectProfile(ScoutFlyerThrustEffect)
|
||||
{
|
||||
effectname = "vehicles/shrike_boost";
|
||||
minDistance = 5.0;
|
||||
maxDistance = 10.0;
|
||||
};
|
||||
|
||||
datablock EffectProfile(ScoutFlyerEngineEffect)
|
||||
{
|
||||
effectname = "vehicles/shrike_engine";
|
||||
minDistance = 5.0;
|
||||
maxDistance = 10.0;
|
||||
};
|
||||
|
||||
datablock EffectProfile(ShrikeBlasterFireEffect)
|
||||
{
|
||||
effectname = "vehicles/shrike_blaster";
|
||||
minDistance = 5.0;
|
||||
maxDistance = 10.0;
|
||||
};
|
||||
|
||||
datablock AudioProfile(ScoutFlyerThrustSound)
|
||||
{
|
||||
filename = "fx/vehicles/shrike_boost.wav";
|
||||
description = AudioDefaultLooping3d;
|
||||
preload = true;
|
||||
effect = ScoutFlyerThrustEffect;
|
||||
};
|
||||
|
||||
datablock AudioProfile(ScoutFlyerEngineSound)
|
||||
{
|
||||
filename = "fx/vehicles/shrike_engine.wav";
|
||||
description = AudioDefaultLooping3d;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
datablock AudioProfile(ShrikeBlasterFire)
|
||||
{
|
||||
filename = "fx/vehicles/shrike_blaster.wav";
|
||||
description = AudioDefault3d;
|
||||
preload = true;
|
||||
effect = ScoutFlyerEngineEffect;
|
||||
};
|
||||
|
||||
datablock AudioProfile(ShrikeBlasterProjectile)
|
||||
{
|
||||
filename = "fx/weapons/shrike_blaster_projectile.wav";
|
||||
description = ProjectileLooping3d;
|
||||
preload = true;
|
||||
effect = ShrikeBlasterFireEffect;
|
||||
};
|
||||
|
||||
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 = true;
|
||||
catagory = "Vehicles";
|
||||
shapeFile = "vehicle_air_scout.dts";
|
||||
multipassenger = true;
|
||||
computeCRC = true;
|
||||
|
||||
debrisShapeName = "vehicle_air_scout_debris.dts";
|
||||
debris = ShapeDebris;
|
||||
renderWhenDestroyed = false;
|
||||
|
||||
drag = 0.15;
|
||||
density = 1.0;
|
||||
|
||||
canWarp = 1;
|
||||
|
||||
mountPose[0] = sitting;
|
||||
numMountPoints = 2;
|
||||
isProtectedMountPoint[0] = true;
|
||||
isProtectedMountPoint[1] = true;
|
||||
cameraMaxDist = 15;
|
||||
cameraOffset = 2.5;
|
||||
cameraLag = 0.9;
|
||||
explosion = VehicleExplosion;
|
||||
explosionDamage = 0.5;
|
||||
explosionRadius = 5.0;
|
||||
|
||||
maxDamage = 1.40;
|
||||
destroyedLevel = 1.40;
|
||||
|
||||
isShielded = true;
|
||||
energyPerDamagePoint = 160;
|
||||
maxEnergy = 280; // Afterburner and any energy weapon pool
|
||||
rechargeRate = 0.8;
|
||||
|
||||
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[chaingunAmmo] = 1000;
|
||||
|
||||
minMountDist = 4;
|
||||
|
||||
splashEmitter[0] = VehicleFoamDropletsEmitter;
|
||||
splashEmitter[1] = VehicleFoamEmitter;
|
||||
|
||||
shieldImpact = VehicleShieldImpact;
|
||||
|
||||
cmdCategory = "Tactical";
|
||||
cmdIcon = CMDFlyingScoutIcon;
|
||||
cmdMiniIconName = "commander/MiniIcons/com_scout_grey";
|
||||
targetNameTag = 'Shrike';
|
||||
targetTypeTag = 'Turbograv';
|
||||
sensorData = AWACPulseSensor;
|
||||
sensorRadius = AWACPulseSensor.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";
|
||||
|
||||
};
|
||||
|
||||
//**************************************************************
|
||||
// WEAPONS
|
||||
//**************************************************************
|
||||
|
||||
datablock ShapeBaseImageData(ScoutChaingunPairImage)
|
||||
{
|
||||
className = WeaponImage;
|
||||
shapeFile = "weapon_energy_vehicle.dts";
|
||||
item = Chaingun;
|
||||
ammo = ChaingunAmmo;
|
||||
projectile = ScoutChaingunBullet;
|
||||
projectileType = TracerProjectile;
|
||||
mountPoint = 10;
|
||||
//**original** offset = ".73 0 0";
|
||||
offset = "1.93 -0.52 0.044";
|
||||
|
||||
projectileSpread = 1.0 / 1000.0;
|
||||
|
||||
usesEnergy = true;
|
||||
useMountEnergy = true;
|
||||
// DAVEG -- balancing numbers below!
|
||||
minEnergy = 5;
|
||||
fireEnergy = 5;
|
||||
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.25;
|
||||
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
|
||||
{
|
||||
//**original** offset = "-.73 0 0";
|
||||
offset = "-1.93 -0.52 0.044";
|
||||
stateScript[3] = "onTriggerDown";
|
||||
stateScript[5] = "onTriggerUp";
|
||||
stateScript[6] = "onTriggerUp";
|
||||
};
|
||||
|
||||
datablock ShapeBaseImageData(ScoutChaingunParam)
|
||||
{
|
||||
mountPoint = 2;
|
||||
shapeFile = "turret_muzzlepoint.dts";
|
||||
|
||||
projectile = ScoutChaingunBullet;
|
||||
projectileType = TracerProjectile;
|
||||
};
|
||||
189
scripts/vehicles/vehicle_superHavoc.cs
Normal file
189
scripts/vehicles/vehicle_superHavoc.cs
Normal file
|
|
@ -0,0 +1,189 @@
|
|||
//**************************************************************
|
||||
// SUPER HAVOC HEAVY TRANSPORT FLIER
|
||||
//**************************************************************
|
||||
|
||||
//**************************************************************
|
||||
// VEHICLE CHARACTERISTICS
|
||||
//**************************************************************
|
||||
|
||||
datablock FlyingVehicleData(SuperHAPCFlyer) : 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;
|
||||
// mountPose[1] = sitting;
|
||||
numMountPoints = 6;
|
||||
isProtectedMountPoint[0] = true;
|
||||
isProtectedMountPoint[1] = true;
|
||||
isProtectedMountPoint[2] = true;
|
||||
isProtectedMountPoint[3] = true;
|
||||
isProtectedMountPoint[4] = true;
|
||||
isProtectedMountPoint[5] = true;
|
||||
canControl = true;
|
||||
cameraMaxDist = 17;
|
||||
cameraOffset = 2;
|
||||
cameraLag = 8.5;
|
||||
explosion = LargeAirVehicleExplosion;
|
||||
explosionDamage = 0.5;
|
||||
explosionRadius = 5.0;
|
||||
|
||||
maxDamage = 3.50;
|
||||
destroyedLevel = 3.50;
|
||||
|
||||
isShielded = true;
|
||||
rechargeRate = 0.8;
|
||||
energyPerDamagePoint = 200;
|
||||
maxEnergy = 550;
|
||||
minDrag = 100; // Linear Drag
|
||||
rotationalDrag = 2700; // Anguler Drag
|
||||
|
||||
// Auto stabilize speed
|
||||
maxAutoSpeed = 20;
|
||||
autoAngularForce = 3000; // Angular stabilizer force
|
||||
autoLinearForce = 450; // Linear stabilzer force
|
||||
autoInputDamping = 0.95; //
|
||||
|
||||
// Maneuvering
|
||||
maxSteeringAngle = 4;
|
||||
horizontalSurfaceForce = 10; // Horizontal center "wing"
|
||||
verticalSurfaceForce = 10; // Vertical center "wing"
|
||||
maneuveringForce = 12000; // Horizontal jets
|
||||
steeringForce = 3000; // Steering jets
|
||||
steeringRollForce = 600; // Steering jets
|
||||
rollForce = 12; // Auto-roll
|
||||
hoverHeight = 3; // Height off the ground at rest
|
||||
createHoverHeight = 6; // Height off the ground when created
|
||||
maxForwardSpeed = 1000; // speed in which forward thrust force is no longer applied (meters/second)
|
||||
|
||||
// Turbo Jet
|
||||
jetForce = 24000;
|
||||
minJetEnergy = 55;
|
||||
jetEnergyDrain = 0.1;
|
||||
vertThrustMultiple = 4.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 = 550;
|
||||
bodyFriction = 0;
|
||||
bodyRestitution = 0.3;
|
||||
minRollSpeed = 0;
|
||||
softImpactSpeed = 12; // Sound hooks. This is the soft hit.
|
||||
hardImpactSpeed = 15; // Sound hooks. This is the hard hit.
|
||||
|
||||
// Ground Impact Damage (uses DamageType::Ground)
|
||||
minImpactSpeed = 125; // If hit ground at speed above this then it's an impact. Meters/second
|
||||
speedDamageScale = 0.060;
|
||||
|
||||
// Object Impact Damage (uses DamageType::Impact)
|
||||
collDamageThresholdVel = 128;
|
||||
collDamageMultiplier = 0.020;
|
||||
|
||||
//
|
||||
minTrailSpeed = 0.1;
|
||||
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 = 'Super Havoc';
|
||||
targetTypeTag = 'Heavy Transport';
|
||||
sensorData = VehiclePulseSensor;
|
||||
|
||||
checkRadius = 7.8115;
|
||||
observeParameters = "1 15 15";
|
||||
|
||||
stuckTimerTicks = 32; // If the hapc spends more than 1 sec in contact with something
|
||||
stuckTimerAngle = 80; // with a > 80 deg. pitch, BOOM!
|
||||
|
||||
shieldEffectScale = "1.0 0.9375 0.45";
|
||||
};
|
||||
|
||||
function SuperHAPCFlyer::hasDismountOverrides(%data, %obj)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
function SuperHAPCFlyer::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";
|
||||
}
|
||||
}
|
||||
146
scripts/vehicles/vehicle_superWildcat.cs
Normal file
146
scripts/vehicles/vehicle_superWildcat.cs
Normal file
|
|
@ -0,0 +1,146 @@
|
|||
//**************************************************************
|
||||
// SUPER WILDCAT GRAV CYCLE
|
||||
//**************************************************************
|
||||
|
||||
//**************************************************************
|
||||
// VEHICLE CHARACTERISTICS
|
||||
//**************************************************************
|
||||
|
||||
datablock HoverVehicleData(SuperScoutVehicle) : 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 = 1.60;
|
||||
destroyedLevel = 1.60;
|
||||
|
||||
isShielded = true;
|
||||
rechargeRate = 0.9;
|
||||
energyPerDamagePoint = 1;
|
||||
maxEnergy = 450;
|
||||
minJetEnergy = 1;
|
||||
jetEnergyDrain = 0.1;
|
||||
|
||||
// Rigid Body
|
||||
mass = 400;
|
||||
bodyFriction = 0.1;
|
||||
bodyRestitution = 0.5;
|
||||
softImpactSpeed = 120; // Play SoftImpact Sound
|
||||
hardImpactSpeed = 128; // Play HardImpact Sound
|
||||
|
||||
// Ground Impact Damage (uses DamageType::Ground)
|
||||
minImpactSpeed = 129;
|
||||
speedDamageScale = 0.010;
|
||||
|
||||
// Object Impact Damage (uses DamageType::Impact)
|
||||
collDamageThresholdVel = 123;
|
||||
collDamageMultiplier = 0.030;
|
||||
|
||||
dragForce = 45 / 45.0;
|
||||
vertFactor = 0.0;
|
||||
floatingThrustFactor = 0.35;
|
||||
|
||||
mainThrustForce = 90;
|
||||
reverseThrustForce = 90;
|
||||
strafeThrustForce = 90;
|
||||
turboFactor = 3.5;
|
||||
|
||||
brakingForce = 90;
|
||||
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 = 30.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 = 'Super 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";
|
||||
};
|
||||
686
scripts/vehicles/vehicle_tank.cs
Normal file
686
scripts/vehicles/vehicle_tank.cs
Normal file
|
|
@ -0,0 +1,686 @@
|
|||
//**************************************************************
|
||||
// BEOWULF ASSAULT VEHICLE
|
||||
//**************************************************************
|
||||
//**************************************************************
|
||||
// SOUNDS
|
||||
//**************************************************************
|
||||
datablock EffectProfile(AssaultVehicleEngineEffect)
|
||||
{
|
||||
effectname = "vehicles/tank_engine";
|
||||
minDistance = 5.0;
|
||||
maxDistance = 10.0;
|
||||
};
|
||||
|
||||
datablock EffectProfile(AssaultVehicleThrustEffect)
|
||||
{
|
||||
effectname = "vehicles/tank_boost";
|
||||
minDistance = 5.0;
|
||||
maxDistance = 10.0;
|
||||
};
|
||||
|
||||
datablock EffectProfile(AssaultTurretActivateEffect)
|
||||
{
|
||||
effectname = "vehicles/tank_activate";
|
||||
minDistance = 5.0;
|
||||
maxDistance = 10.0;
|
||||
};
|
||||
|
||||
datablock EffectProfile(AssaultMortarDryFireEffect)
|
||||
{
|
||||
effectname = "weapons/mortar_dryfire";
|
||||
minDistance = 5.0;
|
||||
maxDistance = 10.0;
|
||||
};
|
||||
|
||||
datablock EffectProfile(AssaultMortarFireEffect)
|
||||
{
|
||||
effectname = "vehicles/tank_mortar_fire";
|
||||
minDistance = 5.0;
|
||||
maxDistance = 10.0;
|
||||
};
|
||||
|
||||
datablock EffectProfile(AssaultMortarReloadEffect)
|
||||
{
|
||||
effectname = "weapons/mortar_reload";
|
||||
minDistance = 5.0;
|
||||
maxDistance = 10.0;
|
||||
};
|
||||
|
||||
datablock EffectProfile(AssaultChaingunFireEffect)
|
||||
{
|
||||
effectname = "weapons/chaingun_fire";
|
||||
minDistance = 5.0;
|
||||
maxDistance = 10.0;
|
||||
};
|
||||
|
||||
datablock AudioProfile(AssaultVehicleSkid)
|
||||
{
|
||||
filename = "fx/vehicles/tank_skid.wav";
|
||||
description = ClosestLooping3d;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
datablock AudioProfile(AssaultVehicleEngineSound)
|
||||
{
|
||||
filename = "fx/vehicles/tank_engine.wav";
|
||||
description = AudioDefaultLooping3d;
|
||||
preload = true;
|
||||
effect = AssaultVehicleEngineEffect;
|
||||
};
|
||||
|
||||
datablock AudioProfile(AssaultVehicleThrustSound)
|
||||
{
|
||||
filename = "fx/vehicles/tank_boost.wav";
|
||||
description = AudioDefaultLooping3d;
|
||||
preload = true;
|
||||
effect = AssaultVehicleThrustEffect;
|
||||
};
|
||||
|
||||
datablock AudioProfile(AssaultChaingunFireSound)
|
||||
{
|
||||
filename = "fx/vehicles/tank_chaingun.wav";
|
||||
description = AudioDefaultLooping3d;
|
||||
preload = true;
|
||||
effect = AssaultChaingunFireEffect;
|
||||
};
|
||||
|
||||
datablock AudioProfile(AssaultChaingunReloadSound)
|
||||
{
|
||||
filename = "fx/weapons/chaingun_dryfire.wav";
|
||||
description = AudioClose3d;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
datablock AudioProfile(TankChaingunProjectile)
|
||||
{
|
||||
filename = "fx/weapons/chaingun_projectile.wav";
|
||||
description = ProjectileLooping3d;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
datablock AudioProfile(AssaultTurretActivateSound)
|
||||
{
|
||||
filename = "fx/vehicles/tank_activate.wav";
|
||||
description = AudioClose3d;
|
||||
preload = true;
|
||||
effect = AssaultTurretActivateEffect;
|
||||
};
|
||||
|
||||
datablock AudioProfile(AssaultChaingunDryFireSound)
|
||||
{
|
||||
filename = "fx/weapons/chaingun_dryfire.wav";
|
||||
description = AudioClose3d;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
datablock AudioProfile(AssaultChaingunIdleSound)
|
||||
{
|
||||
filename = "fx/misc/diagnostic_on.wav";
|
||||
description = ClosestLooping3d;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
datablock AudioProfile(AssaultMortarDryFireSound)
|
||||
{
|
||||
filename = "fx/weapons/mortar_dryfire.wav";
|
||||
description = AudioClose3d;
|
||||
preload = true;
|
||||
effect = AssaultMortarDryFireEffect;
|
||||
};
|
||||
|
||||
datablock AudioProfile(AssaultMortarFireSound)
|
||||
{
|
||||
filename = "fx/vehicles/tank_mortar_fire.wav";
|
||||
description = AudioClose3d;
|
||||
preload = true;
|
||||
effect = AssaultMortarFireEffect;
|
||||
};
|
||||
|
||||
datablock AudioProfile(AssaultMortarReloadSound)
|
||||
{
|
||||
filename = "fx/weapons/mortar_reload.wav";
|
||||
description = AudioClose3d;
|
||||
preload = true;
|
||||
effect = AssaultMortarReloadEffect;
|
||||
};
|
||||
|
||||
datablock AudioProfile(AssaultMortarIdleSound)
|
||||
{
|
||||
filename = "fx/misc/diagnostic_on.wav";
|
||||
description = ClosestLooping3d;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
//**************************************************************
|
||||
// LIGHTS
|
||||
//**************************************************************
|
||||
datablock RunningLightData(TankLight1)
|
||||
{
|
||||
radius = 1.5;
|
||||
color = "1.0 1.0 1.0 0.2";
|
||||
nodeName = "Headlight_node01";
|
||||
direction = "0.0 1.0 0.0";
|
||||
texture = "special/headlight4";
|
||||
};
|
||||
|
||||
datablock RunningLightData(TankLight2)
|
||||
{
|
||||
radius = 1.5;
|
||||
color = "1.0 1.0 1.0 0.2";
|
||||
nodeName = "Headlight_node02";
|
||||
direction = "0.0 1.0 0.0";
|
||||
texture = "special/headlight4";
|
||||
};
|
||||
|
||||
datablock RunningLightData(TankLight3)
|
||||
{
|
||||
radius = 1.5;
|
||||
color = "1.0 1.0 1.0 0.2";
|
||||
nodeName = "Headlight_node03";
|
||||
direction = "0.0 1.0 0.0";
|
||||
texture = "special/headlight4";
|
||||
};
|
||||
|
||||
datablock RunningLightData(TankLight4)
|
||||
{
|
||||
radius = 1.5;
|
||||
color = "1.0 1.0 1.0 0.2";
|
||||
nodeName = "Headlight_node04";
|
||||
direction = "0.0 1.0 0.0";
|
||||
texture = "special/headlight4";
|
||||
};
|
||||
|
||||
//**************************************************************
|
||||
// VEHICLE CHARACTERISTICS
|
||||
//**************************************************************
|
||||
|
||||
datablock HoverVehicleData(AssaultVehicle) : 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;
|
||||
mountPose[1] = sitting;
|
||||
numMountPoints = 2;
|
||||
isProtectedMountPoint[0] = true;
|
||||
isProtectedMountPoint[1] = 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 = true;
|
||||
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 = 'Beowulf';
|
||||
targetTypeTag = 'Assault Tank';
|
||||
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;
|
||||
};
|
||||
|
||||
//**************************************************************
|
||||
// WEAPONS
|
||||
//**************************************************************
|
||||
|
||||
//-------------------------------------
|
||||
// ASSAULT CHAINGUN (projectile)
|
||||
//-------------------------------------
|
||||
|
||||
datablock TracerProjectileData(AssaultChaingunBullet)
|
||||
{
|
||||
doDynamicClientHits = true;
|
||||
|
||||
projectileShapeName = "";
|
||||
directDamage = 0.16;
|
||||
directDamageType = $DamageType::TankChaingun;
|
||||
hasDamageRadius = false;
|
||||
splash = ChaingunSplash;
|
||||
|
||||
kickbackstrength = 0.0;
|
||||
sound = TankChaingunProjectile;
|
||||
|
||||
dryVelocity = 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 = 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 = 0.10;
|
||||
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;
|
||||
|
||||
activateDelayMS = 100;
|
||||
|
||||
explosion = ChaingunExplosion;
|
||||
};
|
||||
|
||||
//-------------------------------------
|
||||
// ASSAULT CHAINGUN CHARACTERISTICS
|
||||
//-------------------------------------
|
||||
|
||||
datablock TurretData(AssaultPlasmaTurret) : TurretDamageProfile
|
||||
{
|
||||
className = VehicleTurret;
|
||||
catagory = "Turrets";
|
||||
shapeFile = "Turret_tank_base.dts";
|
||||
preload = true;
|
||||
canControl = true;
|
||||
cmdCategory = "Tactical";
|
||||
cmdIcon = CMDGroundTankIcon;
|
||||
cmdMiniIconName = "commander/MiniIcons/com_tank_grey";
|
||||
targetNameTag = 'Beowulf';
|
||||
targetTypeTag = 'Assault Tank turret';
|
||||
mass = 1.0; // Not really relevant
|
||||
|
||||
maxEnergy = 1;
|
||||
maxDamage = AssaultVehicle.maxDamage;
|
||||
destroyedLevel = AssaultVehicle.destroyedLevel;
|
||||
repairRate = 0;
|
||||
|
||||
// capacitor
|
||||
maxCapacitorEnergy = 250;
|
||||
capacitorRechargeRate = 1.0;
|
||||
|
||||
thetaMin = 0;
|
||||
thetaMax = 100;
|
||||
|
||||
inheritEnergyFromMount = true;
|
||||
firstPersonOnly = true;
|
||||
useEyePoint = true;
|
||||
numWeapons = 2;
|
||||
|
||||
cameraDefaultFov = 90.0;
|
||||
cameraMinFov = 5.0;
|
||||
cameraMaxFov = 120.0;
|
||||
|
||||
targetNameTag = 'Beowulf Chaingun';
|
||||
targetTypeTag = 'Turret';
|
||||
};
|
||||
|
||||
datablock TurretImageData(AssaultPlasmaTurretBarrel)
|
||||
{
|
||||
shapeFile = "turret_tank_barrelchain.dts";
|
||||
mountPoint = 1;
|
||||
|
||||
projectile = AssaultChaingunBullet;
|
||||
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 = 12.0 / 1000.0;
|
||||
|
||||
useCapacitor = true;
|
||||
usesEnergy = true;
|
||||
useMountEnergy = true;
|
||||
fireEnergy = 7.5;
|
||||
minEnergy = 15.0;
|
||||
|
||||
// Turret parameters
|
||||
activationMS = 4000;
|
||||
deactivateDelayMS = 500;
|
||||
thinkTimeMS = 200;
|
||||
degPerSecTheta = 360;
|
||||
degPerSecPhi = 360;
|
||||
attackRadius = 75;
|
||||
|
||||
// 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] = 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] = false;
|
||||
stateSound[3] = AssaultChaingunFireSound;
|
||||
stateScript[3] = "onFire";
|
||||
stateTimeoutValue[3] = 0.1;
|
||||
stateTransitionOnTimeout[3] = "Fire";
|
||||
stateTransitionOnTriggerUp[3] = "Reload";
|
||||
stateTransitionOnNoAmmo[3] = "noAmmo";
|
||||
|
||||
stateName[4] = "Reload";
|
||||
stateSequence[4] = "Reload";
|
||||
stateTimeoutValue[4] = 0.1;
|
||||
stateAllowImageChange[4] = false;
|
||||
stateTransitionOnTimeout[4] = "Ready";
|
||||
stateTransitionOnNoAmmo[4] = "NoAmmo";
|
||||
stateWaitForTimeout[4] = true;
|
||||
|
||||
stateName[5] = "Deactivate";
|
||||
stateSequence[5] = "Activate";
|
||||
stateDirection[5] = false;
|
||||
stateTimeoutValue[5] = 30;
|
||||
stateTransitionOnTimeout[5] = "ActivateReady";
|
||||
|
||||
stateName[6] = "Dead";
|
||||
stateTransitionOnLoaded[6] = "ActivateReady";
|
||||
stateTransitionOnTriggerDown[6] = "DryFire";
|
||||
|
||||
stateName[7] = "DryFire";
|
||||
stateSound[7] = AssaultChaingunDryFireSound;
|
||||
stateTimeoutValue[7] = 0.5;
|
||||
stateTransitionOnTimeout[7] = "NoAmmo";
|
||||
|
||||
stateName[8] = "NoAmmo";
|
||||
stateTransitionOnAmmo[8] = "Reload";
|
||||
stateSequence[8] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[8] = "DryFire";
|
||||
|
||||
};
|
||||
|
||||
//-------------------------------------
|
||||
// ASSAULT MORTAR (projectile)
|
||||
//-------------------------------------
|
||||
|
||||
datablock ItemData(AssaultMortarAmmo)
|
||||
{
|
||||
className = Ammo;
|
||||
catagory = "Ammo";
|
||||
shapeFile = "repair_kit.dts";
|
||||
mass = 1;
|
||||
elasticity = 0.5;
|
||||
friction = 0.6;
|
||||
pickupRadius = 1;
|
||||
|
||||
computeCRC = true;
|
||||
};
|
||||
|
||||
datablock GrenadeProjectileData(AssaultMortar)
|
||||
{
|
||||
projectileShapeName = "mortar_projectile.dts";
|
||||
emitterDelay = -1;
|
||||
directDamage = 0.0;
|
||||
hasDamageRadius = true;
|
||||
indirectDamage = 1.0;
|
||||
damageRadius = 25.0;
|
||||
radiusDamageType = $DamageType::TankMortar;
|
||||
kickBackStrength = 2500;
|
||||
|
||||
sound = MortarProjectileSound;
|
||||
explosion = "MortarExplosion";
|
||||
velInheritFactor = 1.0;
|
||||
|
||||
baseEmitter = MortarSmokeEmitter;
|
||||
|
||||
grenadeElasticity = 0.0;
|
||||
grenadeFriction = 0.4;
|
||||
armingDelayMS = 250;
|
||||
muzzleVelocity = 65;
|
||||
drag = 0.1;
|
||||
|
||||
hasLight = true;
|
||||
lightRadius = 4;
|
||||
lightColor = "0.1 0.4 0.1";
|
||||
};
|
||||
|
||||
//-------------------------------------
|
||||
// ASSAULT MORTAR CHARACTERISTICS
|
||||
//-------------------------------------
|
||||
|
||||
datablock TurretImageData(AssaultMortarTurretBarrel)
|
||||
{
|
||||
shapeFile = "turret_tank_barrelmortar.dts";
|
||||
mountPoint = 0;
|
||||
|
||||
// ammo = AssaultMortarAmmo;
|
||||
projectile = AssaultMortar;
|
||||
projectileType = GrenadeProjectile;
|
||||
|
||||
usesEnergy = true;
|
||||
useMountEnergy = true;
|
||||
fireEnergy = 77.00;
|
||||
minEnergy = 77.00;
|
||||
useCapacitor = true;
|
||||
|
||||
// Turret parameters
|
||||
activationMS = 4000;
|
||||
deactivateDelayMS = 1500;
|
||||
thinkTimeMS = 200;
|
||||
degPerSecTheta = 360;
|
||||
degPerSecPhi = 360;
|
||||
attackRadius = 75;
|
||||
|
||||
// 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] = "Reload";
|
||||
stateTimeoutValue[3] = 1.0;
|
||||
stateFire[3] = true;
|
||||
stateRecoil[3] = LightRecoil;
|
||||
stateAllowImageChange[3] = false;
|
||||
stateSound[3] = AssaultMortarFireSound;
|
||||
stateScript[3] = "onFire";
|
||||
|
||||
stateName[4] = "Reload";
|
||||
stateSequence[4] = "Reload";
|
||||
stateTimeoutValue[4] = 1.0;
|
||||
stateAllowImageChange[4] = false;
|
||||
stateTransitionOnTimeout[4] = "Ready";
|
||||
//stateTransitionOnNoAmmo[4] = "NoAmmo";
|
||||
stateWaitForTimeout[4] = true;
|
||||
|
||||
stateName[5] = "Deactivate";
|
||||
stateDirection[5] = false;
|
||||
stateSequence[5] = "Activate";
|
||||
stateTimeoutValue[5] = 1.0;
|
||||
stateTransitionOnLoaded[5] = "ActivateReady";
|
||||
stateTransitionOnTimeout[5] = "Dead";
|
||||
|
||||
stateName[6] = "Dead";
|
||||
stateTransitionOnLoaded[6] = "ActivateReady";
|
||||
stateTransitionOnTriggerDown[6] = "DryFire";
|
||||
|
||||
stateName[7] = "DryFire";
|
||||
stateSound[7] = AssaultMortarDryFireSound;
|
||||
stateTimeoutValue[7] = 1.0;
|
||||
stateTransitionOnTimeout[7] = "NoAmmo";
|
||||
|
||||
stateName[8] = "NoAmmo";
|
||||
stateSequence[8] = "NoAmmo";
|
||||
stateTransitionOnAmmo[8] = "Reload";
|
||||
stateTransitionOnTriggerDown[8] = "DryFire";
|
||||
};
|
||||
|
||||
datablock TurretImageData(AssaultTurretParam)
|
||||
{
|
||||
mountPoint = 2;
|
||||
shapeFile = "turret_muzzlepoint.dts";
|
||||
|
||||
projectile = AssaultChaingunBullet;
|
||||
projectileType = TracerProjectile;
|
||||
|
||||
useCapacitor = true;
|
||||
usesEnergy = true;
|
||||
|
||||
// Turret parameters
|
||||
activationMS = 1000;
|
||||
deactivateDelayMS = 1500;
|
||||
thinkTimeMS = 200;
|
||||
degPerSecTheta = 500;
|
||||
degPerSecPhi = 500;
|
||||
|
||||
attackRadius = 75;
|
||||
};
|
||||
|
||||
|
||||
|
||||
222
scripts/vehicles/vehicle_wildcat.cs
Normal file
222
scripts/vehicles/vehicle_wildcat.cs
Normal file
|
|
@ -0,0 +1,222 @@
|
|||
//**************************************************************
|
||||
// WILDCAT GRAV CYCLE
|
||||
//**************************************************************
|
||||
//**************************************************************
|
||||
// SOUNDS
|
||||
//**************************************************************
|
||||
datablock EffectProfile(ScoutEngineEffect)
|
||||
{
|
||||
effectname = "vehicles/outrider_engine";
|
||||
minDistance = 5.0;
|
||||
maxDistance = 10.0;
|
||||
};
|
||||
|
||||
datablock EffectProfile(ScoutThrustEffect)
|
||||
{
|
||||
effectname = "vehicles/outrider_boost";
|
||||
minDistance = 5.0;
|
||||
maxDistance = 10.0;
|
||||
};
|
||||
|
||||
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;
|
||||
effect = ScoutEngineEffect;
|
||||
};
|
||||
|
||||
datablock AudioProfile(ScoutThrustSound)
|
||||
{
|
||||
filename = "fx/vehicles/outrider_boost.wav";
|
||||
description = AudioDefaultLooping3d;
|
||||
preload = true;
|
||||
effect = ScoutThrustEffect;
|
||||
};
|
||||
|
||||
//**************************************************************
|
||||
// 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
|
||||
//**************************************************************
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue