mirror of
https://github.com/mostlikely4r/construction-mod.git
synced 2026-07-11 14:34:34 +00:00
Initial commit
This commit is contained in:
parent
d305f694ac
commit
cbb5d08a0c
128 changed files with 82385 additions and 0 deletions
795
scripts/MPM/MPM.cs
Normal file
795
scripts/MPM/MPM.cs
Normal file
|
|
@ -0,0 +1,795 @@
|
|||
|
||||
|
||||
|
||||
|
||||
datablock ParticleData(MpmFlareParticle1)
|
||||
{
|
||||
dragCoeffiecient = 0.0;
|
||||
gravityCoefficient = 0.0;
|
||||
inheritedVelFactor = 1.0;
|
||||
|
||||
lifetimeMS = 500;
|
||||
lifetimeVarianceMS = 0;
|
||||
|
||||
spinRandomMin = 0.0;
|
||||
spinRandomMax = 0.0;
|
||||
windcoefficient = 0;
|
||||
textureName = "skins/jetflare03";
|
||||
|
||||
colors[0] = "0.7 0.7 1.0 0.5";
|
||||
colors[1] = "0.7 0.7 1.0 0.5";
|
||||
colors[2] = "0.7 0.7 1.0 0.5";
|
||||
colors[3] = "0.7 0.7 1.0 0.5";
|
||||
|
||||
sizes[0] = 50;
|
||||
sizes[1] = 50;
|
||||
sizes[2] = 50;
|
||||
sizes[3] = 50;
|
||||
|
||||
times[0] = 0.25;
|
||||
times[1] = 0.25;
|
||||
times[2] = 0.25;
|
||||
times[3] = 1;
|
||||
|
||||
};
|
||||
|
||||
datablock ParticleData(MpmFlareParticle3)
|
||||
{
|
||||
dragCoeffiecient = 0.0;
|
||||
gravityCoefficient = 0.0;
|
||||
inheritedVelFactor = 1.0;
|
||||
|
||||
lifetimeMS = 1000;
|
||||
lifetimeVarianceMS = 0;
|
||||
|
||||
spinRandomMin = 0.0;
|
||||
spinRandomMax = 0.0;
|
||||
windcoefficient = 0;
|
||||
textureName = "skins/jetflare03";
|
||||
|
||||
colors[0] = "0.7 0.7 1.0 0.5";
|
||||
colors[1] = "0.7 0.7 1.0 0.5";
|
||||
colors[2] = "0.7 0.7 1.0 0.5";
|
||||
colors[3] = "0.7 0.7 1.0 0.5";
|
||||
|
||||
sizes[0] = 50;
|
||||
sizes[1] = 50;
|
||||
sizes[2] = 50;
|
||||
sizes[3] = 50;
|
||||
|
||||
times[0] = 0.0;
|
||||
times[1] = 0.25;
|
||||
times[2] = 0.5;
|
||||
times[3] = 0.75;
|
||||
|
||||
};
|
||||
|
||||
datablock ParticleData(MpmFlareParticle2):MpmFlareParticle1
|
||||
{
|
||||
textureName = "skins/jetpackflare_bio";
|
||||
useInvAlpha = 0;
|
||||
lifetimeMS = 2500;
|
||||
spinRandomMin = -360.0;
|
||||
spinRandomMax = 360.0;
|
||||
sizes[0] = 15;
|
||||
sizes[1] = 15;
|
||||
sizes[2] = 15;
|
||||
sizes[3] = 15;
|
||||
};
|
||||
|
||||
datablock ParticleData(MpmJetSmoke1)
|
||||
{
|
||||
dragCoeffiecient = 0.0;
|
||||
gravityCoefficient = 0.0;
|
||||
inheritedVelFactor = 0.0;
|
||||
|
||||
lifetimeMS = 60000;
|
||||
lifetimeVarianceMS = 0;
|
||||
|
||||
spinRandomMin = 0.0;
|
||||
spinRandomMax = 0.0;
|
||||
windcoefficient = 0.5;
|
||||
textureName = "skins/jetflare2";
|
||||
|
||||
colors[0] = "0.8 0.8 0.8 1";
|
||||
colors[1] = "0.8 0.8 0 0.9";
|
||||
colors[2] = "0.8 0.8 0.8 0.5";
|
||||
colors[3] = "0.8 0.8 0.8 0.0";
|
||||
|
||||
sizes[0] = 5;
|
||||
sizes[1] = 17;
|
||||
sizes[2] = 18;
|
||||
sizes[3] = 20;
|
||||
|
||||
times[0] = 0;
|
||||
times[1] = 0.25;
|
||||
times[2] = 0.5;
|
||||
times[3] = 0.75;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
datablock ParticleData(MpmJetSmoke2):MpmJetSmoke1
|
||||
{
|
||||
|
||||
dragCoeffiecient = 0.0;
|
||||
gravityCoefficient = 0.0;
|
||||
inheritedVelFactor = 0.0;
|
||||
|
||||
lifetimeMS = 60000;
|
||||
lifetimeVarianceMS = 0;
|
||||
|
||||
spinRandomMin = 0.0;
|
||||
spinRandomMax = 0.0;
|
||||
windcoefficient = 0.5;
|
||||
textureName = "skins/jetflare2";
|
||||
|
||||
colors[0] = "0.8 0.8 0.8 1";
|
||||
colors[1] = "0.8 0.8 0 0.9";
|
||||
colors[2] = "0.8 0.8 0.8 0.5";
|
||||
colors[3] = "0.8 0.8 0.8 0.0";
|
||||
|
||||
sizes[0] = 5;
|
||||
sizes[1] = 17;
|
||||
sizes[2] = 18;
|
||||
sizes[3] = 20;
|
||||
|
||||
times[0] = 0;
|
||||
times[1] = 0.25;
|
||||
times[2] = 0.5;
|
||||
times[3] = 0.75;
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
datablock ParticleEmitterData(MpmFlareEmitter1)
|
||||
{
|
||||
lifetimeMS = 10;
|
||||
ejectionPeriodMS = 100;
|
||||
periodVarianceMS = 0;
|
||||
|
||||
ejectionVelocity = 0.1;
|
||||
velocityVariance = 0.0;
|
||||
ejectionoffset = 5;
|
||||
thetaMin = 0.0;
|
||||
thetaMax = 0.0;
|
||||
|
||||
|
||||
orientParticles = false;
|
||||
orientOnVelocity = false;
|
||||
|
||||
particles = "MpmFlareParticle1";
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(MpmFlareEmitter2):MpmFlareEmitter1
|
||||
{
|
||||
particles = "MpmFlareParticle2";
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(MpmJetEmitter1)
|
||||
{
|
||||
lifetimeMS = 10;
|
||||
ejectionPeriodMS = 10;
|
||||
periodVarianceMS = 0;
|
||||
|
||||
ejectionVelocity = 10.0;
|
||||
velocityVariance = 1.0;
|
||||
ejectionoffset = 0;
|
||||
thetaMin = 0.0;
|
||||
thetaMax = 5.0;
|
||||
|
||||
|
||||
orientParticles = false;
|
||||
orientOnVelocity = false;
|
||||
|
||||
particles = "MpmJetSmoke1";
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(MpmJetEmitter2):MpmJetEmitter1
|
||||
{
|
||||
ejectionPeriodMS = 10;
|
||||
particles = "MpmJetSmoke2";
|
||||
thetaMin = 0.0;
|
||||
thetaMax = 1.5;
|
||||
};
|
||||
|
||||
|
||||
datablock ParticleEmitterData(MpmJetEmitter3):MpmJetEmitter1
|
||||
{
|
||||
ejectionPeriodMS = 30;
|
||||
ejectionVelocity = 4.0;
|
||||
velocityVariance = 1.0;
|
||||
particles = "MpmFlareParticle2";
|
||||
ejectionoffset = 10;
|
||||
thetaMin = 0.0;
|
||||
thetaMax = 360.0;
|
||||
|
||||
};
|
||||
|
||||
datablock TracerProjectileData(Mpm_G_PR) {
|
||||
className = "TracerProjectileData";
|
||||
emitterDelay = "-1";
|
||||
velInheritFactor = "0";
|
||||
directDamage = "0";
|
||||
hasDamageRadius = "0";
|
||||
indirectDamage = "0";
|
||||
damageRadius = "0";
|
||||
radiusDamageType = "0";
|
||||
kickBackStrength = "0";
|
||||
Explosion = "TurretExplosion";
|
||||
hasLight = "0";
|
||||
lightRadius = "1";
|
||||
lightColor = "1.000000 1.000000 1.000000 1.000000";
|
||||
hasLightUnderwaterColor = "0";
|
||||
underWaterLightColor = "1.000000 1.000000 1.000000 1.000000";
|
||||
explodeOnWaterImpact = "0";
|
||||
depthTolerance = "5";
|
||||
bubbleEmitTime = "0.5";
|
||||
faceViewer = "0";
|
||||
scale = "1 1 1";
|
||||
dryVelocity = "0.1";
|
||||
wetVelocity = "0.1";
|
||||
fizzleTimeMS = "32";
|
||||
lifetimeMS = "32";
|
||||
explodeOnDeath = "1";
|
||||
reflectOnWaterImpactAngle = "0";
|
||||
deflectionOnWaterImpact = "0";
|
||||
fizzleUnderwaterMS = "-1";
|
||||
activateDelayMS = "-1";
|
||||
doDynamicClientHits = "0";
|
||||
tracerLength = "1";
|
||||
tracerMinPixels = "1";
|
||||
tracerAlpha = "0";
|
||||
tracerColor = "0.000000 0.000000 0.000000 0.000000";
|
||||
tracerTex[0] = "special/tracer00";
|
||||
tracerTex[1] = "special/tracercross";
|
||||
tracerWidth = "0.1";
|
||||
crossViewAng = "0.99";
|
||||
crossSize = "0.1";
|
||||
renderCross = "0";
|
||||
isFXUnit = "1";
|
||||
};
|
||||
|
||||
|
||||
|
||||
datablock SeekerProjectileData(MpmMissile1)
|
||||
{
|
||||
heatSignature = 1;
|
||||
sensorData = DeployedOutdoorTurretSensor;
|
||||
casingShapeName = "weapon_missile_casement.dts";
|
||||
projectileShapeName = "bomb.dts";
|
||||
hasDamageRadius = false;
|
||||
indirectDamage = 0;
|
||||
damageRadius = 0;
|
||||
radiusDamageType = $DamageType::Missile;
|
||||
kickBackStrength = 20000;
|
||||
|
||||
explosion = "GrenadeExplosion";
|
||||
splash = MissileSplash;
|
||||
velInheritFactor = 1.0; // to compensate for slow starting velocity, this value
|
||||
// is cranked up to full so the missile doesn't start
|
||||
// out behind the player when the player is moving
|
||||
// very quickly - bramage
|
||||
|
||||
baseEmitter = MpmJetEmitter1;
|
||||
delayEmitter = MpmFlareEmitter1;
|
||||
puffEmitter = MissilePuffEmitter;
|
||||
bubbleEmitter = GrenadeBubbleEmitter;
|
||||
bubbleEmitTime = 1.0;
|
||||
|
||||
exhaustEmitter = MissileLauncherExhaustEmitter;
|
||||
exhaustTimeMs = 300;
|
||||
exhaustNodeName = "muzzlePoint1";
|
||||
|
||||
lifetimeMS = -1;
|
||||
muzzleVelocity = 0.1;
|
||||
maxVelocity = 8000;
|
||||
turningSpeed = 0.0;
|
||||
acceleration = 1;
|
||||
scale = "1 1 1";
|
||||
proximityRadius = 3;
|
||||
|
||||
terrainAvoidanceSpeed = 180;
|
||||
terrainScanAhead = 25;
|
||||
terrainHeightFail = 12;
|
||||
terrainAvoidanceRadius = 100;
|
||||
|
||||
flareDistance = 0;
|
||||
flareAngle = 0;
|
||||
|
||||
sound = HAPCFlyerThrustSound;
|
||||
//BomberFlyerThrustSound;
|
||||
explodeOnDeath = "1";
|
||||
hasLight = true;
|
||||
lightRadius = 10.0;
|
||||
lightColor = "1 1 0";
|
||||
|
||||
useFlechette = false;
|
||||
flechetteDelayMs = 550;
|
||||
casingDeb = FlechetteDebris;
|
||||
|
||||
explodeOnWaterImpact = true;
|
||||
};
|
||||
|
||||
|
||||
|
||||
datablock GrenadeProjectileData(BoosterGrenade)
|
||||
{
|
||||
projectileShapeName = "grenade_projectile.dts";
|
||||
emitterDelay = -1;
|
||||
directDamage = 0.0;
|
||||
hasDamageRadius = true;
|
||||
indirectDamage = 0.1;
|
||||
damageRadius = 0.1;
|
||||
radiusDamageType = $DamageType::Grenade;
|
||||
kickBackStrength = 1500;
|
||||
bubbleEmitTime = 1.0;
|
||||
|
||||
sound = GrenadeProjectileSound;
|
||||
explosion = "GrenadeExplosion";
|
||||
underwaterExplosion = "UnderwaterGrenadeExplosion";
|
||||
velInheritFactor = 0.5;
|
||||
splash = GrenadeSplash;
|
||||
|
||||
//baseEmitter = //MpmJetEmitter2;
|
||||
bubbleEmitter = GrenadeBubbleEmitter;
|
||||
|
||||
grenadeElasticity = 0.35;
|
||||
grenadeFriction = 0.2;
|
||||
armingDelayMS = 250;
|
||||
muzzleVelocity = 10;
|
||||
drag = 0.1;
|
||||
};
|
||||
|
||||
|
||||
datablock SeekerProjectileData(MpmMissile2):MpmMissile1
|
||||
{
|
||||
directDamage = 0.0;
|
||||
hasDamageRadius = true;
|
||||
indirectDamage = 0.1;
|
||||
damageRadius = 0.1;
|
||||
|
||||
explosion = LargeAirVehicleExplosion;
|
||||
explosionDamage = 0.5;
|
||||
explosionRadius = 0.2;
|
||||
|
||||
muzzleVelocity = 0.1;
|
||||
maxVelocity = 80000;
|
||||
acceleration = 1;
|
||||
|
||||
projectileShapeName = "weapon_missile_casement.dts";
|
||||
baseEmitter = MpmJetEmitter2;
|
||||
delayEmitter = MpmFlareEmitter2;
|
||||
lifetimeMS = -1;
|
||||
sound = HAPCFlyerThrustSound;
|
||||
};
|
||||
|
||||
datablock SeekerProjectileData(MpmMissile3):MpmMissile2
|
||||
{
|
||||
lifetimeMS = -1;
|
||||
muzzleVelocity = 20; //5
|
||||
maxVelocity = 20;//80
|
||||
acceleration = 0; //1
|
||||
};
|
||||
|
||||
function MpmMissile1::onExplode(%data, %proj, %pos, %mod)
|
||||
{
|
||||
%proj.load.Explode(%proj,%pos);
|
||||
//parent::onExplode(%data,%proj,%pos,%mod);
|
||||
}
|
||||
|
||||
function Mpm_B_MIS::onExplode(%data, %proj, %pos, %mod)
|
||||
{
|
||||
%proj.load.Explode(%proj,%pos);
|
||||
//parent::onExplode(%data,%proj,%pos,%mod);
|
||||
}
|
||||
|
||||
function Mpm_B_MIS1::onExplode(%data, %proj, %pos, %mod)
|
||||
{
|
||||
%proj.load.Explode(%proj,%pos);
|
||||
//parent::onExplode(%data,%proj,%pos,%mod);
|
||||
}
|
||||
|
||||
function Mpm_B_MIS2::onExplode(%data, %proj, %pos, %mod)
|
||||
{
|
||||
//Anti missile missile :D
|
||||
//%proj.load.Explode(%proj,%pos);
|
||||
//parent::onExplode(%data,%proj,%pos,%mod);
|
||||
}
|
||||
|
||||
function Mpm_B_MIS3::onExplode(%data, %proj, %pos, %mod)
|
||||
{
|
||||
%proj.load.Explode(%proj,%pos);
|
||||
//parent::onExplode(%data,%proj,%pos,%mod);
|
||||
}
|
||||
|
||||
function Mpm_B_MIS4::onExplode(%data, %proj, %pos, %mod)
|
||||
{
|
||||
%proj.load.Explode(%proj,%pos);
|
||||
//parent::onExplode(%data,%proj,%pos,%mod);
|
||||
}
|
||||
|
||||
|
||||
function MpmMissile1::onCollision(%data, %projectile, %targetObject, %modifier, %position, %normal)
|
||||
{
|
||||
parent::onExplode(%data,%projectile,%position,%modifier);
|
||||
}
|
||||
|
||||
|
||||
function MpmMissile2::onExplode(%data, %proj, %pos, %mod)
|
||||
{
|
||||
|
||||
%speed = GetWords(%proj.predict(),3,5);
|
||||
%dir = VectorScale(%speed,1/BasicGrenade.muzzlevelocity);
|
||||
%p1 = new GrenadeProjectile()
|
||||
{
|
||||
dataBlock = BoosterGrenade;
|
||||
initialDirection = %dir;
|
||||
initialPosition = %pos;
|
||||
};
|
||||
%proj.delete();
|
||||
}
|
||||
|
||||
function MpmMissile3::onExplode(%data, %proj, %pos, %mod)
|
||||
{
|
||||
%speed = GetWords(%proj.predict(),3,5);
|
||||
%dir = VectorScale(%speed,1/BasicGrenade.muzzlevelocity);
|
||||
%p1 = new GrenadeProjectile()
|
||||
{
|
||||
dataBlock = BoosterGrenade;
|
||||
initialDirection = %dir;
|
||||
initialPosition = %pos;
|
||||
};
|
||||
%proj.delete();
|
||||
}
|
||||
|
||||
function SeekerProjectile::Predict(%p,%ttime)
|
||||
{
|
||||
%time = ((GetSimTime()+%ttime) - %p.createtime)/1000;
|
||||
%dat = %p.getDatablock();
|
||||
%startspeed = VectorScale(%p.InitialDirection,%dat.muzzleVelocity);
|
||||
if (%p.sourceObject)
|
||||
{
|
||||
%co1 = mAbs(VectorDot(%p.InitialDirection,VectorNormalize(%p.startVelocity)));
|
||||
%sourceSpeed = VectorScale(%p.startVelocity,%dat.velInheritFactor*%co1);
|
||||
//if (%p.speedmod == 1)
|
||||
%sourceSpeed = VectorAdd(%sourcespeed,VectorScale(VectorNormalize(%p.startVelocity),-0.5));
|
||||
%leng = mAbs(VectorDot(%p.InitialDirection,%p.startVelocity));
|
||||
%dir = VectorNormalize(%p.initialdirection);
|
||||
%sourceSpeedlen = VectorDot(%SourceSpeed,VectorNormalize(%p.initialDirection));
|
||||
}
|
||||
%speedaccel = Limit(%dat.acceleration*(%time-1),0,Limit(%dat.maxVelocity-(%dat.muzzleVelocity+%sourceSpeedlen),0));
|
||||
%accelVec = VectorScale(vectorNormalize(%p.InitialDirection),%speedaccel);
|
||||
|
||||
%Speed = VectorAdd(VectorAdd(%startspeed,%sourceSpeed),VectorAdd(%accelvec,%gravvec));
|
||||
|
||||
%distance1 = VectorScale(%startspeed,%time);
|
||||
%distance2 = VectorScale(%sourceSpeed,%time);
|
||||
|
||||
%distance3 = VectorScale(%accelvec,0.5*(%time));
|
||||
%distance = VectorAdd(VectorAdd(%p.initialPosition,%distance3),VectorAdd(%distance2,%distance1));
|
||||
|
||||
//if (!%p.speedmod)
|
||||
//%p.speedmod = 1;
|
||||
|
||||
//if (VectorDist(%distance,%p.getTransform())>4)
|
||||
//%p.speedmod *= -1;
|
||||
|
||||
if (getSimTime()-%p.lasttime>1000)
|
||||
%p.schedule(%ttime,"logerror",%distance);
|
||||
%distance=VectorAdd(%distance,VectorScale(%p.lasterror,-1));
|
||||
|
||||
return %distance SPC %speed;
|
||||
}
|
||||
|
||||
function testpred(%dir,%speed,%time)
|
||||
{
|
||||
%p = Launch_Mpm("0 0 110",%dir,%speed,%time*1000,mpmMissile1);
|
||||
for (%t=0;%t < %time;%t++)
|
||||
{
|
||||
%p.schedule(%t*1000,predict);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function putwp(%pos)
|
||||
{
|
||||
|
||||
%wp = new WayPoint() {
|
||||
position = %pos;
|
||||
rotation = "1 0 0 0";
|
||||
scale = "1 1 1";
|
||||
dataBlock = "WayPointMarker";
|
||||
team = 1;
|
||||
};
|
||||
%wp.schedule(5000,"delete");
|
||||
}
|
||||
|
||||
|
||||
function SeekerProjectile::logerror(%p,%distance)
|
||||
{
|
||||
%p.lasterror = VectorSub(%distance,%p.getTransform());
|
||||
%p.lasttime = (GetSimTime()-%p.createtime)/1000;
|
||||
}
|
||||
|
||||
|
||||
function ItemData::Stage1(%data,%p)
|
||||
{
|
||||
|
||||
if (IsObject(%p))
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
function ItemData::Stage2(%data,%p)
|
||||
{
|
||||
|
||||
if (IsObject(%p))
|
||||
{
|
||||
%start = GetWords(%p.traject,0,2);
|
||||
%up = GetWords(%p.traject,3,5);
|
||||
%loc = GetWord(%p.traject,6);
|
||||
%a = GetWord(%p.traject,7);
|
||||
%vector = GetWords(%p.traject,8,10);
|
||||
%time = GetWord(%p.traject,11);
|
||||
%stlevel = %p.getTransform();//VectorAdd(%start,VectorScale(%up,%loc));
|
||||
%stspeed = VectorScale(%up,%a);
|
||||
%missileblock = %p.load.missile;
|
||||
%p2 = Launch_Mpm(%stlevel,%vector,%stspeed,%time+50000,%missileblock);
|
||||
%p2.team = %p.team;
|
||||
%p2.source = %p.source;
|
||||
%p2.traject = %p.traject;
|
||||
%p2.load = %p.load;
|
||||
%p2.owner = %p.owner;
|
||||
%p2.s2time = %time;
|
||||
%p2.targetlocation = %p.targetlocation;
|
||||
%p2.stage2 = %p2.load.schedule(%time,"AtTarget",%p2);
|
||||
if (%p.owner.getControlObject() == %p.owner.comcam && %p.owner.moveprojectile = %p)
|
||||
obsproj(%p2,%p.owner);
|
||||
return %p2;
|
||||
}
|
||||
}
|
||||
|
||||
datablock ItemData(Mpm_Null_Load)
|
||||
{
|
||||
cost = 0;
|
||||
missile = Mpm_B_MIS1;
|
||||
name = "Null";
|
||||
friendly = 0;
|
||||
};
|
||||
|
||||
function testenemy(%pos,%dir,%speed,%time)
|
||||
{
|
||||
%p = Launch_Mpm(%pos,%dir,%speed,%time,MpmMissile1);
|
||||
%p.team = 0;
|
||||
%p.load = Mpm_Null_Load;
|
||||
%p.schedule(360000,"delete");
|
||||
}
|
||||
|
||||
function ItemData::AtTarget(%data,%p)
|
||||
{
|
||||
|
||||
if (IsObject(%p))
|
||||
{
|
||||
//do nothing
|
||||
}
|
||||
}
|
||||
|
||||
function ItemData::Explode(%data,%p,%pos)
|
||||
{
|
||||
|
||||
if (IsObject(%p))
|
||||
{
|
||||
if (IsObject(%data.vehicle))
|
||||
//if(VectorDist(%p.targetlocation,%pos)<50)
|
||||
Mpm_VE_Load0.AtTarget(%p);
|
||||
}
|
||||
}
|
||||
|
||||
function Mpm_Nuke_Load::Explode(%data,%p,%pos)
|
||||
{
|
||||
if (IsObject(%p))
|
||||
{
|
||||
BigFatNukeTarget(%pos);
|
||||
}
|
||||
}
|
||||
|
||||
function Mpm_Nuke2_Load::Explode(%data,%p,%pos)
|
||||
{
|
||||
if (IsObject(%p))
|
||||
{
|
||||
ShoulderNuclear.onExplode(%p, %pos);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function Mpm_Hole_Load::Explode(%data,%p,%pos)
|
||||
{
|
||||
if (IsObject(%p))
|
||||
{
|
||||
%mask = $TypeMasks::StaticShapeObjectType | $TypeMasks::ForceFieldObjectType | $TypeMasks::InteriorObjectType;
|
||||
%res = containerRayCast(%pos,"0 0 500",%mask, %p);
|
||||
if (%res)
|
||||
%inside = 1;
|
||||
dome(VectorAdd(%pos,"0 0" SPC (1-%inside)*200),60000,%inside);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function ItemData::InterCept(%data,%p)
|
||||
{
|
||||
if (IsObject(%p))
|
||||
{
|
||||
//Be suprised
|
||||
%p.delete();
|
||||
}
|
||||
}
|
||||
|
||||
function ItemData::Hazard(%data,%p,%obj,%radius)
|
||||
{
|
||||
if (%p.team != %obj.team)
|
||||
return 1;
|
||||
if (!%data.friendly && VectorDist(%p.targetlocation,%obj.getTransform())<%radius)
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
function PlayExplosion(%pos,%data,%dir)
|
||||
{
|
||||
if (%dir $= "")
|
||||
%dir = "0 0 1";
|
||||
if (IsObject(%data))
|
||||
{
|
||||
%p = new LinearProjectile()
|
||||
{
|
||||
dataBlock = %data;
|
||||
initialDirection = %dir;
|
||||
initialPosition = %pos;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function GrenadeProjectile::Predict(%p,%time)
|
||||
{
|
||||
//Todo: make this one
|
||||
}
|
||||
|
||||
|
||||
//Custon information functions (not used)
|
||||
function ListSpeed(%xlist,%tlist)
|
||||
{
|
||||
|
||||
if (GetWordCount(%xlist)<2)
|
||||
return "";
|
||||
for (%c=0;%c<GetWordCount(%xlist)-1;%c++)
|
||||
{
|
||||
%dx = GetWord(%xlist,%c+1)-GetWord(%xlist,%c);
|
||||
%dt = GetWord(%tlist,%c+1)-GetWord(%tlist,%c);
|
||||
if (%dx == 0 || %dt == 0)
|
||||
%slist = %slist SPC 0;
|
||||
else
|
||||
%slist = %slist SPC %dx/%dt;
|
||||
}
|
||||
return trim(%slist);
|
||||
}
|
||||
|
||||
function ListShift(%list)
|
||||
{
|
||||
if (GetWordCount(%list)<2)
|
||||
return 0;
|
||||
for (%c=0;%c<GetWordCount(%list)-1;%c++)
|
||||
{
|
||||
%mid = (GetWord(%list,%c+1)+GetWord(%list,%c))/2;
|
||||
%nlist = %nlist SPC %mid;
|
||||
}
|
||||
return trim(%nlist);
|
||||
}
|
||||
|
||||
function ListMean(%list)
|
||||
{
|
||||
if (GetWordCount(%list)<1)
|
||||
return "";
|
||||
for (%c=0;%c<GetWordCount(%list);%c++)
|
||||
{
|
||||
%mean+= GetWord(%list,%c);
|
||||
}
|
||||
return %mean/GetWordCount(%list);
|
||||
}
|
||||
|
||||
function ListSub(%list1,%list2)
|
||||
{
|
||||
if (GetWordCount(%list1)<1)
|
||||
return "";
|
||||
for (%c=0;%c<GetWordCount(%list1);%c++)
|
||||
{
|
||||
%mid = GetWord(%list1,%c)-GetWord(%list2,%c);
|
||||
%nlist = %nlist SPC %mid;
|
||||
}
|
||||
return trim(%nlist);
|
||||
}
|
||||
|
||||
function mechanics(%vec)
|
||||
{
|
||||
|
||||
%nrm = VectorNormalize(%vec);
|
||||
%p = Launch_Mpm("0 0 110",%nrm ,"0 0 10",12000,"mpmMissile1");
|
||||
%p.vec = %vec;
|
||||
%p.st = getSimTime();
|
||||
for (%i=0;%i<10;%i++)
|
||||
schedule(%i*1000,0,"noteinfo",%p);
|
||||
schedule(10000,0,"listinfo",%p);
|
||||
}
|
||||
|
||||
function noteinfo(%p)
|
||||
{
|
||||
%n = %p.noted;
|
||||
%p.noted++;
|
||||
%predict = %p.predict();
|
||||
%p.predict[%n] = %predict;
|
||||
%p.real[%n] = %p.getTransform();
|
||||
%p.time[%n] = (getSimTime()-%p.st)/1000;
|
||||
}
|
||||
|
||||
function listinfo(%p)
|
||||
{
|
||||
for (%i=0;%i<11;%i++)
|
||||
{
|
||||
%pxlist =trim(%pxlist SPC GetWord(%p.predict[%i],0));
|
||||
%pzlist =trim(%pzlist SPC GetWord(%p.predict[%i],2));
|
||||
%xlist =trim(%xlist SPC GetWord(%p.real[%i],0));
|
||||
%zlist =trim(%zlist SPC GetWord(%p.real[%i],2));
|
||||
%tlist = trim(%tlist SPC %p.time[%i]);
|
||||
}
|
||||
//echo(%tlist);
|
||||
//echo(%pxlist);
|
||||
//echo(%pzlist);
|
||||
//echo(%xlist);
|
||||
//echo(%zlist);
|
||||
%speed = listspeed(%pzlist,%tlist);
|
||||
%acc = listspeed(%speed,listshift(%tlist));
|
||||
//echo(%speed);
|
||||
|
||||
%speed1 = listspeed(%zlist,%tlist);
|
||||
%acc1 = listspeed(%speed1,listshift(%tlist));
|
||||
//echo(%speed1);
|
||||
%v1 = %speed-%acc*1/2;
|
||||
%v2 = %speed1-%acc1*1/2;
|
||||
$diff[getWord(%p.vec,0),getWord(%p.vec,2)] = %v1-%v2;
|
||||
//echo(ListSub(%speed,%speed1));
|
||||
//echo(listmean(%acc));
|
||||
//echo(listmean(%acc1));
|
||||
//echo(1/2*(listmean(%acc1)-listmean(%acc))*10*10);
|
||||
}
|
||||
|
||||
function testrange()
|
||||
{
|
||||
for (%x=-5;%x<6;%x+=0.2)
|
||||
{
|
||||
for (%y=0;%y<6;%y+=0.2)
|
||||
{
|
||||
%vec = %x SPC "0" SPC %y;
|
||||
schedule((%x+5)*100000+%y*10000,0,"mechanics",%vec);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function plotres()
|
||||
{
|
||||
for (%x=-5;%x<6;%x+=0.2)
|
||||
{
|
||||
for (%y=0;%y<6;%y+=0.2)
|
||||
{
|
||||
%line = %line SPC $diff[%x,%y];
|
||||
}
|
||||
echo(%line);
|
||||
%line = "";
|
||||
}
|
||||
}
|
||||
705
scripts/MPM/MPM_AE.cs
Normal file
705
scripts/MPM/MPM_AE.cs
Normal file
|
|
@ -0,0 +1,705 @@
|
|||
//loading system
|
||||
if ($mpm_AE != 1)
|
||||
{
|
||||
$mpm_load[$mpm_loads] = Mpm_AREP_Load;
|
||||
$mpm_loads++;
|
||||
$mpm_load[$mpm_loads] = Mpm_ACLK_Load;
|
||||
$mpm_loads++;
|
||||
$mpm_load[$mpm_loads] = Mpm_ADIS_Load;
|
||||
$mpm_loads++;
|
||||
$mpm_load[$mpm_loads] = Mpm_AESP_Load;
|
||||
$mpm_loads++;
|
||||
$mpm_load[$mpm_loads] = Mpm_AMOR_Load;
|
||||
$mpm_loads++;
|
||||
$mpm_AE = 1;
|
||||
}
|
||||
|
||||
|
||||
//Loads
|
||||
|
||||
datablock ItemData(Mpm_AREP_Load):Mpm_Base_Load
|
||||
{
|
||||
slot = 0;
|
||||
cost = 25;
|
||||
name = "[AID] Repair Pulse";
|
||||
friendly = 1;
|
||||
missile = Mpm_B_MIS4;
|
||||
|
||||
};
|
||||
|
||||
datablock ItemData(Mpm_ACLK_Load):Mpm_Base_Load
|
||||
{
|
||||
slot = 0;
|
||||
cost = 30;
|
||||
name = "[AID] Cloak Pulse";
|
||||
friendly = 1;
|
||||
missile = Mpm_B_MIS4;
|
||||
|
||||
};
|
||||
|
||||
datablock ItemData(Mpm_ADIS_Load):Mpm_Base_Load
|
||||
{
|
||||
slot = 0;
|
||||
cost = 25;
|
||||
name = "[AID] Dissasemble Pulse";
|
||||
friendly = 0;
|
||||
missile = Mpm_B_MIS4;
|
||||
|
||||
};
|
||||
|
||||
datablock ItemData(Mpm_AESP_Load):Mpm_Base_Load
|
||||
{
|
||||
slot = 0;
|
||||
cost = 50;
|
||||
name = "[AID] Electo Static Pulse";
|
||||
friendly = 0;
|
||||
missile = Mpm_B_MIS4;
|
||||
|
||||
};
|
||||
|
||||
datablock ItemData(Mpm_AMOR_Load):Mpm_Base_Load
|
||||
{
|
||||
slot = 0;
|
||||
cost = 50;
|
||||
name = "[AID] Morph Pulse";
|
||||
friendly = 0;
|
||||
missile = Mpm_B_MIS4;
|
||||
|
||||
};
|
||||
|
||||
function Mpm_AREP_Load::Explode(%data,%p,%pos)
|
||||
{
|
||||
if (IsObject(%p))
|
||||
{
|
||||
Aidpulse(%pos,%p.owner,0);
|
||||
}
|
||||
}
|
||||
|
||||
function Mpm_ACLK_Load::Explode(%data,%p,%pos)
|
||||
{
|
||||
if (IsObject(%p))
|
||||
{
|
||||
Aidpulse(%pos,%p.owner,1);
|
||||
}
|
||||
}
|
||||
|
||||
function Mpm_ADIS_Load::Explode(%data,%p,%pos)
|
||||
{
|
||||
if (IsObject(%p))
|
||||
{
|
||||
Aidpulse(%pos,%p.owner,2);
|
||||
}
|
||||
}
|
||||
|
||||
function Mpm_AESP_Load::Explode(%data,%p,%pos)
|
||||
{
|
||||
if (IsObject(%p))
|
||||
{
|
||||
Aidpulse(%pos,%p.owner,3);
|
||||
}
|
||||
}
|
||||
|
||||
function Mpm_AMOR_Load::Explode(%data,%p,%pos)
|
||||
{
|
||||
if (IsObject(%p))
|
||||
{
|
||||
Aidpulse(%pos,%p.owner,4);
|
||||
}
|
||||
}
|
||||
|
||||
//Shockwaves
|
||||
|
||||
datablock ShockwaveData(RepairWave) {
|
||||
className = "ShockwaveData";
|
||||
scale = "1 1 1";
|
||||
delayMS = "0";
|
||||
delayVariance = "0";
|
||||
lifetimeMS = "10000";
|
||||
lifetimeVariance = "0";
|
||||
width = "1";
|
||||
numSegments = "60";
|
||||
numVertSegments = "30";
|
||||
velocity = "10";
|
||||
height = "20";
|
||||
verticalCurve = "5";
|
||||
acceleration = "1";
|
||||
times[0] = "0";
|
||||
times[1] = "0.25";
|
||||
times[2] = "0.9";
|
||||
times[3] = "1";
|
||||
colors[0] = "1.000000 0.200000 0.200000 1.000000"; //1.0 0.9 0.9
|
||||
colors[1] = "1.000000 0.200000 0.200000 1.000000"; //0.6 0.6 0.6
|
||||
colors[2] = "1.000000 0.200000 0.200000 1.000000"; //0.6 0.6 0.6
|
||||
colors[3] = "1.000000 0.200000 0.200000 0.000000";
|
||||
texture[0] = "special/redbump2";
|
||||
texture[1] = "special/shockwave4"; //gradient";
|
||||
texWrap = "1";
|
||||
is2D = "0";
|
||||
mapToTerrain = "0";
|
||||
orientToNormal = "1";
|
||||
renderBottom = "1";
|
||||
renderSquare = "0";
|
||||
};
|
||||
|
||||
datablock ShockwaveData(CloakWave):RepairWave
|
||||
{
|
||||
colors[0] = "1 1 1 1";
|
||||
colors[1] = "1 1 1 1";
|
||||
colors[2] = "1 1 1 1";
|
||||
colors[3] = "1 1 1 0";
|
||||
texture[0] = "special/cloakTexture";
|
||||
texture[1] = "special/shockwave4";
|
||||
texWrap = "5";
|
||||
};
|
||||
|
||||
datablock ShockwaveData(DisWave):RepairWave
|
||||
{
|
||||
colors[0] = "0.2 0.2 1 1";
|
||||
colors[1] = "0.2 0.2 1 1";
|
||||
colors[2] = "0.2 0.2 1 1";
|
||||
colors[3] = "0.2 0.2 1 0";
|
||||
texture[0] = "special/shockwave5";
|
||||
texture[1] = "special/shockwave4";
|
||||
texWrap = "1";
|
||||
};
|
||||
|
||||
datablock ShockwaveData(EspWave):RepairWave
|
||||
{
|
||||
colors[0] = "0.8 0.2 1 1";
|
||||
colors[1] = "0.8 0.2 1 1";
|
||||
colors[2] = "0.8 0.2 1 1";
|
||||
colors[3] = "0.8 0.2 1 0";
|
||||
texture[0] = "special/shockwave5";
|
||||
texture[1] = "special/shockwave4";
|
||||
texWrap = "1";
|
||||
};
|
||||
|
||||
datablock ShockwaveData(MORWave):RepairWave
|
||||
{
|
||||
colors[0] = "0.8 1 0.2 1";
|
||||
colors[1] = "0.8 1 0.2 1";
|
||||
colors[2] = "0.8 1 0.2 1";
|
||||
colors[3] = "0.8 1 0.2 0";
|
||||
texture[0] = "special/shockwave5";
|
||||
texture[1] = "special/shockwave4";
|
||||
texWrap = "1";
|
||||
};
|
||||
|
||||
//Emitters
|
||||
|
||||
datablock ParticleData(RepairWave_P)
|
||||
{
|
||||
dragCoeffiecient = 0.0;
|
||||
gravityCoefficient = 0.0;
|
||||
inheritedVelFactor = 0.0;
|
||||
|
||||
lifetimeMS = 10000;
|
||||
lifetimeVarianceMS = 0;
|
||||
constantAcceleration = 0.1;
|
||||
|
||||
spinRandomMin = -30.0;
|
||||
spinRandomMax = 30.0;
|
||||
windcoefficient = 0;
|
||||
textureName = "special/redflare";
|
||||
|
||||
colors[0] = "1 0.2 0.2 1";
|
||||
colors[1] = "1 0.2 0.2 1";
|
||||
colors[2] = "1 0.2 0.2 1";
|
||||
colors[3] = "1 0.2 0.2 0";
|
||||
|
||||
sizes[0] = 1;
|
||||
sizes[1] = 2;
|
||||
sizes[2] = 4;
|
||||
sizes[3] = 5;
|
||||
|
||||
times[0] = "0";
|
||||
times[1] = "0.25";
|
||||
times[2] = "0.9";
|
||||
times[3] = "1";
|
||||
|
||||
};
|
||||
|
||||
datablock ParticleData(CloakWave_P):RepairWave_P
|
||||
{
|
||||
textureName = "flarebase";
|
||||
constantAcceleration = 0.1;
|
||||
colors[0] = "1 1 1 1";
|
||||
colors[1] = "1 1 1 1";
|
||||
colors[2] = "1 1 1 1";
|
||||
colors[3] = "1 1 1 0";
|
||||
};
|
||||
|
||||
datablock ParticleData(DISWave_P):RepairWave_P
|
||||
{
|
||||
textureName = "flarebase";
|
||||
constantAcceleration = 0.1;
|
||||
colors[0] = "0.2 0.2 1 1";
|
||||
colors[1] = "0.2 0.2 1 1";
|
||||
colors[2] = "0.2 0.2 1 1";
|
||||
colors[3] = "0.2 0.2 1 0";
|
||||
};
|
||||
|
||||
datablock ParticleData(ESPWave_P):RepairWave_P
|
||||
{
|
||||
textureName = "flarebase";
|
||||
constantAcceleration = 0.1;
|
||||
colors[0] = "0.8 0.2 1 1";
|
||||
colors[1] = "0.8 0.2 1 1";
|
||||
colors[2] = "0.8 0.2 1 1";
|
||||
colors[3] = "0.8 0.2 1 0";
|
||||
};
|
||||
|
||||
datablock ParticleData(MORWave_P):RepairWave_P
|
||||
{
|
||||
textureName = "flarebase";
|
||||
constantAcceleration = 0.1;
|
||||
colors[0] = "0.8 1 0.2 1";
|
||||
colors[1] = "0.8 1 0.2 1";
|
||||
colors[2] = "0.8 1 0.2 1";
|
||||
colors[3] = "0.8 1 0.2 0";
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(RepairWave_E)
|
||||
{
|
||||
lifetimeMS = 1000;
|
||||
ejectionPeriodMS = 1;
|
||||
periodVarianceMS = 0;
|
||||
|
||||
ejectionVelocity = 10;
|
||||
velocityVariance = 0;
|
||||
ejectionoffset = 5;
|
||||
thetaMin = 0.0;
|
||||
thetaMax = 180.0;
|
||||
|
||||
phiReferenceVel = "0";
|
||||
phiVariance = "360";
|
||||
orientParticles = false;
|
||||
orientOnVelocity = false;
|
||||
|
||||
particles = "RepairWave_P";
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(CLOAKWave_E):RepairWave_E
|
||||
{
|
||||
lifetimeMS = 1000;
|
||||
ejectionPeriodMS = 1;
|
||||
ejectionVelocity = 10;
|
||||
ejectionoffset = 5;
|
||||
velocityVariance = 0;
|
||||
particles = "CloakWave_P";
|
||||
thetaMin = 0.0;
|
||||
thetaMax = 180.0;
|
||||
|
||||
phiReferenceVel = "0";
|
||||
phiVariance = "360";
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(DISWave_E):RepairWave_E
|
||||
{
|
||||
lifetimeMS = 1000;
|
||||
ejectionPeriodMS = 1;
|
||||
ejectionVelocity = 10;
|
||||
ejectionoffset = 5;
|
||||
velocityVariance = 0;
|
||||
particles = "DISWave_P";
|
||||
thetaMin = 0.0;
|
||||
thetaMax = 180.0;
|
||||
|
||||
phiReferenceVel = "0";
|
||||
phiVariance = "360";
|
||||
};
|
||||
|
||||
|
||||
datablock ParticleEmitterData(ESPWave_E):RepairWave_E
|
||||
{
|
||||
lifetimeMS = 1000;
|
||||
ejectionPeriodMS = 1;
|
||||
ejectionVelocity = 10;
|
||||
velocityVariance = 0;
|
||||
ejectionoffset = 5;
|
||||
particles = "ESPWave_P";
|
||||
thetaMin = 0.0;
|
||||
thetaMax = 180.0;
|
||||
|
||||
phiReferenceVel = "0";
|
||||
phiVariance = "360";
|
||||
};
|
||||
|
||||
|
||||
datablock ParticleEmitterData(MORWave_E):RepairWave_E
|
||||
{
|
||||
lifetimeMS = 1000;
|
||||
ejectionPeriodMS = 1;
|
||||
ejectionVelocity = 10;
|
||||
velocityVariance = 0;
|
||||
ejectionoffset = 5;
|
||||
particles = "MORWave_P";
|
||||
thetaMin = 0.0;
|
||||
thetaMax = 180.0;
|
||||
|
||||
phiReferenceVel = "0";
|
||||
phiVariance = "360";
|
||||
};
|
||||
|
||||
|
||||
datablock ExplosionData(RepairPulseExplosion):BaseExplosion //From blast.cs
|
||||
{
|
||||
emitter[0] = "RepairWave_E";
|
||||
Shockwave = "RepairWave";
|
||||
};
|
||||
|
||||
|
||||
datablock ExplosionData(CloakPulseExplosion):BaseExplosion //From blast.cs
|
||||
{
|
||||
emitter[0] = "CloakWave_E";
|
||||
Shockwave = "CloakWave";
|
||||
};
|
||||
|
||||
datablock ExplosionData(DisPulseExplosion):BaseExplosion //From blast.cs
|
||||
{
|
||||
emitter[0] = "DISWave_E";
|
||||
Shockwave = "DisWave";
|
||||
};
|
||||
|
||||
datablock ExplosionData(ESPPulseExplosion):BaseExplosion //From blast.cs
|
||||
{
|
||||
emitter[0] = "ESPWave_E";
|
||||
Shockwave = "ESPWave";
|
||||
};
|
||||
|
||||
|
||||
datablock ExplosionData(MORPulseExplosion):BaseExplosion //From blast.cs
|
||||
{
|
||||
emitter[0] = "MORWave_E";
|
||||
Shockwave = "MORWave";
|
||||
};
|
||||
|
||||
datablock TracerProjectileData(RepairPulseProjectile):BaseProjectile
|
||||
{
|
||||
Explosion = "RepairPulseExplosion";
|
||||
};
|
||||
|
||||
datablock TracerProjectileData(CloakPulseProjectile):BaseProjectile
|
||||
{
|
||||
Explosion = "CloakPulseExplosion";
|
||||
};
|
||||
|
||||
datablock TracerProjectileData(DisPulseProjectile):BaseProjectile
|
||||
{
|
||||
Explosion = "DisPulseExplosion";
|
||||
};
|
||||
|
||||
datablock TracerProjectileData(ESPPulseProjectile):BaseProjectile
|
||||
{
|
||||
Explosion = "ESPPulseExplosion";
|
||||
};
|
||||
|
||||
|
||||
datablock TracerProjectileData(MORPulseProjectile):BaseProjectile
|
||||
{
|
||||
Explosion = "MORPulseExplosion";
|
||||
};
|
||||
|
||||
function Aidpulse(%pos,%owner,%type,%nrm)
|
||||
{
|
||||
schedule(200,0,"Serverplay3D",FlashGrenadeExplosionSound,%pos);
|
||||
%types = "RepairPulseProjectile CloakPulseProjectile DisPulseProjectile ESPPulseProjectile MORPulseProjectile";
|
||||
%proj = GetWord(%types,%type);
|
||||
%nrm = !%nrm ? "0 0 -1" : %nrm;
|
||||
shockwave(%pos,%nrm,%proj);
|
||||
%waveblock = %proj.explosion.shockwave;
|
||||
%accel = %waveblock.acceleration; //accel of wave
|
||||
%speed = %waveblock.velocity; //speed of wave
|
||||
%mtime = %waveblock.lifetimeMS/1000; //time the wave lasts
|
||||
%lastdist = 0;
|
||||
%checks = %mtime/2; //2 per second
|
||||
AidPulseWaved(%pos,%mtime,%speed,%accel,%waveblock,%owner);
|
||||
Cancel(%owner.resetmorphsch);
|
||||
%owner.resetmorphsch = Schedule(%mtime*1000+5000,%owner,"resetmorphsize",%owner);
|
||||
for (%i = 1;%i<20;%i++)
|
||||
{
|
||||
%time = %i/2;
|
||||
%dist = %time*%speed+1/2 * mPow(%time,2)*%accel+10;
|
||||
schedule(%time*1000,0,"AidpulseWaver",%pos,%dist,%lastdist-2,%waveblock,%owner);
|
||||
%lastdist = %dist;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function solveadist(%accel,%speed,%dist)
|
||||
{
|
||||
%awn = mSolveQuadratic(%accel/2,%speed,-1*%dist);
|
||||
if (getWord(%awn,0) <0 || getWord(%awn,1) > 0)
|
||||
return 0;
|
||||
else
|
||||
return -1*getWord(%awn,1);
|
||||
}
|
||||
|
||||
function AidPulseWaved(%pos,%time,%speed,%accel,%wave,%owner)
|
||||
{
|
||||
%area = %time*%speed+1/2 * mPow(%time,2)*%accel+10;
|
||||
|
||||
InitContainerRadiusSearch(%pos, %area, $TypeMasks::StaticShapeObjectType | $TypeMasks::ForceFieldObjectType );
|
||||
|
||||
|
||||
while ((%targetObject = containerSearchNext()) != 0)
|
||||
{
|
||||
%dist = containerSearchCurrRadDamageDist();
|
||||
%ttime = solveadist(%accel,%speed,%dist-10);
|
||||
if (%ttime != 0 || %ttime < %time)
|
||||
%wave.schedule(%ttime*1000,"AidEffect",%targetobject,%owner,%pos);
|
||||
}
|
||||
}
|
||||
|
||||
function AidpulseWaver(%pos,%area,%lastar,%wave,%owner)
|
||||
{
|
||||
|
||||
InitContainerRadiusSearch(%pos, %area, $TypeMasks::VehicleObjectType | $TypeMasks::PlayerObjectType |$TypeMasks::ItemObjectType | $TypeMasks::CorpseObjectType );
|
||||
|
||||
|
||||
while ((%targetObject = containerSearchNext()) != 0)
|
||||
{
|
||||
%dist = containerSearchCurrRadDamageDist();
|
||||
|
||||
if (%dist > %area || %dist < %lastar)
|
||||
continue;
|
||||
|
||||
%wave.AidEffect(%targetobject,%owner,%pos);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function RepairWave::AidEffect(%block,%obj,%owner,%pos)
|
||||
{
|
||||
if (!isObject(%obj) || %obj.isforceField())
|
||||
return "";
|
||||
%obj.playShieldEffect("1 1 1");
|
||||
%obj.setDamageLevel(0);
|
||||
}
|
||||
|
||||
function CloakWave::AidEffect(%block,%obj,%owner,%pos)
|
||||
{
|
||||
if (!isObject(%obj) || %obj.isforceField())
|
||||
return "";
|
||||
Cancel(%obj.uncloaksch);
|
||||
%obj.setCloaked(True);
|
||||
%obj.uncloaksch = %obj.schedule(60000,"setCloaked",False);
|
||||
}
|
||||
|
||||
function DisWave::AidEffect(%block,%obj,%owner,%Pos)
|
||||
{
|
||||
|
||||
if (%obj.isRemoved || !isObject(%owner) || !isObject(%obj))
|
||||
return;
|
||||
%dataBlockName = %obj.getDataBlock().getName();
|
||||
if (%dataBlockName $= "StationInventory" || %dataBlockName $= "GeneratorLarge" ||%dataBlockName $= "SolarPanel" ||%dataBlockName $= "SensorMediumPulse" ||%dataBlockName $= "SensorLargePulse")
|
||||
if (%obj.deployed != true)
|
||||
return;
|
||||
if ($reverseDeployItem[%obj.getDataBlock().getName()] $= "")
|
||||
return;
|
||||
if (%obj.team != %owner.team && !(%owner.isAdmin || %owner.isSuperAdmin))
|
||||
return;
|
||||
if ($Host::OnlyOwnerCascade == 1 && %obj.getOwner() != %owner && !(%owner.isAdmin || %owner.isSuperAdmin))
|
||||
return;
|
||||
|
||||
%obj.getDataBlock().disassemble(%owner, %obj); // Run Item Specific code.
|
||||
|
||||
}
|
||||
|
||||
function ESPWave::AidEffect(%block,%obj,%owner,%pos)
|
||||
{
|
||||
if (!isObject(%obj))
|
||||
return "";
|
||||
%hadsch = %obj.uncloacksch ? 1 : 0;
|
||||
Cancel(%obj.uncloaksch);
|
||||
if (!%obj.isforcefield())
|
||||
%obj.setCloaked(FALSE);
|
||||
Cancel(%obj.unemplockschd);
|
||||
if (%obj.isVehicle())
|
||||
vehemplock(%obj);
|
||||
else if (%obj.isPlayer())
|
||||
PlayerEmpLock(%obj);
|
||||
else if (%obj.getDatablock().maxEnergy !$= "")
|
||||
{
|
||||
if (%obj.getDataBlock().className $= "Generator" && %obj.lastState)
|
||||
{
|
||||
if (!%hadsch)
|
||||
toggleGenerator(%obj,0);
|
||||
%obj.unemplockschd = schedule(30000,%obj," toggleGenerator",%obj,0);
|
||||
}
|
||||
%obj.setEnergyLevel(0);
|
||||
}
|
||||
}
|
||||
|
||||
function MORWave::AidEffect(%block,%obj,%owner,%pos)
|
||||
{
|
||||
if (%obj.isRemoved || !isObject(%owner) || !isObject(%obj) || %obj.isPLayer() || %obj.isVehicle())
|
||||
return;
|
||||
if (!(deployables.isMember(%obj)))
|
||||
return;
|
||||
%dataBlockName = %obj.getDataBlock().getName();
|
||||
if (%dataBlockName $= "StationInventory" || %dataBlockName $= "GeneratorLarge" ||%dataBlockName $= "SolarPanel" ||%dataBlockName $= "SensorMediumPulse" ||%dataBlockName $= "SensorLargePulse")
|
||||
if (%obj.deployed != true)
|
||||
return;
|
||||
|
||||
if (%obj.team != %owner.team && !(%owner.isAdmin || %owner.isSuperAdmin))
|
||||
return;
|
||||
if ($Host::OnlyOwnerCascade == 1 && %obj.getOwner() != %owner && !(%owner.isAdmin || %owner.isSuperAdmin))
|
||||
return;
|
||||
|
||||
Cancel(%obj.unmorphsch);
|
||||
%obj.unmorphsch = Schedule(30000,%obj,"ResetMorphObject",%obj);
|
||||
if (%obj.morphed)
|
||||
return;
|
||||
|
||||
%obj.oldcenter = %obj.getEdge("0 0 0");
|
||||
%obj.oldrealsize = %obj.getrealSize();
|
||||
%obj.morphed = 1;
|
||||
|
||||
%size = %owner.morphpulsesize ? %owner.morphpulsesize : 0.1;
|
||||
%scale = VectorScale("1 1 1",%size);
|
||||
%offset = VectorMultiply(VectorSub(%obj.getEdge("0 0 0"),%pos),%scale);
|
||||
%obj.setRealSize(VectorMultiply(%obj.getRealSize(),%scale));
|
||||
%obj.setEdge(VectorAdd(%pos,%offset),"0 0 0");
|
||||
if (!%obj.isforcefield())
|
||||
%obj.startfade(500,0,0);
|
||||
if (isObject(%obj.pzone))
|
||||
{
|
||||
%obj.pzone.setScale(%Obj.getScale);
|
||||
%obj.pzone.setTransform(%obj.getTransform());
|
||||
}
|
||||
if (isObject(%obj.emitter))
|
||||
{
|
||||
%obj.emitter.oldsize = %obj.getScale();
|
||||
%obj.emitter.setScale(VectorScale(%obj.emitter.getScale(),%size));
|
||||
%obj.emitter.setTransform(%obj.getTransform());
|
||||
}
|
||||
if (isObject(%obj.trigger))
|
||||
{
|
||||
%obj.trigger.oldsize = %obj.getScale();
|
||||
%obj.trigger.setScale(VectorScale(%obj.trigger.getScale(),%size));
|
||||
%obj.trigger.setTransform(%obj.getTransform());
|
||||
}
|
||||
}
|
||||
|
||||
//ESP functions
|
||||
|
||||
function vehemplock(%vehicle)
|
||||
{
|
||||
Cancel(%vehicle.unemplockschd);
|
||||
Cancel(%vehicle.lockff.unemplockschd);
|
||||
%vehicle.setFrozenState(true);
|
||||
%vehicle.zapObject();
|
||||
forceFieldLock(%vehicle);
|
||||
%vehicle.unemplockschd = Schedule(30000,%vehicle,"vehUnEmpLock",%vehicle);
|
||||
%vehicle.lockff.unemplockschd = %vehicle.lockff.Schedule(30000,"delete");
|
||||
}
|
||||
|
||||
function vehUnEmpLock(%vehicle)
|
||||
{
|
||||
Cancel(%vehicle.unemplockschd);
|
||||
Cancel(%vehicle.lockff.unemplockschd);
|
||||
%vehicle.lockff.delete();
|
||||
%vehicle.setFrozenState(false);
|
||||
}
|
||||
|
||||
function PlayerEmpLock(%player)
|
||||
{
|
||||
Cancel(%player.unemplockschd);
|
||||
Cancel(%player.lockff.unemplockschd);
|
||||
Cancel(%player.lock.unemplockschd);
|
||||
if (!%player.isemped)
|
||||
{
|
||||
%lock = new StaticShape()
|
||||
{
|
||||
dataBlock = SelectionPad;
|
||||
scale = "0.01 0.01 0.01";
|
||||
};
|
||||
%lock.startFade(0,0,1);
|
||||
%vec = VectorNormalize(%player.getVelocity());
|
||||
%vec = (VectorLen(%vec)>0.1) ? %vec : "0 0 1";
|
||||
%center = %player.getEdge("0 0 0");
|
||||
%rot = fullrot(%vec,VectorCross(%player.getEyeVector(),%vec));
|
||||
%player.setTransform(%player.getEdge("0 0 -1") SPC %rot);
|
||||
%player.setEdge(%center,"0 0 0");
|
||||
%lock.setTransform(getWords(%player.getTransform(),0,2) SPC %rot);
|
||||
%lock.mountObject(%player,0);
|
||||
%lock.player = %player;
|
||||
%player.emplock = %lock;
|
||||
%player.isemped = 1;
|
||||
%player.zapObject();
|
||||
forceFieldLock(%player);
|
||||
}
|
||||
%player.unemplockschd = Schedule(30000,%player,"PlayerUnEmpLock",%player);
|
||||
if (isObject(%player.lock))
|
||||
%player.lock.unemplockschd = %player.lock.Schedule(30000,"delete");
|
||||
if (isObject(%player.lockff))
|
||||
%player.lockff.unemplockschd = %player.lockff.Schedule(30000,"delete");
|
||||
}
|
||||
|
||||
function PlayerUnEmpLock(%player)
|
||||
{
|
||||
%player.isemped = 0;
|
||||
Cancel(%player.unemplockschd);
|
||||
Cancel(%player.lockff.unemplockschd);
|
||||
Cancel(%player.lock.unemplockschd);
|
||||
%player.lockff.delete();
|
||||
%player.unMount();
|
||||
if (isObject(%player.emplock))
|
||||
%player.emplock.delete();
|
||||
}
|
||||
|
||||
function forceFieldLock(%obj)
|
||||
{
|
||||
if (!isObject(%obj.lockff))
|
||||
{
|
||||
%ff = new ForceFieldBare() {
|
||||
dataBlock = DeployedForceField5;
|
||||
scale = "1 1 1";
|
||||
};
|
||||
%ff.noSlow = true;
|
||||
%ff.pzone.delete();
|
||||
%ff.pzone = "";
|
||||
%obj.lockff = %ff;
|
||||
%ff.obj = %obj;
|
||||
%ff.setScale(%obj.getRealSize());
|
||||
%ff.setTransform(%obj.getEdge("-1 -1 -1") SPC %Obj.getRotation());
|
||||
}
|
||||
}
|
||||
|
||||
//Morph functions
|
||||
|
||||
function ResetMorphObject(%obj)
|
||||
{
|
||||
Cancel(%obj.unmorphsch);
|
||||
if (!%obj.isforcefield())
|
||||
%obj.startfade(500,0,0);
|
||||
%obj.setRealSize(%obj.oldrealsize);
|
||||
%obj.setEdge(%obj.oldcenter,"0 0 0");
|
||||
if (isObject(%obj.pzone))
|
||||
{
|
||||
%obj.pzone.setScale(%Obj.getScale);
|
||||
%obj.pzone.setTransform(%obj.getTransform());
|
||||
}
|
||||
if (isObject(%obj.emitter))
|
||||
{
|
||||
%obj.emitter.setTransform(%obj.getTransform());
|
||||
%obj.emitter.setScale(%obj.trigger.oldsize);
|
||||
}
|
||||
if (isObject(%obj.trigger))
|
||||
{
|
||||
%obj.trigger.setTransform(%obj.getTransform());
|
||||
%obj.trigger.setScale(%obj.trigger.oldsize);
|
||||
}
|
||||
%obj.oldrealsize = "";
|
||||
%obj.oldcenter = "";
|
||||
%obj.morphed = "";
|
||||
}
|
||||
|
||||
function resetmorphsize(%owner)
|
||||
{
|
||||
%size = (getRandom()*0.9+0.1);
|
||||
%dir = (Getrandom()*2 > 1);
|
||||
%owner.morphpulsesize = %dir ? %size : 1+%size+getRandom()*3;
|
||||
}
|
||||
1635
scripts/MPM/MPM_Blast.cs
Normal file
1635
scripts/MPM/MPM_Blast.cs
Normal file
File diff suppressed because it is too large
Load diff
185
scripts/MPM/MPM_Launch.cs
Normal file
185
scripts/MPM/MPM_Launch.cs
Normal file
|
|
@ -0,0 +1,185 @@
|
|||
datablock AudioProfile(FwProjectileSound)
|
||||
{
|
||||
filename = "armor/thrust_UW.wav";
|
||||
description = ProjectileLooping3d;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
datablock ItemData(MpmLaucher)
|
||||
{
|
||||
className = Pack;
|
||||
catagory = "Funky";
|
||||
shapeFile = "Turret_Muzzlepoint.dts";
|
||||
mass = 1;
|
||||
elasticity = 0.0;
|
||||
friction = 1.0;
|
||||
computeCRC = true;
|
||||
};
|
||||
|
||||
datablock TurretImageData(MpmLauchPoint)
|
||||
{
|
||||
shapeFile = "Turret_Muzzlepoint.dts";
|
||||
item = PlasmaBarrelLargePack;
|
||||
offset = "0 0 0";
|
||||
rotation = "0 1 0 90";
|
||||
};
|
||||
|
||||
///old algo
|
||||
//%time = Limit(VectorLen(%dist)/20,30,360);
|
||||
//%z = getWord(%dist,2);
|
||||
//%x = GetWord(%dist,0) SPC GetWord(%dist,1);
|
||||
//%x = Mpow(VectorDot(%x,%x),0.5);
|
||||
//%co1 = mpow(4*(mpow(%x,2))+ mpow(2*%muz*%time+%ac*mpow(%time,2)+2*%z,2),0.5);
|
||||
//%co2 = %time * (2*%muz * %time+%ac*mpow(%time,2)+2*%z);
|
||||
//%vector = (%x*%co1)/(%co2) SPC (%co1/(2*%time));
|
||||
//%vector = VectorAdd(VectorScale(VectorNormalize(GetWords(%dist,0,1)),getWord(%vector,0)) ,"0 0" SPC getWord(%vector,1));
|
||||
//%p=launchmpm(%start,"0 0 -1",%vector,%time*1000+5000);
|
||||
|
||||
|
||||
//Algo for mpm_missile lauch.
|
||||
//-Stage1-
|
||||
//Lauch up a certain amount of time
|
||||
//-Stage2-
|
||||
//Turn missile and head for target
|
||||
|
||||
function mpm_calc(%start,%end,%up,%dat)
|
||||
{
|
||||
if (!IsObject(%dat))
|
||||
%dat = MpmMissile1;
|
||||
if (%up $= "")
|
||||
%up = "0 0 1";
|
||||
|
||||
%ac = %dat.acceleration; //Acceleration for calc
|
||||
|
||||
%vector = VectorSub(%end,%start); //Vector source,target
|
||||
%dir = VectorNormalize(%vector);
|
||||
|
||||
if (mAbs(VectorDot(%up,%dir))==1) //can't fire directly up or down.
|
||||
return -1;
|
||||
%rup = VectorNormalize(VectorCross(%up,%dir));
|
||||
%up = VectorNormalize(%up);
|
||||
%ndir = VectorNormalize(VectorCross(VectorCross(%up,%dir),%up));
|
||||
|
||||
%z = VectorDot(%up,%dir)*VectorLen(%vector);
|
||||
%x = VectorDot(%ndir,%dir)*VectorLen(%vector);
|
||||
|
||||
%mintime = mSqrt(2*%x)/mSqrt(%ac); //Minium travel time
|
||||
%time = %mintime + 5; //Added 5 seconds for slack
|
||||
|
||||
//Calculations for preffered arc.
|
||||
%root = mSqrt(Mpow(%ac,2)*Mpow(%time,4)-4*Mpow(%x,2));
|
||||
|
||||
%ltimeco1 = %ac*Mpow(%time,2)+4*%root+8*%z;
|
||||
%ltimeco2 = -4*Mpow(%x,2)+%ac*Mpow(%time,2)*%ltimeco1;
|
||||
%ltimeco3 = 2*%ac*%time;
|
||||
%ltime = (-1*%root+mSqrt(%ltimeco2))/%ltimeco3;
|
||||
|
||||
%a = (%ac*%ltime) /2;
|
||||
%loc = %a*%ltime;
|
||||
|
||||
%co = %ac*mPow(%time,2);
|
||||
|
||||
%xx = 2*%x/%co;
|
||||
%zz = -1*(%root/%co);
|
||||
|
||||
%vz = VectorScale(%up,%zz);
|
||||
%vx = VectorScale(%ndir,%xx);
|
||||
|
||||
%vector = VectorAdd(%vx,%vz);
|
||||
|
||||
return %ltime SPC %time SPC %loc SPC %vector SPC %a;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function Launch_Mpm(%pos,%dir,%speed,%time,%data)
|
||||
{
|
||||
%dir = VectorNormalize(%dir);
|
||||
|
||||
%obj = new Item()
|
||||
{
|
||||
className = Item;
|
||||
dataBlock = MpmLaucher;
|
||||
};
|
||||
%obj.mountimage(MpmLauchPoint,0);
|
||||
%obj.setTransform(%pos);
|
||||
%obj.setVelocity(%speed);
|
||||
%p = %obj.Fire_MpM(%dir,%data);
|
||||
%obj.schedule(50,"delete");
|
||||
|
||||
%p.lasterror = "0 0 0";
|
||||
%p.lasttime = GetSimTime();
|
||||
if (%time !$= "")
|
||||
%p.dietime = GetSimTime()+%time;
|
||||
%p.schedule(%time,"delete");
|
||||
|
||||
%p.addToMPMGroup();
|
||||
return %p;
|
||||
}
|
||||
|
||||
function ProjectileData::Create(%data,%pos,%dir,%speed)
|
||||
{
|
||||
%obj = new Item()
|
||||
{
|
||||
className = Item;
|
||||
dataBlock = MpmLaucher;
|
||||
};
|
||||
%obj.mountimage(MpmLauchPoint,0);
|
||||
%obj.setTransform(%pos);
|
||||
if (VectorLen(%speed) > 200)
|
||||
%speed = VectorScale(VectorNormalize(%speed),200);
|
||||
%obj.setVelocity(%speed);
|
||||
%p = %obj.Fire_MpM(%dir,%data);
|
||||
%obj.schedule(50,"delete");
|
||||
return %p;
|
||||
}
|
||||
|
||||
function GameBase::Fire_MpM(%obj,%dir,%data)
|
||||
{
|
||||
%speed = %obj.getVelocity();
|
||||
%classname = %data.classname;
|
||||
%class = getSubStr(%classname,0,strLen(%classname)-4);
|
||||
%p = new (%class)()
|
||||
{
|
||||
datablock = %data;
|
||||
initialDirection = %dir;
|
||||
initialPosition = %obj.getWorldBoxCenter();
|
||||
SourceObject = %obj;
|
||||
SourceSlot = 0;
|
||||
};
|
||||
%p.StartVelocity = %speed;
|
||||
%p.createtime=getSimTime();
|
||||
|
||||
return %p;
|
||||
}
|
||||
|
||||
function extend(%p,%odir)
|
||||
{
|
||||
%dir = %p.InitialDirection;
|
||||
%pos = VectorAdd(%p.InitialPosition,VectorScale(%dir,-0.5));
|
||||
%left = VectorNormalize(VectorCross(VectorNormalize(%odir),"0 0 1"));
|
||||
%p1 = new SeekerProjectile()
|
||||
{
|
||||
dataBlock = mpmmissile2;
|
||||
initialDirection = %dir;
|
||||
initialPosition = VectorAdd(%pos,VectorScale(%left,5));
|
||||
sourceObject = %p.sourceObject;
|
||||
};
|
||||
|
||||
%p2 = new SeekerProjectile()
|
||||
{
|
||||
dataBlock = mpmmissile2;
|
||||
initialDirection = %dir;
|
||||
initialPosition = VectorAdd(%pos,VectorScale(%left,-5));
|
||||
sourceObject = %p.sourceObject;
|
||||
};
|
||||
%p1.createtime=getSimTime();
|
||||
%p1.StartVelocity = %p.sourceObject.GetVelocity();
|
||||
%p2.createtime=getSimTime();
|
||||
%p2.StartVelocity = %p.sourceObject.GetVelocity();
|
||||
%dietime = %p.dietime-GetSimTime();
|
||||
%p1.schedule(%dietime+10000,"delete");
|
||||
%p2.schedule(%dietime+10000,"delete");
|
||||
}
|
||||
|
||||
|
||||
2320
scripts/MPM/MPM_base.cs
Normal file
2320
scripts/MPM/MPM_base.cs
Normal file
File diff suppressed because it is too large
Load diff
272
scripts/MPM/Mpm_BE.cs
Normal file
272
scripts/MPM/Mpm_BE.cs
Normal file
|
|
@ -0,0 +1,272 @@
|
|||
|
||||
if ($mpm_BE != 1)
|
||||
{
|
||||
//$mpm_load[$mpm_loads] = Mpm_Base_Load;
|
||||
//$mpm_loads++;
|
||||
$mpm_load[$mpm_loads] = Mpm_BBom_Load;
|
||||
$mpm_loads++;
|
||||
$mpm_load[$mpm_loads] = Mpm_BMis_Load;
|
||||
$mpm_loads++;
|
||||
$mpm_load[$mpm_loads] = Mpm_BMor_Load;
|
||||
$mpm_loads++;
|
||||
$mpm_BE = 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
datablock ItemData(Mpm_Base_Load)
|
||||
{
|
||||
cost = 40;
|
||||
missile = Mpm_B_MIS1;
|
||||
name = "[Weapon] Base Explosion";
|
||||
friendly = 0;
|
||||
};
|
||||
|
||||
datablock ItemData(Mpm_BBom_Load):Mpm_Base_Load
|
||||
{
|
||||
cost = 75;
|
||||
name = "[Cluster] Bomber Run";
|
||||
missile = Mpm_B_MIS1;
|
||||
offset = "0 100";
|
||||
slot = 4;
|
||||
};
|
||||
|
||||
datablock ItemData(Mpm_BMis_Load):Mpm_Base_Load
|
||||
{
|
||||
cost = 50;
|
||||
name = "[Cluster] Cluster Missile";
|
||||
missile = Mpm_B_MIS1;
|
||||
offset = "0 0";
|
||||
slot = 4;
|
||||
};
|
||||
|
||||
datablock ItemData(Mpm_BMor_Load):Mpm_Base_Load
|
||||
{
|
||||
cost = 75;
|
||||
name = "[Cluster] Mortar dump";
|
||||
missile = Mpm_B_MIS1;
|
||||
offset = "0 100";
|
||||
slot = 4;
|
||||
};
|
||||
|
||||
datablock AudioDescription(AudioMassiveExplosion) {
|
||||
volume = "1";
|
||||
isLooping = "0";
|
||||
is3D = "1";
|
||||
minDistance = "500";
|
||||
maxDistance = "9999";
|
||||
coneInsideAngle = "360";
|
||||
coneOutsideAngle = "360";
|
||||
coneOutsideVolume = "1";
|
||||
coneVector = "0 0 1";
|
||||
environmentLevel = "1";
|
||||
loopCount = "-1";
|
||||
minLoopGap = "0";
|
||||
maxLoopGap = "0";
|
||||
type = "3";
|
||||
};
|
||||
|
||||
datablock AudioProfile(Mpm_BE_Sound) {
|
||||
fileName = "fx/weapons/mortar_explode.wav";
|
||||
description = "AudioMassiveExplosion";
|
||||
Preload = "1";
|
||||
};
|
||||
|
||||
datablock ParticleData(Mpm_BE_PA) {
|
||||
dragCoefficient = "0.6";
|
||||
windCoefficient = "0";
|
||||
gravityCoefficient = "0";
|
||||
inheritedVelFactor = "0";
|
||||
constantAcceleration = "0";
|
||||
lifetimeMS = "7000";
|
||||
lifetimeVarianceMS = "2000";
|
||||
spinSpeed = "0";
|
||||
spinRandomMin = "-500";
|
||||
spinRandomMax = "500";
|
||||
useInvAlpha = "0";
|
||||
animateTexture = "0";
|
||||
framesPerSec = "1";
|
||||
textureName = "special/expFlare";
|
||||
animTexName[0] = "special/expFlare";
|
||||
colors[0] = "1.000000 1.000000 1.000000 0.900000";
|
||||
colors[1] = "1.000000 0.400000 0.000000 0.300000";
|
||||
colors[2] = "1.000000 0.300000 0.000000 0.000000";
|
||||
colors[3] = "1.000000 1.000000 1.000000 1.000000";
|
||||
sizes[0] = "75";
|
||||
sizes[1] = "250";
|
||||
sizes[2] = "400";
|
||||
sizes[3] = "1";
|
||||
times[0] = "0";
|
||||
times[1] = "0.7";
|
||||
times[2] = "1";
|
||||
times[3] = "2";
|
||||
};
|
||||
|
||||
|
||||
|
||||
datablock ParticleEmitterData(Mpm_BE_PE) {
|
||||
className = "ParticleEmitterData";
|
||||
ejectionPeriodMS = "3";
|
||||
periodVarianceMS = "0";
|
||||
ejectionVelocity = "57";
|
||||
velocityVariance = "20";
|
||||
ejectionOffset = "6";
|
||||
thetaMin = "0";
|
||||
thetaMax = "110";
|
||||
phiReferenceVel = "0";
|
||||
phiVariance = "360";
|
||||
overrideAdvance = "0";
|
||||
orientParticles = "0";
|
||||
orientOnVelocity = "1";
|
||||
particles = "Mpm_BE_PA";
|
||||
lifetimeMS = "3600";
|
||||
lifetimeVarianceMS = "0";
|
||||
useEmitterSizes = "0";
|
||||
useEmitterColors = "0";
|
||||
overrideAdvances = "0";
|
||||
};
|
||||
|
||||
datablock ExplosionData(Mpm_BE) {
|
||||
className = "ExplosionData";
|
||||
soundProfile = "Mpm_BE_Sound";
|
||||
faceViewer = "0";
|
||||
particleDensity = "10";
|
||||
particleRadius = "1";
|
||||
explosionScale = "1 1 1";
|
||||
playSpeed = "1";
|
||||
emitter[0] = "Mpm_BE_PE";
|
||||
shockwaveOnTerrain = "0";
|
||||
debrisThetaMin = "0";
|
||||
debrisThetaMax = "90";
|
||||
debrisPhiMin = "0";
|
||||
debrisPhiMax = "360";
|
||||
debrisNum = "1";
|
||||
debrisNumVariance = "0";
|
||||
debrisVelocity = "2";
|
||||
debrisVelocityVariance = "0";
|
||||
delayMS = "0";
|
||||
delayVariance = "0";
|
||||
lifetimeMS = "1000";
|
||||
lifetimeVariance = "0";
|
||||
offset = "0";
|
||||
times[0] = "0";
|
||||
times[1] = "1";
|
||||
times[2] = "1";
|
||||
times[3] = "1";
|
||||
sizes[0] = "1 1 1";
|
||||
sizes[1] = "1 1 1";
|
||||
sizes[2] = "1 1 1";
|
||||
sizes[3] = "1 1 1";
|
||||
shakeCamera = "0";
|
||||
camShakeFreq = "10 10 10";
|
||||
camShakeAmp = "1 1 1";
|
||||
camShakeDuration = "1.5";
|
||||
camShakeRadius = "10";
|
||||
camShakeFalloff = "10";
|
||||
};
|
||||
|
||||
datablock TracerProjectileData(Mpm_BE_PR):Mpm_G_PR {
|
||||
Explosion = "Mpm_BE";
|
||||
};
|
||||
|
||||
|
||||
function Mpm_BBom_Load::Stage2(%data,%p)
|
||||
{
|
||||
if (IsObject(%p))
|
||||
{
|
||||
%p2 = parent::Stage2(%data,%p);
|
||||
Cancel(%p2.stage2);
|
||||
%p2.stage2 = %data.schedule((%p2.s2time-5000),"AtTarget",%p2);
|
||||
}
|
||||
}
|
||||
|
||||
function Mpm_Bbom_Load::AtTarget(%data,%p)
|
||||
{
|
||||
if (IsObject(%p))
|
||||
{
|
||||
%speed = GetWords(%p.predict(),3,5);
|
||||
%p.schedule(100,"Mpm_BomberRun");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function Mpm_Bmis_Load::Stage2(%data,%p)
|
||||
{
|
||||
if (IsObject(%p))
|
||||
{
|
||||
%p2 = parent::Stage2(%data,%p);
|
||||
Cancel(%p2.stage2);
|
||||
%p2.stage2 = %data.schedule((%p2.s2time-5000),"AtTarget",%p2);
|
||||
}
|
||||
}
|
||||
|
||||
function Mpm_Bmis_Load::AtTarget(%data,%p)
|
||||
{
|
||||
if (IsObject(%p))
|
||||
{
|
||||
%speed = GetWords(%p.predict(),3,5);
|
||||
%p.schedule(250,"Mpm_MissileRun");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function Mpm_Bmor_Load::Stage2(%data,%p)
|
||||
{
|
||||
if (IsObject(%p))
|
||||
{
|
||||
%p2 = parent::Stage2(%data,%p);
|
||||
Cancel(%p2.stage2);
|
||||
%p2.stage2 = %data.schedule((%p2.s2time-5000),"AtTarget",%p2);
|
||||
}
|
||||
}
|
||||
|
||||
function Mpm_Bmor_Load::AtTarget(%data,%p)
|
||||
{
|
||||
if (IsObject(%p))
|
||||
{
|
||||
%speed = GetWords(%p.predict(),3,5);
|
||||
%p.schedule(100,"Mpm_MortarRun");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function SeekerProjectile::Mpm_BomberRun(%p)
|
||||
{
|
||||
%speed = VectorNormalize(GetWords(%p.predict(),3,5));
|
||||
%adjust = VectorCross(%speed,"0 0 1");
|
||||
%adjust = VectorAdd(VectorScale(VectorCross(%adjust,%speed),GetRandom()*2-1),VectorScale(%adjust,GetRandom()*2-1));
|
||||
%p2=BomberBomb.Create(%p.getWorldBoxCenter(),"0 0 -1",VectorScale(VectorAdd(%speed,%adjust),25));
|
||||
%p.schedule(250,"Mpm_bomberRun");
|
||||
}
|
||||
|
||||
function SeekerProjectile::Mpm_MissileRun(%p)
|
||||
{
|
||||
%speed = GetWords(%p.predict(),3,5);
|
||||
%dir = VectorNormalize(%speed);
|
||||
%for = VectorScale(%dir,-89.3);
|
||||
%left = VectorNormalize(VectorCross("0 0 1",%for));
|
||||
%up = VectorNormalize(VectorCross(%for,%left));
|
||||
%var = VectorAdd(VectorScale(%left,getRandom()*20-10),VectorScale(%up,getRandom()*20-10));
|
||||
%vel = VectorAdd(%for,%var);
|
||||
ShoulderMissile.create(%p.getWorldBoxCenter(),%dir,%vel);
|
||||
%p.schedule(100,"Mpm_MissileRun");
|
||||
}
|
||||
|
||||
function SeekerProjectile::Mpm_MortarRun(%p)
|
||||
{
|
||||
%speed = VectorNormalize(GetWords(%p.predict(),3,5));
|
||||
%adjust = VectorCross(%speed,"0 0 1");
|
||||
%adjust = VectorAdd(VectorScale(VectorCross(%adjust,%speed),GetRandom()*2-1),VectorScale(%adjust,GetRandom()*2-1));
|
||||
|
||||
%p2=MortarShot.Create(%p.getWorldBoxCenter(),"0 0 -1",VectorScale(VectorAdd(%speed,%adjust),25));
|
||||
%p.schedule(150,"Mpm_MortarRun");
|
||||
}
|
||||
|
||||
function Mpm_Base_Load::Explode(%data,%p,%pos)
|
||||
{
|
||||
if (IsObject(%p))
|
||||
{
|
||||
PlayExplosion(%pos,"Mpm_BE_PR","0 0 -1");
|
||||
RadiusExplosion(%p, %pos, 50, 5, 5000, %p.owner, $DamageType::Missile);
|
||||
}
|
||||
}
|
||||
766
scripts/MPM/Mpm_SE.cs
Normal file
766
scripts/MPM/Mpm_SE.cs
Normal file
|
|
@ -0,0 +1,766 @@
|
|||
///Telleport missile
|
||||
|
||||
datablock ParticleData(Mpm_B_MIS_P1)
|
||||
{
|
||||
dragCoeffiecient = 0.0;
|
||||
gravityCoefficient = 0.0;
|
||||
inheritedVelFactor = 1.0;
|
||||
|
||||
lifetimeMS = 8000;
|
||||
lifetimeVarianceMS = 0;
|
||||
|
||||
spinRandomMin = 0.0;
|
||||
spinRandomMax = 0.0;
|
||||
windcoefficient = 0;
|
||||
textureName = "special/lensflare/flare00";
|
||||
|
||||
colors[0] = "0.3 0.3 1.0 0";
|
||||
colors[1] = "0.3 0.3 1.0 1";
|
||||
colors[2] = "0.3 0.3 1.0 1";
|
||||
colors[3] = "0.3 0.3 1.0 0.1";
|
||||
|
||||
sizes[0] = 0;
|
||||
sizes[1] = 10;
|
||||
sizes[2] = 5;
|
||||
sizes[3] = 20;
|
||||
|
||||
times[0] = 0.1;
|
||||
times[1] = 0.2;
|
||||
times[2] = 0.3;
|
||||
times[3] = 1;
|
||||
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(Mpm_B_MIS_PE1)
|
||||
{
|
||||
lifetimeMS = 10;
|
||||
ejectionPeriodMS = 10;
|
||||
periodVarianceMS = 0;
|
||||
|
||||
ejectionVelocity = 1;
|
||||
velocityVariance = 0.0;
|
||||
ejectionoffset = 0;
|
||||
thetaMin = 0.0;
|
||||
thetaMax = 0.0;
|
||||
|
||||
phiReferenceVel = "0";
|
||||
phiVariance = "360";
|
||||
orientParticles = true;
|
||||
orientOnVelocity = true;
|
||||
|
||||
particles = "Mpm_B_MIS_P1";
|
||||
};
|
||||
|
||||
datablock ParticleData(Mpm_B_MIS_P2):Mpm_B_MIS_P1
|
||||
{
|
||||
dragCoeffiecient = 0.0;
|
||||
gravityCoefficient = 0.0;
|
||||
inheritedVelFactor = 1.0;
|
||||
|
||||
lifetimeMS = 1500;
|
||||
lifetimeVarianceMS = 0;
|
||||
|
||||
spinRandomMin = 0.0;
|
||||
spinRandomMax = 0.0;
|
||||
windcoefficient = 0;
|
||||
textureName = "special/lensflare/flare00";
|
||||
|
||||
colors[0] = "0.3 0.3 1.0 0";
|
||||
colors[1] = "0.3 0.3 1.0 1";
|
||||
colors[2] = "0.3 0.3 1.0 1";
|
||||
colors[3] = "0.3 0.3 1.0 0.1";
|
||||
|
||||
sizes[0] = 0;
|
||||
sizes[1] = 8;
|
||||
sizes[2] = 8;
|
||||
sizes[3] = 20;
|
||||
|
||||
times[0] = 0.3;
|
||||
times[1] = 0.5;
|
||||
times[2] = 0.8;
|
||||
times[3] = 1;
|
||||
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(Mpm_B_MIS_PE2):Mpm_B_MIS_PE1
|
||||
{
|
||||
lifetimeMS = 10;
|
||||
ejectionPeriodMS = 50;
|
||||
periodVarianceMS = 0;
|
||||
|
||||
ejectionVelocity = 0.1;
|
||||
velocityVariance = 0.0;
|
||||
ejectionoffset = 0;
|
||||
thetaMin = 140.0;
|
||||
thetaMax = 160.0;
|
||||
|
||||
|
||||
orientParticles = false;
|
||||
orientOnVelocity = false;
|
||||
|
||||
particles = "Mpm_B_MIS_P2";
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
datablock SeekerProjectileData(Mpm_B_MIS):MpmMissile1
|
||||
{
|
||||
casingShapeName = "weapon_missile_casement.dts";
|
||||
projectileShapeName = "turret_muzzlePoint.dts";
|
||||
|
||||
|
||||
explosion = "GrenadeExplosion";
|
||||
splash = MissileSplash;
|
||||
|
||||
baseEmitter = Mpm_B_MIS_PE1;
|
||||
delayEmitter = Mpm_B_MIS_PE2;
|
||||
puffEmitter = MissilePuffEmitter;
|
||||
bubbleEmitter = GrenadeBubbleEmitter;
|
||||
bubbleEmitTime = 1.0;
|
||||
|
||||
exhaustEmitter = MissileLauncherExhaustEmitter;
|
||||
exhaustTimeMs = 300;
|
||||
exhaustNodeName = "muzzlePoint1";
|
||||
|
||||
lifetimeMS = -1;
|
||||
muzzleVelocity = 0.1;
|
||||
maxVelocity = 80000;
|
||||
turningSpeed = 0.0;
|
||||
acceleration = 3;
|
||||
scale = "1 1 1";
|
||||
proximityRadius = 3;
|
||||
|
||||
terrainAvoidanceSpeed = 180;
|
||||
terrainScanAhead = 25;
|
||||
terrainHeightFail = 12;
|
||||
terrainAvoidanceRadius = 100;
|
||||
|
||||
flareDistance = 0;
|
||||
flareAngle = 0;
|
||||
|
||||
sound = HAPCFlyerThrustSound;
|
||||
//BomberFlyerThrustSound;
|
||||
explodeOnDeath = "1";
|
||||
hasLight = true;
|
||||
lightRadius = 10.0;
|
||||
lightColor = "0 0 1";
|
||||
|
||||
useFlechette = false;
|
||||
flechetteDelayMs = 550;
|
||||
casingDeb = FlechetteDebris;
|
||||
|
||||
explodeOnWaterImpact = true;
|
||||
};
|
||||
|
||||
//Multi WarHead Missiles
|
||||
|
||||
datablock ParticleData(Mpm_B_MIS1_P1)
|
||||
{
|
||||
dragCoefficient = 5;
|
||||
gravityCoefficient = 0;
|
||||
inheritedVelFactor = 0.0;
|
||||
constantAcceleration = 0;
|
||||
lifetimeMS = 30000;
|
||||
lifetimeVarianceMS = 0;
|
||||
textureName = "special/BigSpark";
|
||||
windcoefficient = 0;
|
||||
colors[0] = "0.6 0.6 0.6 1";
|
||||
colors[1] = "0.6 0.6 0.6 1";
|
||||
colors[2] = "0.6 0.6 0.6 1";
|
||||
colors[3] = "0.2 0.2 0.2 1";
|
||||
sizes[0] = 0;
|
||||
sizes[1] = 15;
|
||||
sizes[2] = 5;
|
||||
sizes[3] = 0;
|
||||
times[0] = 0.0;
|
||||
times[1] = 0.04;
|
||||
times[2] = 0.08;
|
||||
times[3] = 1;
|
||||
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(Mpm_B_MIS1_PE1)
|
||||
{
|
||||
lifetimeMS = 10;
|
||||
ejectionPeriodMS = 10;
|
||||
periodVarianceMS = 0;
|
||||
|
||||
ejectionVelocity = 10;
|
||||
velocityVariance = 0.0;
|
||||
ejectionoffset = 2;
|
||||
thetaMin = 180.0;
|
||||
thetaMax = 180.0;
|
||||
|
||||
phiReferenceVel = "0";
|
||||
phiVariance = "0";
|
||||
orientParticles = true;
|
||||
orientOnVelocity = false;
|
||||
|
||||
particles = "Mpm_B_MIS1_P1";
|
||||
};
|
||||
|
||||
datablock ParticleData(Mpm_B_MIS1_P2):Mpm_B_MIS_P1
|
||||
{
|
||||
dragCoeffiecient = 0.0;
|
||||
gravityCoefficient = 0.0;
|
||||
inheritedVelFactor = 1.0;
|
||||
constantAcceleration = -0.25;
|
||||
lifetimeMS = 10000;
|
||||
lifetimeVarianceMS = 0;
|
||||
|
||||
spinRandomMin = 0.0;
|
||||
spinRandomMax = 0.0;
|
||||
windcoefficient = 0;
|
||||
textureName = "special/BigSpark";
|
||||
|
||||
colors[0] = "1 1 1.0 1";
|
||||
colors[1] = "1 1 1.0 1";
|
||||
colors[2] = "1 1 1.0 1";
|
||||
colors[3] = "1 1 1.0 0.1";
|
||||
|
||||
sizes[0] = 0;
|
||||
sizes[1] = 5;
|
||||
sizes[2] = 3;
|
||||
sizes[3] = 0;
|
||||
|
||||
times[0] = 0.0;
|
||||
times[1] = 0.04;
|
||||
times[2] = 0.08;
|
||||
times[3] = 1;
|
||||
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(Mpm_B_MIS1_PE2):Mpm_B_MIS_PE1
|
||||
{
|
||||
lifetimeMS = 10;
|
||||
ejectionPeriodMS = 50;
|
||||
periodVarianceMS = 0;
|
||||
|
||||
ejectionVelocity = 5;
|
||||
velocityVariance = 0.0;
|
||||
ejectionoffset = 5;
|
||||
thetaMin = 150.0;
|
||||
thetaMax = 180.0;
|
||||
phiReferenceVel = "0";
|
||||
phiVariance = "360";
|
||||
|
||||
orientParticles = true;
|
||||
orientOnVelocity = true;
|
||||
|
||||
particles = "Mpm_B_MIS1_P2";
|
||||
};
|
||||
|
||||
|
||||
|
||||
datablock SeekerProjectileData(Mpm_B_MIS1):MpmMissile1
|
||||
{
|
||||
casingShapeName = "weapon_missile_casement.dts";
|
||||
projectileShapeName = "turret_muzzlePoint.dts";
|
||||
|
||||
|
||||
explosion = "GrenadeExplosion";
|
||||
splash = MissileSplash;
|
||||
|
||||
baseEmitter = Mpm_B_MIS1_PE1;
|
||||
delayEmitter = Mpm_B_MIS1_PE2;
|
||||
puffEmitter = MissilePuffEmitter;
|
||||
bubbleEmitter = GrenadeBubbleEmitter;
|
||||
bubbleEmitTime = 1.0;
|
||||
|
||||
exhaustEmitter = MissileLauncherExhaustEmitter;
|
||||
exhaustTimeMs = 300;
|
||||
exhaustNodeName = "muzzlePoint1";
|
||||
|
||||
lifetimeMS = -1;
|
||||
muzzleVelocity = 0.1;
|
||||
maxVelocity = 80000;
|
||||
turningSpeed = 0.0;
|
||||
acceleration = 3;
|
||||
scale = "1 1 1";
|
||||
proximityRadius = 3;
|
||||
|
||||
terrainAvoidanceSpeed = 180;
|
||||
terrainScanAhead = 25;
|
||||
terrainHeightFail = 12;
|
||||
terrainAvoidanceRadius = 100;
|
||||
|
||||
flareDistance = 0;
|
||||
flareAngle = 0;
|
||||
|
||||
sound = HAPCFlyerThrustSound;
|
||||
//BomberFlyerThrustSound;
|
||||
explodeOnDeath = "1";
|
||||
hasLight = true;
|
||||
lightRadius = 10.0;
|
||||
lightColor = "1 1 0";
|
||||
|
||||
useFlechette = false;
|
||||
flechetteDelayMs = 550;
|
||||
casingDeb = FlechetteDebris;
|
||||
|
||||
explodeOnWaterImpact = true;
|
||||
};
|
||||
|
||||
|
||||
|
||||
//Anti Missile
|
||||
|
||||
datablock ParticleData(Mpm_B_MIS2_P1)
|
||||
{
|
||||
dragCoefficient = 5;
|
||||
gravityCoefficient = 0;
|
||||
inheritedVelFactor = 0.0;
|
||||
constantAcceleration = 0;
|
||||
lifetimeMS = 30000;
|
||||
lifetimeVarianceMS = 0;
|
||||
textureName = "special/sniper00";
|
||||
windcoefficient = 0;
|
||||
colors[0] = "0.6 0.6 0.6 1";
|
||||
colors[1] = "0.6 0.6 0.6 1";
|
||||
colors[2] = "0.6 0.6 0.6 1";
|
||||
colors[3] = "0.2 0.2 0.2 0";
|
||||
sizes[0] = 0;
|
||||
sizes[1] = 5;
|
||||
sizes[2] = 2;
|
||||
sizes[3] = 2;
|
||||
times[0] = 0.0;
|
||||
times[1] = 0.04;
|
||||
times[2] = 0.08;
|
||||
times[3] = 1;
|
||||
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(Mpm_B_MIS2_PE1)
|
||||
{
|
||||
lifetimeMS = 10;
|
||||
ejectionPeriodMS = 10;
|
||||
periodVarianceMS = 0;
|
||||
|
||||
ejectionVelocity = 0;
|
||||
velocityVariance = 0.0;
|
||||
ejectionoffset = 2;
|
||||
thetaMin = 180.0;
|
||||
thetaMax = 180.0;
|
||||
|
||||
phiReferenceVel = "0";
|
||||
phiVariance = "0";
|
||||
orientParticles = true;
|
||||
orientOnVelocity = false;
|
||||
|
||||
particles = "Mpm_B_MIS2_P1";
|
||||
};
|
||||
|
||||
datablock ParticleData(Mpm_B_MIS2_P2):Mpm_B_MIS_P1
|
||||
{
|
||||
dragCoeffiecient = 0.0;
|
||||
gravityCoefficient = 0.0;
|
||||
inheritedVelFactor = 1.0;
|
||||
constantAcceleration = 0.0;
|
||||
lifetimeMS = 500;
|
||||
lifetimeVarianceMS = 0;
|
||||
|
||||
spinRandomMin = -30.0;
|
||||
spinRandomMax = 30.0;
|
||||
windcoefficient = 0.5;
|
||||
textureName = "special/flare3";
|
||||
colors[0] = "1 1 0.0 1";
|
||||
colors[1] = "1 1 0.0 1";
|
||||
colors[2] = "1 1 0.0 1";
|
||||
colors[3] = "1 1 0.0 0.1";
|
||||
|
||||
sizes[0] = 10;
|
||||
sizes[1] = 10;
|
||||
sizes[2] = 10;
|
||||
sizes[3] = 10;
|
||||
|
||||
times[0] = 0.4;
|
||||
times[1] = 0.6;
|
||||
times[2] = 0.8;
|
||||
times[3] = 1;
|
||||
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(Mpm_B_MIS2_PE2):Mpm_B_MIS_PE1
|
||||
{
|
||||
lifetimeMS = 10;
|
||||
ejectionPeriodMS = 100;
|
||||
periodVarianceMS = 0;
|
||||
|
||||
ejectionVelocity = 0.1;
|
||||
velocityVariance = 0.0;
|
||||
ejectionoffset = 0;
|
||||
thetaMin = 0.0;
|
||||
thetaMax = 0.0;
|
||||
phiReferenceVel = "0";
|
||||
phiVariance = "0";
|
||||
|
||||
orientParticles = false;
|
||||
orientOnVelocity = false;
|
||||
|
||||
particles = "Mpm_B_MIS2_P2";
|
||||
};
|
||||
|
||||
datablock SeekerProjectileData(Mpm_B_MIS2):MpmMissile1
|
||||
{
|
||||
casingShapeName = "weapon_missile_casement.dts";
|
||||
projectileShapeName = "turret_muzzlePoint.dts";
|
||||
|
||||
|
||||
explosion = "GrenadeExplosion";
|
||||
splash = MissileSplash;
|
||||
|
||||
baseEmitter = Mpm_B_MIS2_PE1;
|
||||
delayEmitter = Mpm_B_MIS2_PE2;
|
||||
puffEmitter = MissilePuffEmitter;
|
||||
bubbleEmitter = GrenadeBubbleEmitter;
|
||||
bubbleEmitTime = 1.0;
|
||||
|
||||
exhaustEmitter = MissileLauncherExhaustEmitter;
|
||||
exhaustTimeMs = 300;
|
||||
exhaustNodeName = "muzzlePoint1";
|
||||
|
||||
lifetimeMS = -1;
|
||||
muzzleVelocity = 20.0;
|
||||
maxVelocity = 20;
|
||||
turningSpeed = 0.0;
|
||||
acceleration = 0;
|
||||
scale = "1 1 1";
|
||||
proximityRadius = 3;
|
||||
|
||||
terrainAvoidanceSpeed = 180;
|
||||
terrainScanAhead = 25;
|
||||
terrainHeightFail = 12;
|
||||
terrainAvoidanceRadius = 100;
|
||||
|
||||
flareDistance = 0;
|
||||
flareAngle = 0;
|
||||
|
||||
sound = HAPCFlyerThrustSound;
|
||||
//BomberFlyerThrustSound;
|
||||
explodeOnDeath = "1";
|
||||
hasLight = true;
|
||||
lightRadius = 10.0;
|
||||
lightColor = "1 0 0";
|
||||
|
||||
useFlechette = false;
|
||||
flechetteDelayMs = 550;
|
||||
casingDeb = FlechetteDebris;
|
||||
|
||||
explodeOnWaterImpact = true;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
//Vehicle Missile
|
||||
|
||||
datablock ParticleData(Mpm_B_MIS3_P1)
|
||||
{
|
||||
dragCoeffiecient = 0.0;
|
||||
gravityCoefficient = 0.0;
|
||||
inheritedVelFactor = 0.0;
|
||||
|
||||
lifetimeMS = 60000;
|
||||
lifetimeVarianceMS = 0;
|
||||
|
||||
spinRandomMin = 0.0;
|
||||
spinRandomMax = 0.0;
|
||||
windcoefficient = 0.5;
|
||||
textureName = "skins/jetflare2";
|
||||
|
||||
colors[0] = "0.3 0.8 0.6 1";
|
||||
colors[1] = "0.3 0.8 0.0 0.9";
|
||||
colors[2] = "0.3 0.8 0.6 0.5";
|
||||
colors[3] = "0.3 0.8 0.6 0.0";
|
||||
|
||||
sizes[0] = 5;
|
||||
sizes[1] = 17;
|
||||
sizes[2] = 18;
|
||||
sizes[3] = 20;
|
||||
|
||||
times[0] = 0;
|
||||
times[1] = 0.25;
|
||||
times[2] = 0.5;
|
||||
times[3] = 0.75;
|
||||
|
||||
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(Mpm_B_MIS3_PE1)
|
||||
{
|
||||
|
||||
lifetimeMS = 10;
|
||||
ejectionPeriodMS = 100;
|
||||
periodVarianceMS = 0;
|
||||
|
||||
ejectionVelocity = 10.0;
|
||||
velocityVariance = 1.0;
|
||||
ejectionoffset = 0;
|
||||
thetaMin = 0.0;
|
||||
thetaMax = 5.0;
|
||||
|
||||
|
||||
orientParticles = false;
|
||||
orientOnVelocity = false;
|
||||
|
||||
particles = "Mpm_B_MIS3_P1";
|
||||
};
|
||||
|
||||
datablock ParticleData(Mpm_B_MIS3_P2):Mpm_B_MIS_P1
|
||||
{
|
||||
dragCoeffiecient = 0.0;
|
||||
gravityCoefficient = 0.0;
|
||||
inheritedVelFactor = 1.0;
|
||||
|
||||
lifetimeMS = 1000;
|
||||
lifetimeVarianceMS = 0;
|
||||
|
||||
spinRandomMin = -160.0;
|
||||
spinRandomMax = 160.0;
|
||||
windcoefficient = 0;
|
||||
textureName = "skins/flaregreen";
|
||||
UseInvAlpha = false;
|
||||
colors[0] = "0.7 0.7 1.0 0.5";
|
||||
colors[1] = "0.7 0.7 1.0 0.5";
|
||||
colors[2] = "0.7 0.7 1.0 0.5";
|
||||
colors[3] = "0.7 0.7 1.0 0.5";
|
||||
|
||||
sizes[0] = 20;
|
||||
sizes[1] = 20;
|
||||
sizes[2] = 20;
|
||||
sizes[3] = 20;
|
||||
|
||||
times[0] = 0.25;
|
||||
times[1] = 0.25;
|
||||
times[2] = 0.25;
|
||||
times[3] = 1;
|
||||
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(Mpm_B_MIS3_PE2):Mpm_B_MIS_PE1
|
||||
{
|
||||
lifetimeMS = 10;
|
||||
ejectionPeriodMS = 100;
|
||||
periodVarianceMS = 0;
|
||||
|
||||
ejectionVelocity = 0.1;
|
||||
velocityVariance = 0.0;
|
||||
ejectionoffset = 0;
|
||||
thetaMin = 0.0;
|
||||
thetaMax = 0.0;
|
||||
phiReferenceVel = "0";
|
||||
phiVariance = "0";
|
||||
|
||||
orientParticles = false;
|
||||
orientOnVelocity = false;
|
||||
|
||||
particles = "Mpm_B_MIS3_P2";
|
||||
};
|
||||
|
||||
datablock SeekerProjectileData(Mpm_B_MIS3):MpmMissile1
|
||||
{
|
||||
casingShapeName = "weapon_missile_casement.dts";
|
||||
projectileShapeName = "turret_muzzlePoint.dts";
|
||||
|
||||
|
||||
explosion = "GrenadeExplosion";
|
||||
splash = MissileSplash;
|
||||
|
||||
baseEmitter = Mpm_B_MIS3_PE1;
|
||||
delayEmitter = Mpm_B_MIS3_PE2;
|
||||
puffEmitter = MissilePuffEmitter;
|
||||
bubbleEmitter = GrenadeBubbleEmitter;
|
||||
bubbleEmitTime = 1.0;
|
||||
|
||||
exhaustEmitter = MissileLauncherExhaustEmitter;
|
||||
exhaustTimeMs = 300;
|
||||
exhaustNodeName = "muzzlePoint1";
|
||||
|
||||
lifetimeMS = -1;
|
||||
muzzleVelocity = 0.1;
|
||||
maxVelocity = 80000;
|
||||
turningSpeed = 0.0;
|
||||
acceleration = 1;
|
||||
scale = "1 1 1";
|
||||
proximityRadius = 3;
|
||||
|
||||
terrainAvoidanceSpeed = 180;
|
||||
terrainScanAhead = 25;
|
||||
terrainHeightFail = 12;
|
||||
terrainAvoidanceRadius = 100;
|
||||
|
||||
flareDistance = 0;
|
||||
flareAngle = 0;
|
||||
|
||||
sound = HAPCFlyerThrustSound;
|
||||
//BomberFlyerThrustSound;
|
||||
explodeOnDeath = "1";
|
||||
hasLight = true;
|
||||
lightRadius = 10.0;
|
||||
lightColor = "0 1 0";
|
||||
|
||||
useFlechette = false;
|
||||
flechetteDelayMs = 550;
|
||||
casingDeb = FlechetteDebris;
|
||||
|
||||
explodeOnWaterImpact = true;
|
||||
};
|
||||
|
||||
|
||||
|
||||
//Aid Missile
|
||||
|
||||
datablock ParticleData(Mpm_B_MIS4_P1)
|
||||
{
|
||||
dragCoeffiecient = 0.0;
|
||||
gravityCoefficient = 0.0;
|
||||
inheritedVelFactor = 0.0;
|
||||
|
||||
lifetimeMS = 60000;
|
||||
lifetimeVarianceMS = 0;
|
||||
|
||||
spinRandomMin = 0.0;
|
||||
spinRandomMax = 0.0;
|
||||
windcoefficient = 0.5;
|
||||
textureName = "skins/jetflare2";
|
||||
|
||||
colors[0] = "0.3 0.3 0.8 1";
|
||||
colors[1] = "0.0 0.0 0.8 0.9";
|
||||
colors[2] = "0.3 0.3 0.8 0.5";
|
||||
colors[3] = "0.3 0.3 0.8 0.0";
|
||||
|
||||
sizes[0] = 5;
|
||||
sizes[1] = 17;
|
||||
sizes[2] = 18;
|
||||
sizes[3] = 20;
|
||||
|
||||
times[0] = 0;
|
||||
times[1] = 0.25;
|
||||
times[2] = 0.5;
|
||||
times[3] = 0.75;
|
||||
|
||||
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(Mpm_B_MIS4_PE1)
|
||||
{
|
||||
|
||||
lifetimeMS = 10;
|
||||
ejectionPeriodMS = 50;
|
||||
periodVarianceMS = 0;
|
||||
|
||||
ejectionVelocity = 10.0;
|
||||
velocityVariance = 1.0;
|
||||
ejectionoffset = 0;
|
||||
thetaMin = 0.0;
|
||||
thetaMax = 5.0;
|
||||
|
||||
|
||||
orientParticles = false;
|
||||
orientOnVelocity = false;
|
||||
|
||||
particles = "Mpm_B_MIS4_P1";
|
||||
};
|
||||
|
||||
datablock ParticleData(Mpm_B_MIS4_P2):Mpm_B_MIS_P1
|
||||
{
|
||||
dragCoeffiecient = 0.0;
|
||||
gravityCoefficient = 0.0;
|
||||
inheritedVelFactor = 1.0;
|
||||
|
||||
lifetimeMS = 1000;
|
||||
lifetimeVarianceMS = 0;
|
||||
|
||||
spinRandomMin = -160.0;
|
||||
spinRandomMax = 160.0;
|
||||
windcoefficient = 0;
|
||||
textureName = "skins/flaregreen";
|
||||
UseInvAlpha = false;
|
||||
colors[0] = "0.2 0.2 1.0 0.5";
|
||||
colors[1] = "0.2 0.2 1.0 0.5";
|
||||
colors[2] = "0.2 0.2 1.0 0.5";
|
||||
colors[3] = "0.2 0.2 1.0 0.5";
|
||||
|
||||
sizes[0] = 20;
|
||||
sizes[1] = 20;
|
||||
sizes[2] = 20;
|
||||
sizes[3] = 20;
|
||||
|
||||
times[0] = 0.25;
|
||||
times[1] = 0.25;
|
||||
times[2] = 0.25;
|
||||
times[3] = 1;
|
||||
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(Mpm_B_MIS4_PE2):Mpm_B_MIS_PE1
|
||||
{
|
||||
lifetimeMS = 10;
|
||||
ejectionPeriodMS = 100;
|
||||
periodVarianceMS = 0;
|
||||
|
||||
ejectionVelocity = 0.1;
|
||||
velocityVariance = 0.0;
|
||||
ejectionoffset = 0;
|
||||
thetaMin = 0.0;
|
||||
thetaMax = 0.0;
|
||||
phiReferenceVel = "0";
|
||||
phiVariance = "0";
|
||||
|
||||
orientParticles = false;
|
||||
orientOnVelocity = false;
|
||||
|
||||
particles = "Mpm_B_MIS4_P2";
|
||||
};
|
||||
|
||||
datablock SeekerProjectileData(Mpm_B_MIS4):MpmMissile1
|
||||
{
|
||||
casingShapeName = "weapon_missile_casement.dts";
|
||||
projectileShapeName = "turret_muzzlePoint.dts";
|
||||
|
||||
|
||||
explosion = "GrenadeExplosion";
|
||||
splash = MissileSplash;
|
||||
|
||||
baseEmitter = Mpm_B_MIS4_PE1;
|
||||
delayEmitter = Mpm_B_MIS4_PE2;
|
||||
puffEmitter = MissilePuffEmitter;
|
||||
bubbleEmitter = GrenadeBubbleEmitter;
|
||||
bubbleEmitTime = 1.0;
|
||||
|
||||
exhaustEmitter = MissileLauncherExhaustEmitter;
|
||||
exhaustTimeMs = 300;
|
||||
exhaustNodeName = "muzzlePoint1";
|
||||
|
||||
lifetimeMS = -1;
|
||||
muzzleVelocity = 0.1;
|
||||
maxVelocity = 80000;
|
||||
turningSpeed = 0.0;
|
||||
acceleration = 1;
|
||||
scale = "1 1 1";
|
||||
proximityRadius = 3;
|
||||
|
||||
terrainAvoidanceSpeed = 180;
|
||||
terrainScanAhead = 25;
|
||||
terrainHeightFail = 12;
|
||||
terrainAvoidanceRadius = 100;
|
||||
|
||||
flareDistance = 0;
|
||||
flareAngle = 0;
|
||||
|
||||
sound = HAPCFlyerThrustSound;
|
||||
//BomberFlyerThrustSound;
|
||||
explodeOnDeath = "1";
|
||||
hasLight = true;
|
||||
lightRadius = 10.0;
|
||||
lightColor = "0 0 1";
|
||||
|
||||
useFlechette = false;
|
||||
flechetteDelayMs = 550;
|
||||
casingDeb = FlechetteDebris;
|
||||
|
||||
explodeOnWaterImpact = true;
|
||||
};
|
||||
|
||||
|
||||
193
scripts/MPM/Mpm_TE.cs
Normal file
193
scripts/MPM/Mpm_TE.cs
Normal file
|
|
@ -0,0 +1,193 @@
|
|||
if ($mpm_TE != 1)
|
||||
{
|
||||
$mpm_load[$mpm_loads] = Mpm_TE_Load;
|
||||
$mpm_loads++;
|
||||
$mpm_TE = 1;
|
||||
}
|
||||
|
||||
|
||||
datablock ItemData(Mpm_TE_Load)
|
||||
{
|
||||
cost = 10;
|
||||
missile = Mpm_B_MIS;
|
||||
name = "MPB Telleporter";
|
||||
friendly = 1;
|
||||
slot = 0;
|
||||
};
|
||||
|
||||
|
||||
|
||||
datablock ParticleData(Mpm_TE_P)
|
||||
{
|
||||
dragCoeffiecient = 0.0;
|
||||
gravityCoefficient = 0.0;
|
||||
inheritedVelFactor = 0.0;
|
||||
|
||||
lifetimeMS = 1500;
|
||||
lifetimeVarianceMS = 0;
|
||||
|
||||
spinRandomMin = 30.0;
|
||||
spinRandomMax = 30.0;
|
||||
windcoefficient = 0;
|
||||
textureName = "skins/jetflare03";
|
||||
|
||||
colors[0] = "0.3 0.3 1.0 0.1";
|
||||
colors[1] = "0.3 0.3 1.0 1";
|
||||
colors[2] = "0.3 0.3 1.0 1";
|
||||
colors[3] = "0.3 0.3 1.0 0.1";
|
||||
|
||||
sizes[0] = 5;
|
||||
sizes[1] = 5;
|
||||
sizes[2] = 5;
|
||||
sizes[3] = 5;
|
||||
|
||||
times[0] = 0.25;
|
||||
times[1] = 0.5;
|
||||
times[2] = 0.75;
|
||||
times[3] = 1;
|
||||
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(Mpm_TE_PE)
|
||||
{
|
||||
lifetimeMS = 10;
|
||||
ejectionPeriodMS = 10;
|
||||
periodVarianceMS = 0;
|
||||
|
||||
ejectionVelocity = 0.01;
|
||||
velocityVariance = 0.0;
|
||||
ejectionoffset = 8;
|
||||
thetaMin = 80.0;
|
||||
thetaMax = 100.0;
|
||||
|
||||
phiReferenceVel = "180";
|
||||
phiVariance = "5";
|
||||
orientParticles = false;
|
||||
orientOnVelocity = false;
|
||||
|
||||
particles = "Mpm_TE_P";
|
||||
};
|
||||
|
||||
|
||||
function Mpm_TE_Load::Explode(%data,%p,%pos)
|
||||
{
|
||||
//echo("explode");
|
||||
if (IsObject(%p))
|
||||
{
|
||||
//if(VectorDist(%p.targetlocation,%pos)<50)
|
||||
%p.load.AtTarget(%p);
|
||||
}
|
||||
}
|
||||
|
||||
function Mpm_TE_Load::AtTarget(%data,%p)
|
||||
{
|
||||
//echo("attar");
|
||||
if (IsObject(%p))
|
||||
{
|
||||
%p.source.mpb.MPM_TelleportMpb(VectorAdd(%p.getTransform(),"0 0 10"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function Mpb_undeploy(%obj)
|
||||
{
|
||||
if (%obj.deploySchedule)
|
||||
{
|
||||
%obj.deploySchedule.clear();
|
||||
%obj.deploySchedule = "";
|
||||
}
|
||||
|
||||
if (%obj.deployed !$= "" && %obj.deployed == 1)
|
||||
{
|
||||
%obj.setThreadDir($DeployThread, false);
|
||||
%obj.playThread($DeployThread,"deploy");
|
||||
%obj.playAudio($DeploySound, MobileBaseUndeploySound);
|
||||
%obj.station.setThreadDir($DeployThread, false);
|
||||
%obj.station.getDataBlock().onLosePowerDisabled(%obj.station);
|
||||
%obj.station.clearSelfPowered();
|
||||
%obj.station.goingOut=false;
|
||||
%obj.station.notDeployed = 1;
|
||||
%obj.station.playAudio($DeploySound, MobileBaseStationUndeploySound);
|
||||
|
||||
if (isObject(%obj.turret) && isObject(%turretClient = %obj.turret.getControllingClient()) !$= "")
|
||||
{
|
||||
CommandToServer( 'resetControlObject', %turretClient );
|
||||
}
|
||||
if (isObject(%obj.turret))
|
||||
%obj.turret.setThreadDir($DeployThread, false);
|
||||
//[most]
|
||||
if (isObject(%obj.nuke))
|
||||
%obj.nuke.mpm_all_off(0);
|
||||
//[most]
|
||||
%obj.turret.clearTarget();
|
||||
%obj.turret.setTargetObject(-1);
|
||||
|
||||
%obj.turret.playAudio($DeploySound, MobileBaseTurretUndeploySound);
|
||||
%obj.shield.open();
|
||||
%obj.shield.schedule(1000,"delete");
|
||||
%obj.deploySchedule = "";
|
||||
|
||||
%obj.fullyDeployed = 0;
|
||||
|
||||
%obj.noEnemyControl = 0;
|
||||
}
|
||||
%obj.deployed = 0;
|
||||
|
||||
}
|
||||
|
||||
function GameBase::MPM_TelleportMpb(%mpb,%target)
|
||||
{
|
||||
%p1 = CreateEmitter(%mpb.getTransform(),Mpm_TE_PE);
|
||||
%p2 = CreateEmitter(%mpb.getTransform(),Mpm_TE_PE);
|
||||
%p2.setRotation("1 0 0 3.14");
|
||||
%p3 = CreateEmitter(%target,Mpm_TE_PE);
|
||||
%p4 = CreateEmitter(%target,Mpm_TE_PE);
|
||||
%p4.setRotation("1 0 0 3.14");
|
||||
if (%mpb.deployed)
|
||||
{
|
||||
if (IsObject(%mpb.nuke.leftpad.getMountedObject(0)))
|
||||
%mpb.mountObject(%mpb.nuke.leftpad.getMountedObject(0),0);
|
||||
else if (IsObject(%mpb.nuke.rightpad.getMountedObject(0)))
|
||||
%mpb.mountObject(%mpb.nuke.rightpad.getMountedObject(0),0);
|
||||
|
||||
%mpb.schedule(7000,"telleport",%target);
|
||||
Schedule(7000,%mpb,"RadiusTelleport",%mpb,%mpb.getTransform(),%target);
|
||||
%p1.schedule(11000,"delete");
|
||||
%p2.schedule(11000,"delete");
|
||||
%p3.schedule(11000,"delete");
|
||||
%p4.schedule(11000,"delete");
|
||||
mpb_undeploy(%mpb);
|
||||
}
|
||||
else
|
||||
{
|
||||
%mpb.schedule(1500,"telleport",%target);
|
||||
Schedule(1500,%mpb,"RadiusTelleport",%mpb,%mpb.getTransform(),%target);
|
||||
%p1.schedule(5500,"delete");
|
||||
%p2.schedule(5500,"delete");
|
||||
%p3.schedule(5500,"delete");
|
||||
%p4.schedule(5500,"delete");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function RadiusTelleport(%obj,%pos,%target)
|
||||
{
|
||||
%mask = $TypeMasks::PlayerObjectType | $TypeMasks::ItemObjectType;
|
||||
InitContainerRadiusSearch(%pos, 8, %mask);
|
||||
while ((%test = containerSearchNext()) != 0)
|
||||
{
|
||||
if (%test != %obj && %test != %obj.getMountedObject(0))
|
||||
{
|
||||
%offset = VectorSub(%test.getTransform(),%pos);
|
||||
%test.telleport(VectorAdd(%target,%offset));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function GameBase::telleport(%obj,%pos)
|
||||
{
|
||||
teleportStartFX(%obj);
|
||||
schedule(500,0,"teleportEndFX",%obj);
|
||||
%obj.schedule(500,"SetTransform",%pos SPC rot(%obj));
|
||||
}
|
||||
|
||||
205
scripts/MPM/Mpm_VE.cs
Normal file
205
scripts/MPM/Mpm_VE.cs
Normal file
|
|
@ -0,0 +1,205 @@
|
|||
if ($mpm_VE!=1)
|
||||
{
|
||||
$mpm_load[$mpm_loads] = Mpm_VE_Load0;
|
||||
$mpm_loads++;
|
||||
$mpm_load[$mpm_loads] = Mpm_VE_Load1;
|
||||
$mpm_loads++;
|
||||
$mpm_load[$mpm_loads] = Mpm_VE_Load2;
|
||||
$mpm_loads++;
|
||||
$mpm_load[$mpm_loads] = Mpm_VE_Load3;
|
||||
$mpm_loads++;
|
||||
$mpm_load[$mpm_loads] = Mpm_VE_Load4;
|
||||
$mpm_loads++;
|
||||
$mpm_load[$mpm_loads] = Mpm_VE_Load5;
|
||||
$mpm_loads++;
|
||||
$mpm_load[$mpm_loads] = Mpm_VE_Load6;
|
||||
$mpm_loads++;
|
||||
$mpm_load[$mpm_loads] = Mpm_VE_Load7;
|
||||
$mpm_loads++;
|
||||
$mpm_load[$mpm_loads] = Mpm_VE_Load8;
|
||||
$mpm_loads++;
|
||||
$mpm_VE = 1;
|
||||
}
|
||||
|
||||
datablock ParticleData(Mpm_VE_P1)
|
||||
{
|
||||
dragCoeffiecient = 0.0;
|
||||
gravityCoefficient = 0.0;
|
||||
inheritedVelFactor = 0.0;
|
||||
|
||||
lifetimeMS = 2500;
|
||||
lifetimeVarianceMS = 0;
|
||||
|
||||
spinRandomMin = 0.0;
|
||||
spinRandomMax = 0.0;
|
||||
windcoefficient = 0;
|
||||
textureName = "special/GameGrid";
|
||||
|
||||
colors[0] = "0.3 0.3 1.0 0.1";
|
||||
colors[1] = "0.3 0.3 1.0 1";
|
||||
colors[2] = "0.3 0.3 1.0 1";
|
||||
colors[3] = "0.3 0.3 1.0 0.1";
|
||||
|
||||
sizes[0] = 5;
|
||||
sizes[1] = 5;
|
||||
sizes[2] = 5;
|
||||
sizes[3] = 5;
|
||||
|
||||
times[0] = 0.1;
|
||||
times[1] = 0.5;
|
||||
times[2] = 0.9;
|
||||
times[3] = 1;
|
||||
|
||||
};
|
||||
|
||||
|
||||
datablock ParticleData(Mpm_VE_P2)
|
||||
{
|
||||
dragCoeffiecient = 0.0;
|
||||
gravityCoefficient = 0.0;
|
||||
inheritedVelFactor = 0.0;
|
||||
|
||||
lifetimeMS = 2500;
|
||||
lifetimeVarianceMS = 0;
|
||||
|
||||
spinRandomMin = 0.0;
|
||||
spinRandomMax = 0.0;
|
||||
windcoefficient = 0;
|
||||
textureName = "special/GameGrid";
|
||||
|
||||
|
||||
colors[0] = "0.3 0.3 1.0 0.1";
|
||||
colors[1] = "0.3 0.3 1.0 1";
|
||||
colors[2] = "0.3 0.3 1.0 1";
|
||||
colors[3] = "0.3 0.3 1.0 0.1";
|
||||
|
||||
sizes[0] = 5;
|
||||
sizes[1] = 5;
|
||||
sizes[2] = 5;
|
||||
sizes[3] = 5;
|
||||
|
||||
times[0] = 0.1;
|
||||
times[1] = 0.5;
|
||||
times[2] = 0.9;
|
||||
times[3] = 1;
|
||||
|
||||
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(Mpm_VE_PE1)
|
||||
{
|
||||
lifetimeMS = 10;
|
||||
ejectionPeriodMS = 15;
|
||||
periodVarianceMS = 0;
|
||||
|
||||
ejectionVelocity = 0.1;
|
||||
velocityVariance = 0.0;
|
||||
ejectionoffset = 8;
|
||||
thetaMin = 70.0;
|
||||
thetaMax = 70.0;
|
||||
|
||||
phiReferenceVel = "180";
|
||||
phiVariance = "5";
|
||||
orientParticles = true;
|
||||
orientOnVelocity = false;
|
||||
|
||||
particles = "Mpm_VE_P1";
|
||||
};
|
||||
|
||||
|
||||
datablock ParticleEmitterData(Mpm_VE_PE2)
|
||||
{
|
||||
lifetimeMS = 10;
|
||||
ejectionPeriodMS = 15;
|
||||
periodVarianceMS = 0;
|
||||
|
||||
ejectionVelocity = 0.01;
|
||||
velocityVariance = 0.0;
|
||||
ejectionoffset = 8;
|
||||
thetaMin = 30.0;
|
||||
thetaMax = 30.0;
|
||||
|
||||
phiReferenceVel = "180";
|
||||
phiVariance = "5";
|
||||
orientParticles = true;
|
||||
orientOnVelocity = false;
|
||||
|
||||
|
||||
particles = "Mpm_VE_P2";
|
||||
};
|
||||
|
||||
datablock ItemData(Mpm_VE_Load0)
|
||||
{
|
||||
cost = 20;
|
||||
missile = Mpm_B_MIS3;
|
||||
name = "[Vehicle] Grav Cycle Missile";
|
||||
friendly = 1;
|
||||
vehicle = ScoutVehicle;
|
||||
slot = 0;
|
||||
};
|
||||
|
||||
datablock ItemData(Mpm_VE_Load1):Mpm_VE_Load0
|
||||
{
|
||||
cost = 40;
|
||||
name = "[Vehicle] Tank Missile";
|
||||
vehicle = AssaultVehicle;
|
||||
};
|
||||
datablock ItemData(Mpm_VE_Load2):Mpm_VE_Load0
|
||||
{
|
||||
cost = 100;
|
||||
name = "[Vehicle] Mpb Missile";
|
||||
vehicle = MobileBaseVehicle;
|
||||
};
|
||||
|
||||
datablock ItemData(Mpm_VE_Load3):Mpm_VE_Load0
|
||||
{
|
||||
cost = 25;
|
||||
name = "[Vehicle] Shrike Missile";
|
||||
vehicle = ScoutFlyer;
|
||||
};
|
||||
datablock ItemData(Mpm_VE_Load4):Mpm_VE_Load0
|
||||
{
|
||||
cost = 50;
|
||||
name = "[Vehicle] Bomber Missile";
|
||||
vehicle = BomberFlyer;
|
||||
};
|
||||
|
||||
datablock ItemData(Mpm_VE_Load5):Mpm_VE_Load0
|
||||
{
|
||||
cost = 80;
|
||||
name = "[Vehicle] Havoc Missile";
|
||||
vehicle = HAPCFlyer;
|
||||
};
|
||||
datablock ItemData(Mpm_VE_Load6):Mpm_VE_Load0
|
||||
{
|
||||
cost = 800;
|
||||
name = "[Vehicle] Super Grav Cycle Missile";
|
||||
vehicle = SuperScoutVehicle;
|
||||
};
|
||||
|
||||
datablock ItemData(Mpm_VE_Load7):Mpm_VE_Load0
|
||||
{
|
||||
cost = 800;
|
||||
name = "[Vehicle] Super Havoc Missile";
|
||||
vehicle = SuperHAPCFlyer;
|
||||
};
|
||||
datablock ItemData(Mpm_VE_Load8):Mpm_VE_Load0
|
||||
{
|
||||
cost = 700;
|
||||
name = "[Vehicle] Artillery Missile";
|
||||
vehicle = Artillery;
|
||||
};
|
||||
|
||||
function Mpm_VE_Load0::AtTarget(%data,%p)
|
||||
{
|
||||
if (IsObject(%p) && vehicleCheck(%p.load.vehicle, %p.source.team))
|
||||
{
|
||||
%p1 = CreateEmitter(%p.getTransform(),Mpm_VE_PE1);
|
||||
%p2 = CreateEmitter(%p.getTransform(),Mpm_VE_PE2);
|
||||
$VehicleTotalCount[%p.source.team, %p.load.vehicle]++;
|
||||
%vehicle = %p.load.vehicle.create(%p.source.team);
|
||||
%vehicle.telleport(VectorAdd(%p.getTransform(),"0 0 10"));
|
||||
%p1.schedule(8000,"delete");
|
||||
%p2.schedule(8000,"delete");
|
||||
}
|
||||
}
|
||||
1356
scripts/MPM/Nuclear_blast.cs
Normal file
1356
scripts/MPM/Nuclear_blast.cs
Normal file
File diff suppressed because it is too large
Load diff
2585
scripts/MPM/Nuke_Cannon.cs
Normal file
2585
scripts/MPM/Nuke_Cannon.cs
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue