mirror of
https://github.com/PhantomGamesDevelopment/TWM2.git
synced 2026-07-12 15:04:38 +00:00
Initial Commit
This commit is contained in:
commit
bd51490b14
316 changed files with 150033 additions and 0 deletions
365
scripts/weapons/Other/AcidCannon.cs
Normal file
365
scripts/weapons/Other/AcidCannon.cs
Normal file
|
|
@ -0,0 +1,365 @@
|
|||
// Acid Cannon
|
||||
datablock AudioProfile(AcidCannonPreFireSound) {
|
||||
filename = "fx/weapons/targetinglaser_paint.wav";
|
||||
description = AudioClosest3d;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
datablock AudioProfile(NerfBallExplosionSound) {
|
||||
filename = "fx/weapons/cg_water2.wav";
|
||||
description = AudioClosest3d;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
//acid bomb
|
||||
datablock ParticleData(ZAcidBombParticle) {
|
||||
dragCoeffiecient = 0.0;
|
||||
gravityCoefficient = 0.5;
|
||||
inheritedVelFactor = 0.5;
|
||||
|
||||
lifetimeMS = 4000;
|
||||
lifetimeVarianceMS = 500;
|
||||
|
||||
spinRandomMin = -200.0;
|
||||
spinRandomMax = 200.0;
|
||||
|
||||
textureName = "special/bubbles";
|
||||
|
||||
colors[0] = "0.0 1.0 0.5 0.3";
|
||||
colors[1] = "0.0 1.0 0.4 0.2";
|
||||
colors[2] = "0.0 1.0 0.3 0.1";
|
||||
|
||||
sizes[0] = 3.0;
|
||||
sizes[1] = 2.3;
|
||||
sizes[2] = 2.1;
|
||||
|
||||
times[0] = 0.0;
|
||||
times[1] = 0.5;
|
||||
times[2] = 1.0;
|
||||
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(ZAcidBombExplosionEmitter) {
|
||||
lifetimeMS = 2000;
|
||||
|
||||
ejectionPeriodMS = 1;
|
||||
periodVarianceMS = 0;
|
||||
|
||||
ejectionVelocity = 3.0;
|
||||
velocityVariance = 0.5;
|
||||
|
||||
thetaMin = 0.0;
|
||||
thetaMax = 90.0;
|
||||
|
||||
orientParticles = false;
|
||||
orientOnVelocity = false;
|
||||
|
||||
particles = "ZAcidBombParticle";
|
||||
};
|
||||
|
||||
datablock ExplosionData(ZAcidBombExplosion) {
|
||||
emitter[0] = ZAcidBombExplosionEmitter;
|
||||
soundProfile = NerfBallExplosionSound;
|
||||
};
|
||||
//
|
||||
|
||||
datablock ParticleData(ZAcidBallParticle) {
|
||||
dragCoeffiecient = 0.0;
|
||||
gravityCoefficient = 0.5;
|
||||
inheritedVelFactor = 0.5;
|
||||
|
||||
lifetimeMS = 2000;
|
||||
lifetimeVarianceMS = 200;
|
||||
|
||||
spinRandomMin = -200.0;
|
||||
spinRandomMax = 200.0;
|
||||
|
||||
textureName = "special/bubbles";
|
||||
|
||||
colors[0] = "0.0 1.0 0.5 0.3";
|
||||
colors[1] = "0.0 1.0 0.4 0.2";
|
||||
colors[2] = "0.0 1.0 0.3 0.1";
|
||||
|
||||
sizes[0] = 0.6;
|
||||
sizes[1] = 0.3;
|
||||
sizes[2] = 0.1;
|
||||
|
||||
times[0] = 0.0;
|
||||
times[1] = 0.5;
|
||||
times[2] = 1.0;
|
||||
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(ZAcidBallExplosionEmitter) {
|
||||
lifetimeMS = 200;
|
||||
|
||||
ejectionPeriodMS = 1;
|
||||
periodVarianceMS = 0;
|
||||
|
||||
ejectionVelocity = 3.0;
|
||||
velocityVariance = 0.5;
|
||||
|
||||
thetaMin = 0.0;
|
||||
thetaMax = 90.0;
|
||||
|
||||
orientParticles = false;
|
||||
orientOnVelocity = false;
|
||||
|
||||
particles = "ZAcidBallParticle";
|
||||
};
|
||||
|
||||
datablock ExplosionData(ZAcidBallExplosion) {
|
||||
emitter[0] = ZAcidBallExplosionEmitter;
|
||||
soundProfile = NerfBallExplosionSound;
|
||||
};
|
||||
|
||||
datablock TracerProjectileData(LZombieAcidBall) {
|
||||
doDynamicClientHits = true;
|
||||
|
||||
projectileShapeName = "";
|
||||
directDamage = 0.0;
|
||||
directDamageType = $DamageType::ZAcid;
|
||||
hasDamageRadius = true;
|
||||
indirectDamage = 0.24;
|
||||
damageRadius = 4.0;
|
||||
kickBackStrength = 0.0;
|
||||
radiusDamageType = $DamageType::ZAcid;
|
||||
sound = BlasterProjectileSound;
|
||||
explosion = ZAcidBallExplosion;
|
||||
|
||||
ImageSource = "AcidCannonImage";
|
||||
|
||||
dryVelocity = 100.0;
|
||||
wetVelocity = 100.0;
|
||||
velInheritFactor = 1.0;
|
||||
fizzleTimeMS = 4000;
|
||||
lifetimeMS = 1000;
|
||||
explodeOnDeath = false;
|
||||
reflectOnWaterImpactAngle = 0.0;
|
||||
explodeOnWaterImpact = true;
|
||||
deflectionOnWaterImpact = 0.0;
|
||||
fizzleUnderwaterMS = -1;
|
||||
|
||||
activateDelayMS = 100;
|
||||
|
||||
tracerLength = 5;
|
||||
tracerAlpha = false;
|
||||
tracerMinPixels = 3;
|
||||
tracerColor = "0 1 0 1";
|
||||
tracerTex[0] = "special/landSpikeBolt";
|
||||
tracerTex[1] = "special/landSpikeBoltCross";
|
||||
tracerWidth = 0.5;
|
||||
crossSize = 0.79;
|
||||
crossViewAng = 0.990;
|
||||
renderCross = true;
|
||||
emap = true;
|
||||
};
|
||||
|
||||
datablock TracerProjectileData(EliteRapierAcidBomb) {
|
||||
doDynamicClientHits = true;
|
||||
|
||||
projectileShapeName = "";
|
||||
directDamage = 0.0;
|
||||
directDamageType = $DamageType::ZAcid;
|
||||
hasDamageRadius = true;
|
||||
indirectDamage = 0.6;
|
||||
damageRadius = 7.5;
|
||||
kickBackStrength = 0.0;
|
||||
radiusDamageType = $DamageType::ZAcid;
|
||||
sound = BlasterProjectileSound;
|
||||
explosion = ZAcidBombExplosion;
|
||||
|
||||
ImageSource = "AcidCannonImage";
|
||||
|
||||
dryVelocity = 100.0;
|
||||
wetVelocity = 100.0;
|
||||
velInheritFactor = 1.0;
|
||||
fizzleTimeMS = 4000;
|
||||
lifetimeMS = 1000;
|
||||
explodeOnDeath = false;
|
||||
reflectOnWaterImpactAngle = 0.0;
|
||||
explodeOnWaterImpact = true;
|
||||
deflectionOnWaterImpact = 0.0;
|
||||
fizzleUnderwaterMS = -1;
|
||||
|
||||
activateDelayMS = 100;
|
||||
|
||||
tracerLength = 10;
|
||||
tracerAlpha = false;
|
||||
tracerMinPixels = 6;
|
||||
tracerColor = "0 1 0 1";
|
||||
tracerTex[0] = "special/landSpikeBolt";
|
||||
tracerTex[1] = "special/landSpikeBoltCross";
|
||||
tracerWidth = 0.8;
|
||||
crossSize = 0.79;
|
||||
crossViewAng = 0.990;
|
||||
renderCross = true;
|
||||
emap = true;
|
||||
};
|
||||
|
||||
|
||||
datablock TracerProjectileData(SSZombieAcidBall) {
|
||||
doDynamicClientHits = true;
|
||||
|
||||
projectileShapeName = "";
|
||||
directDamage = 0.0;
|
||||
directDamageType = $DamageType::ZAcid;
|
||||
hasDamageRadius = true;
|
||||
indirectDamage = 0.4;
|
||||
damageRadius = 7.0;
|
||||
kickBackStrength = 0.0;
|
||||
radiusDamageType = $DamageType::ZAcid;
|
||||
sound = BlasterProjectileSound;
|
||||
explosion = ZAcidBallExplosion;
|
||||
|
||||
dryVelocity = 400.0;
|
||||
wetVelocity = 400.0;
|
||||
velInheritFactor = 1.0;
|
||||
fizzleTimeMS = 4000;
|
||||
lifetimeMS = 4000;
|
||||
explodeOnDeath = false;
|
||||
reflectOnWaterImpactAngle = 0.0;
|
||||
explodeOnWaterImpact = true;
|
||||
deflectionOnWaterImpact = 0.0;
|
||||
fizzleUnderwaterMS = -1;
|
||||
|
||||
activateDelayMS = 100;
|
||||
|
||||
tracerLength = 5;
|
||||
tracerAlpha = false;
|
||||
tracerMinPixels = 3;
|
||||
tracerColor = "0 1 0 1";
|
||||
tracerTex[0] = "special/landSpikeBolt";
|
||||
tracerTex[1] = "special/landSpikeBoltCross";
|
||||
tracerWidth = 0.5;
|
||||
crossSize = 0.79;
|
||||
crossViewAng = 0.990;
|
||||
renderCross = true;
|
||||
emap = true;
|
||||
};
|
||||
|
||||
datablock ShapeBaseImageData(AcidCannonImage) {
|
||||
className = WeaponImage;
|
||||
shapeFile = "weapon_energy.dts";
|
||||
item = AcidCannon;
|
||||
projectile = LZombieAcidBall;
|
||||
projectileType = TracerProjectile;
|
||||
|
||||
HasChallenges = 0;
|
||||
//RankRequire = $TWM2::RankRequire["PulsePhaser"];
|
||||
//No rank required, this weapon is picked up from killed zombies
|
||||
|
||||
usesEnergy = true;
|
||||
fireEnergy = 4;
|
||||
minEnergy = 4;
|
||||
|
||||
stateName[0] = "Activate";
|
||||
stateTransitionOnTimeout[0] = "ActivateReady";
|
||||
stateTimeoutValue[0] = 0.5;
|
||||
stateSequence[0] = "Activate";
|
||||
stateSound[0] = BlasterSwitchSound;
|
||||
|
||||
stateName[1] = "ActivateReady";
|
||||
stateTransitionOnLoaded[1] = "Ready";
|
||||
stateTransitionOnNoAmmo[1] = "NoAmmo";
|
||||
|
||||
stateName[2] = "Ready";
|
||||
stateTransitionOnNoAmmo[2] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[2] = "Fire";
|
||||
|
||||
stateName[3] = "Fire";
|
||||
stateTransitionOnTimeout[3] = "Reload";
|
||||
stateTimeoutValue[3] = 0.3;
|
||||
stateFire[3] = true;
|
||||
stateRecoil[3] = NoRecoil;
|
||||
stateAllowImageChange[3] = false;
|
||||
stateSequence[3] = "Fire";
|
||||
//stateSound[3] = PPWFireSound;
|
||||
stateScript[3] = "onFire";
|
||||
|
||||
stateName[4] = "Reload";
|
||||
stateTransitionOnNoAmmo[4] = "NoAmmo";
|
||||
stateTransitionOnTimeout[4] = "Ready";
|
||||
stateTimeoutValue[4] = 4.2;
|
||||
stateAllowImageChange[4] = false;
|
||||
stateSequence[4] = "Reload";
|
||||
|
||||
stateName[5] = "NoAmmo";
|
||||
stateTransitionOnAmmo[5] = "Reload";
|
||||
stateSequence[5] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[5] = "DryFire";
|
||||
|
||||
stateName[6] = "DryFire";
|
||||
stateTimeoutValue[6] = 0.3;
|
||||
stateSound[6] = BlasterDryFireSound;
|
||||
stateTransitionOnTimeout[6] = "Ready";
|
||||
};
|
||||
|
||||
datablock ItemData(AcidCannon) {
|
||||
className = Weapon;
|
||||
catagory = "Spawn Items";
|
||||
shapeFile = "weapon_energy.dts";
|
||||
image = AcidCannonImage;
|
||||
mass = 1;
|
||||
alwaysAllowPickup = 1;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
pickupRadius = 2;
|
||||
pickUpName = "an Acid Cannon";
|
||||
};
|
||||
|
||||
function AcidCannonImage::onMount(%this, %obj, %slot) {
|
||||
Parent::onMount(%this, %obj, %slot);
|
||||
}
|
||||
|
||||
function AcidCannonImage::onUnmount(%this,%obj,%slot) {
|
||||
Parent::onUnmount(%this, %obj, %slot);
|
||||
}
|
||||
|
||||
function AcidCannonImage::onFire(%data,%obj,%slot) {
|
||||
AcidCannonAttack(%obj, %slot, 0);
|
||||
}
|
||||
|
||||
function AcidCannonAttack(%object, %slot, %chargecount) {
|
||||
%muzzleVec = %object.getMuzzleVector(%slot);
|
||||
%muzzlePt = %object.getMuzzlePoint(%slot);
|
||||
if(%chargecount <= 5) {
|
||||
if(%chargecount == 1) {
|
||||
serverPlay3D(AcidCannonPreFireSound, %muzzlePt);
|
||||
}
|
||||
%charge = new ParticleEmissionDummy() {
|
||||
position = %muzzlePt;
|
||||
dataBlock = "defaultEmissionDummy";
|
||||
emitter = "BurnEmitter";
|
||||
};
|
||||
MissionCleanup.add(%charge);
|
||||
%charge.schedule(100, "delete");
|
||||
}
|
||||
if(%chargecount == 7) {
|
||||
%p = new TracerProjectile() {
|
||||
dataBlock = LZombieAcidBall;
|
||||
initialDirection = %muzzleVec;
|
||||
initialPosition = %muzzlePt;
|
||||
sourceObject = %object;
|
||||
sourceSlot = 0;
|
||||
};
|
||||
MissionCleanup.add(%p);
|
||||
serverPlay3D(CentaurArtilleryFireSound, %muzzlePt);
|
||||
}
|
||||
if(%chargecount == 9) {
|
||||
%p = new TracerProjectile() {
|
||||
dataBlock = LZombieAcidBall;
|
||||
initialDirection = %muzzleVec;
|
||||
initialPosition = %muzzlePt;
|
||||
sourceObject = %object;
|
||||
sourceSlot = 0;
|
||||
};
|
||||
MissionCleanup.add(%p);
|
||||
serverPlay3D(CentaurArtilleryFireSound, %muzzlePt);
|
||||
}
|
||||
//
|
||||
if(%chargecount <= 9) {
|
||||
%chargecount++;
|
||||
schedule(100, 0, "AcidCannonAttack", %object, %slot, %chargecount);
|
||||
}
|
||||
}
|
||||
202
scripts/weapons/Other/ConcussionGun.cs
Normal file
202
scripts/weapons/Other/ConcussionGun.cs
Normal file
|
|
@ -0,0 +1,202 @@
|
|||
//IDEA By Signal360
|
||||
datablock ParticleData(ConcGunSmokeParticle) {
|
||||
dragCoeffiecient = 0.0;
|
||||
gravityCoefficient = -0.2; // rises slowly
|
||||
inheritedVelFactor = 0.00;
|
||||
|
||||
lifetimeMS = 700; // lasts 2 second
|
||||
lifetimeVarianceMS = 150; // ...more or less
|
||||
|
||||
textureName = "special/Lightning2Frame2";
|
||||
|
||||
useInvAlpha = false;
|
||||
spinRandomMin = -30.0;
|
||||
spinRandomMax = 30.0;
|
||||
|
||||
colors[0] = "0 0 1 1.0";
|
||||
colors[1] = "0 1 1 1.0";
|
||||
colors[2] = "0 1 1 0.0";
|
||||
|
||||
sizes[0] = 0.25;
|
||||
sizes[1] = 1.0;
|
||||
sizes[2] = 3.0;
|
||||
|
||||
times[0] = 0.0;
|
||||
times[1] = 0.2;
|
||||
times[2] = 1.0;
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(ConcGunSmokeEmitter) {
|
||||
ejectionPeriodMS = 15;
|
||||
periodVarianceMS = 5;
|
||||
|
||||
ejectionVelocity = 1.25;
|
||||
velocityVariance = 0.50;
|
||||
|
||||
thetaMin = 0.0;
|
||||
thetaMax = 90.0;
|
||||
|
||||
particles = "ConcGunSmokeParticle";
|
||||
};
|
||||
|
||||
datablock GrenadeProjectileData(ConcGunGrenade) {
|
||||
projectileShapeName = "grenade_projectile.dts";
|
||||
emitterDelay = -1;
|
||||
directDamage = 0.0;
|
||||
hasDamageRadius = true;
|
||||
indirectDamage = 0.1;
|
||||
damageRadius = 10.0;
|
||||
radiusDamageType = $DamageType::Grenade;
|
||||
kickBackStrength = 1500;
|
||||
bubbleEmitTime = 1.0;
|
||||
|
||||
ImageSource = "ConcussionGunImage";
|
||||
|
||||
sound = GrenadeProjectileSound;
|
||||
explosion = "ConcussionGrenadeExplosion";
|
||||
underwaterExplosion = "ConcussionGrenadeExplosion";
|
||||
velInheritFactor = 0.5;
|
||||
splash = GrenadeSplash;
|
||||
|
||||
baseEmitter = ConcGunSmokeEmitter;
|
||||
bubbleEmitter = ConcGunSmokeEmitter;
|
||||
|
||||
grenadeElasticity = 0.35;
|
||||
grenadeFriction = 0.2;
|
||||
armingDelayMS = 1000;
|
||||
muzzleVelocity = 47.00;
|
||||
drag = 0.1;
|
||||
};
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Ammo
|
||||
//--------------------------------------
|
||||
|
||||
datablock ItemData(ConcussionGunAmmo) {
|
||||
className = Ammo;
|
||||
catagory = "Ammo";
|
||||
shapeFile = "ammo_grenade.dts";
|
||||
mass = 1;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
pickupRadius = 2;
|
||||
pickUpName = "some grenade launcher ammo";
|
||||
|
||||
computeCRC = true;
|
||||
emap = true;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Weapon
|
||||
//--------------------------------------
|
||||
datablock ItemData(ConcussionGun) {
|
||||
className = Weapon;
|
||||
catagory = "Spawn Items";
|
||||
shapeFile = "weapon_mortar.dts";
|
||||
image = ConcussionGunImage;
|
||||
mass = 1;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
pickupRadius = 2;
|
||||
pickUpName = "a concussion gun";
|
||||
|
||||
computeCRC = true;
|
||||
|
||||
};
|
||||
|
||||
datablock ShapeBaseImageData(ConcussionGunImage) {
|
||||
className = WeaponImage;
|
||||
shapeFile = "weapon_mortar.dts";
|
||||
item = ConcussionGun;
|
||||
ammo = ConcussionGunAmmo;
|
||||
offset = "0 0 0";
|
||||
emap = true;
|
||||
|
||||
projectile = ConcGunGrenade;
|
||||
projectileType = GrenadeProjectile;
|
||||
|
||||
//ClipStuff
|
||||
ClipName = "ConcussionGunClip";
|
||||
ClipPickupName["ConcussionGunClip"] = "some Concussion Shells";
|
||||
ShowsClipInHud = 1;
|
||||
ClipReloadTime = 8;
|
||||
ClipReturn = 1;
|
||||
InitialClips = 4;
|
||||
|
||||
GunName = "Concussion Gun";
|
||||
//
|
||||
RankRequire = $TWM2::RankRequire["ConcussionGun"];
|
||||
|
||||
stateName[0] = "Activate";
|
||||
stateTransitionOnTimeout[0] = "ActivateReady";
|
||||
stateTimeoutValue[0] = 0.5;
|
||||
stateSequence[0] = "Activate";
|
||||
stateSound[0] = MortarSwitchSound;
|
||||
|
||||
stateName[1] = "ActivateReady";
|
||||
stateTransitionOnLoaded[1] = "Ready";
|
||||
stateTransitionOnNoAmmo[1] = "NoAmmo";
|
||||
|
||||
stateName[2] = "Ready";
|
||||
stateTransitionOnNoAmmo[2] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[2] = "Fire";
|
||||
|
||||
stateName[3] = "Fire";
|
||||
stateTransitionOnTimeout[3] = "Reload";
|
||||
stateTimeoutValue[3] = 0.4;
|
||||
stateFire[3] = true;
|
||||
stateRecoil[3] = LightRecoil;
|
||||
stateAllowImageChange[3] = false;
|
||||
stateSequence[3] = "Fire";
|
||||
stateScript[3] = "onFire";
|
||||
stateSound[3] = MortarFireSound;
|
||||
|
||||
stateName[4] = "Reload";
|
||||
stateTransitionOnNoAmmo[4] = "NoAmmo";
|
||||
stateTransitionOnTimeout[4] = "Ready";
|
||||
stateTimeoutValue[4] = 0.5;
|
||||
stateAllowImageChange[4] = false;
|
||||
stateSequence[4] = "Reload";
|
||||
stateSound[4] = GrenadeReloadSound;
|
||||
|
||||
stateName[5] = "NoAmmo";
|
||||
stateTransitionOnAmmo[5] = "Reload";
|
||||
stateSequence[5] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[5] = "DryFire";
|
||||
|
||||
stateName[6] = "DryFire";
|
||||
stateSound[6] = GrenadeDryFireSound;
|
||||
stateTimeoutValue[6] = 1.5;
|
||||
stateTransitionOnTimeout[6] = "NoAmmo";
|
||||
};
|
||||
|
||||
function ConcGunGrenade::onExplode(%data, %proj, %pos, %mod) {
|
||||
Parent::OnExplode(%data, %proj, %pos, %mod);
|
||||
%TargetSearchMask = $TypeMasks::PlayerObjectType;
|
||||
InitContainerRadiusSearch(%pos, %data.damageRadius, %TargetSearchMask);
|
||||
while ((%potentialTarget = ContainerSearchNext()) != 0) {
|
||||
if(%potentialTarget.isAlive()) {
|
||||
if(((%potentialTarget.client.team == %proj.sourceObject.client.team) && $TeamDamage) || %potentialTarget.client.team != %proj.sourceObject.client.team) {
|
||||
%potentialTarget.throwWeapon(1);
|
||||
%potentialTarget.throwWeapon(0);
|
||||
%potentialTarget.setWhiteout(4.0);
|
||||
%potentialTarget.setMoveState(true);
|
||||
%potentialTarget.schedule(4000, "SetMoveState", false);
|
||||
%potentialTarget.setActionThread("death4",true);
|
||||
ZappyLoop(%potentialTarget, 0, 7);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function ZappyLoop(%potentialTarget, %time, %maxTime) {
|
||||
if(%time > %maxTime) {
|
||||
return;
|
||||
}
|
||||
if(%potentialTarget.isAlive()) {
|
||||
%time++;
|
||||
%potentialTarget.zapObject();
|
||||
schedule(750, 0, "ZappyLoop", %potentialTarget, %time, %maxTime);
|
||||
}
|
||||
}
|
||||
247
scripts/weapons/Other/Flamethrower.cs
Normal file
247
scripts/weapons/Other/Flamethrower.cs
Normal file
|
|
@ -0,0 +1,247 @@
|
|||
datablock AudioProfile(FlamethrowerFireSound) {
|
||||
filename = "fx/Bonuses/Nouns/snake.wav";
|
||||
description = AudioClose3d;
|
||||
preload = true;
|
||||
};
|
||||
|
||||
//Muzzle Emmiter
|
||||
datablock ParticleData(ThrowerMuzzleParticle) {
|
||||
dragCoeffiecient = 0.4;
|
||||
gravityCoefficient = -0.0; // rises slowly
|
||||
inheritedVelFactor = 0.125;
|
||||
|
||||
lifetimeMS = 800;
|
||||
lifetimeVarianceMS = 500;
|
||||
useInvAlpha = false;
|
||||
spinRandomMin = 500.0;
|
||||
spinRandomMax = 700.0;
|
||||
|
||||
textureName = "special/cloudFlash";
|
||||
|
||||
|
||||
colors[0] = "1.0 0.2 0.0 0.5";
|
||||
colors[1] = "1.0 0.2 0.0 0.8";
|
||||
colors[2] = "1.0 0.2 0.0 0.0";
|
||||
colors[3] = "1.0 0.2 0.0 0.0";
|
||||
|
||||
sizes[0] = 0.2;
|
||||
sizes[1] = 0.3;
|
||||
sizes[2] = 0.5;
|
||||
sizes[3] = 0.6;
|
||||
|
||||
times[0] = 0.2; //.2
|
||||
times[1] = 0.5; //.5
|
||||
times[2] = 0.7; //.7
|
||||
times[3] = 1.0; //1.0
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(ThrowerMuzzleEmitter) {
|
||||
ejectionPeriodMS = 3;
|
||||
periodVarianceMS = 1;
|
||||
|
||||
ejectionVelocity = 0.0;
|
||||
velocityVariance = 0.0;
|
||||
|
||||
thetaMin = 0.0;
|
||||
thetaMax = 45.0;
|
||||
|
||||
phiReferenceVel = 0;
|
||||
phiVariance = 360;
|
||||
overrideAdvances = false;
|
||||
|
||||
particles = "ThrowerMuzzleParticle";
|
||||
};
|
||||
//
|
||||
|
||||
datablock ParticleData(ThrowerExplosionParticle) {
|
||||
dragCoefficient = 2;
|
||||
gravityCoefficient = 0.2;
|
||||
inheritedVelFactor = 0.2;
|
||||
constantAcceleration = 0.0;
|
||||
lifetimeMS = 500;
|
||||
lifetimeVarianceMS = 0;
|
||||
textureName = "special/cloudflash";
|
||||
colors[0] = "1 0.18 0.03 0.6";
|
||||
colors[1] = "1 0.18 0.03 0.0";
|
||||
sizes[0] = 2;
|
||||
sizes[1] = 2.5;
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(ThrowerExplosionEmitter) {
|
||||
ejectionPeriodMS = 1;
|
||||
periodVarianceMS = 0;
|
||||
ejectionOffset = 2.0;
|
||||
ejectionVelocity = 4.0;
|
||||
velocityVariance = 0.0;
|
||||
thetaMin = 60.0;
|
||||
thetaMax = 90.0;
|
||||
lifetimeMS = 250;
|
||||
|
||||
particles = "ThrowerExplosionParticle";
|
||||
};
|
||||
|
||||
datablock ExplosionData(ThrowerExplosion) {
|
||||
particleEmitter = ThrowerExplosionEmitter;
|
||||
particleDensity = 75;
|
||||
particleRadius = 1.25;
|
||||
faceViewer = true;
|
||||
};
|
||||
|
||||
datablock LinearFlareProjectileData(FlamethrowerBolt) {
|
||||
projectileShapeName = "turret_muzzlepoint.dts";
|
||||
scale = "1.0 1.0 1.0";
|
||||
faceViewer = true;
|
||||
directDamage = 0.02;
|
||||
hasDamageRadius = true;
|
||||
indirectDamage = 0.02;
|
||||
damageRadius = 4.0;
|
||||
kickBackStrength = 0.0;
|
||||
radiusDamageType = $DamageType::Fire;
|
||||
|
||||
ImageSource = "flamerImage";
|
||||
|
||||
explosion = "ThrowerExplosion";
|
||||
splash = PlasmaSplash;
|
||||
|
||||
baseEmitter = ThrowerBaseEmitter;
|
||||
|
||||
dryVelocity = 50.0; // z0dd - ZOD, 7/20/02. Faster plasma projectile. was 55
|
||||
wetVelocity = -1;
|
||||
velInheritFactor = 0.3;
|
||||
fizzleTimeMS = 250;
|
||||
lifetimeMS = 745;
|
||||
explodeOnDeath = false;
|
||||
reflectOnWaterImpactAngle = 0.0;
|
||||
explodeOnWaterImpact = true;
|
||||
deflectionOnWaterImpact = 0.0;
|
||||
fizzleUnderwaterMS = -1;
|
||||
|
||||
//activateDelayMS = 100;
|
||||
activateDelayMS = -1;
|
||||
|
||||
size[0] = 0.2;
|
||||
size[1] = 0.5;
|
||||
size[2] = 0.1;
|
||||
|
||||
|
||||
numFlares = 35;
|
||||
flareColor = "1 0.18 0.03";
|
||||
flareModTexture = "flaremod";
|
||||
flareBaseTexture = "flarebase";
|
||||
|
||||
sound = PlasmaProjectileSound;
|
||||
fireSound = FlamethrowerFireSound;
|
||||
wetFireSound = PlasmaFireWetSound;
|
||||
|
||||
hasLight = true;
|
||||
lightRadius = 10.0;
|
||||
lightColor = "0.94 0.03 0.12";
|
||||
};
|
||||
|
||||
//THE GUN
|
||||
datablock ItemData(flamerAmmo) {
|
||||
className = Ammo;
|
||||
catagory = "Ammo";
|
||||
shapeFile = "ammo_plasma.dts";
|
||||
mass = 1;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
pickupRadius = 2;
|
||||
pickUpName = "some flame thrower fuel";
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Weapon
|
||||
//--------------------------------------
|
||||
datablock ItemData(flamer) {
|
||||
className = Weapon;
|
||||
catagory = "Spawn Items";
|
||||
shapeFile = "weapon_plasma.dts";
|
||||
image = flamerImage;
|
||||
mass = 1.0;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
pickupRadius = 2;
|
||||
pickUpName = "a flame thrower";
|
||||
};
|
||||
|
||||
datablock ShapeBaseImageData(flamerImage) {
|
||||
className = WeaponImage;
|
||||
shapeFile = "weapon_grenade_launcher.dts";
|
||||
mass = 10;
|
||||
item = flamer;
|
||||
ammo = flamerAmmo;
|
||||
offset = "0 0 0"; // L/R - F/B - T/B
|
||||
rotation = "0 1 0 180"; // L/R - F/B - T/B
|
||||
|
||||
projectileSpread = 5.0 / 1000.0;
|
||||
|
||||
//ClipStuff
|
||||
ClipName = "FlamerClip";
|
||||
ClipPickupName["FlamerClip"] = "some flamethrower fuel canisters";
|
||||
ShowsClipInHud = 1;
|
||||
ClipReloadTime = 5;
|
||||
ClipReturn = 100;
|
||||
InitialClips = 6;
|
||||
|
||||
GunName = "A|V|X Flamethrower";
|
||||
//
|
||||
MedalRequire = 1;
|
||||
|
||||
projectile = FlamethrowerBolt;
|
||||
projectileType = LinearFlareProjectile;
|
||||
|
||||
stateName[0] = "Activate";
|
||||
stateTransitionOnTimeout[0] = "ActivateReady";
|
||||
stateTimeoutValue[0] = 0.5;
|
||||
stateSequence[0] = "Activate";
|
||||
stateSound[0] = PlasmaSwitchSound;
|
||||
|
||||
stateName[1] = "ActivateReady";
|
||||
stateTransitionOnLoaded[1] = "Ready";
|
||||
stateTransitionOnNoAmmo[1] = "NoAmmo";
|
||||
|
||||
stateName[2] = "Ready";
|
||||
stateEmitter[2] = "ThrowerMuzzleEmitter";
|
||||
stateEmitterNode[2] = "muzzlepoint1";
|
||||
stateEmitterTime[2] = 10000;
|
||||
stateTransitionOnNoAmmo[2] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[2] = "CheckWet";
|
||||
|
||||
stateName[3] = "Fire";
|
||||
stateTransitionOnTimeout[3] = "Reload";
|
||||
stateTimeoutValue[3] = 0.02;
|
||||
stateFire[3] = true;
|
||||
stateAllowImageChange[3] = false;
|
||||
stateScript[3] = "onFire";
|
||||
stateSound[3] = FlamethrowerFireSound;
|
||||
stateEmitterTime[3] = 0.02;
|
||||
|
||||
stateName[4] = "Reload";
|
||||
stateTransitionOnNoAmmo[4] = "NoAmmo";
|
||||
stateTransitionOnTimeout[4] = "Ready";
|
||||
stateTimeoutValue[4] = 0.02;
|
||||
stateAllowImageChange[4] = false;
|
||||
stateSequence[4] = "Reload";
|
||||
stateSound[4] = PlasmaReloadSound;
|
||||
|
||||
stateName[5] = "NoAmmo";
|
||||
stateTransitionOnAmmo[5] = "Reload";
|
||||
stateSequence[5] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[5] = "DryFire";
|
||||
|
||||
stateName[6] = "DryFire";
|
||||
stateSound[6] = PlasmaDryFireSound;
|
||||
stateTimeoutValue[6] = 1.0;
|
||||
stateTransitionOnTimeout[6] = "NoAmmo";
|
||||
|
||||
stateName[7] = "WetFire";
|
||||
stateSound[7] = PlasmaFireWetSound;
|
||||
stateTimeoutValue[7] = 1.0;
|
||||
stateTransitionOnTimeout[7] = "Ready";
|
||||
|
||||
stateName[8] = "CheckWet";
|
||||
stateTransitionOnWet[8] = "WetFire";
|
||||
stateTransitionOnNotWet[8] = "Fire";
|
||||
};
|
||||
|
||||
146
scripts/weapons/Other/IonLauncher.cs
Normal file
146
scripts/weapons/Other/IonLauncher.cs
Normal file
|
|
@ -0,0 +1,146 @@
|
|||
datablock ItemData(IonLauncherAmmo)
|
||||
{
|
||||
className = Ammo;
|
||||
catagory = "Ammo";
|
||||
shapeFile = "ammo_missile.dts";
|
||||
mass = 1;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
pickupRadius = 2;
|
||||
pickUpName = "Some Ion Launcher Missiles";
|
||||
|
||||
computeCRC = true;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Weapon
|
||||
//--------------------------------------
|
||||
datablock ItemData(IonLauncher)
|
||||
{
|
||||
className = Weapon;
|
||||
catagory = "Spawn Items";
|
||||
shapeFile = "weapon_grenade_launcher.dts";
|
||||
image = IonLauncherImage;
|
||||
mass = 1;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
pickupRadius = 2;
|
||||
pickUpName = "an Ion Launcher";
|
||||
|
||||
computeCRC = true;
|
||||
emap = true;
|
||||
};
|
||||
|
||||
datablock ShapeBaseImageData(IonLauncherImage)
|
||||
{
|
||||
className = WeaponImage;
|
||||
shapeFile = "weapon_grenade_launcher.dts";
|
||||
item = IonLauncher;
|
||||
ammo = IonLauncherAmmo;
|
||||
offset = "0 -1 0";
|
||||
armThread = lookms;
|
||||
emap = true;
|
||||
|
||||
projectile = IonMissile;
|
||||
projectileType = seekerprojectile;
|
||||
projectileSpread = 1.0 / 1000.0;
|
||||
|
||||
//ClipStuff
|
||||
ClipName = "IonLauncherClip";
|
||||
ClipPickupName["IonLauncherClip"] = "A Few Ion Missile boxes";
|
||||
ShowsClipInHud = 1;
|
||||
ClipReloadTime = 6;
|
||||
ClipReturn = 2;
|
||||
InitialClips = 7;
|
||||
|
||||
GunName = "LUX-4 Ion Launcher";
|
||||
//
|
||||
|
||||
MedalRequire = 1;
|
||||
|
||||
isSeeker = true;
|
||||
seekRadius = 1000;
|
||||
maxSeekAngle = 8;
|
||||
seekTime = 0.5;
|
||||
minSeekHeat = 0.1; // the heat that must be present on a target to lock it.
|
||||
|
||||
// only target objects outside this range
|
||||
minTargetingDistance = 40;
|
||||
|
||||
stateName[0] = "Activate";
|
||||
stateTransitionOnTimeout[0] = "ActivateReady";
|
||||
stateTimeoutValue[0] = 2.0;
|
||||
stateSequence[0] = "Activate";
|
||||
stateSound[0] = MissileSwitchSound;
|
||||
|
||||
stateName[1] = "ActivateReady";
|
||||
stateTransitionOnLoaded[1] = "Ready";
|
||||
stateTransitionOnNoAmmo[1] = "NoAmmo";
|
||||
|
||||
stateName[2] = "Ready";
|
||||
stateTransitionOnNoAmmo[2] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[2] = "CheckWet";
|
||||
|
||||
stateName[3] = "Fire";
|
||||
stateTransitionOnTimeout[3] = "Reload";
|
||||
stateTimeoutValue[3] = 0.4;
|
||||
stateFire[3] = true;
|
||||
stateRecoil[3] = LightRecoil;
|
||||
stateAllowImageChange[3] = false;
|
||||
stateSequence[3] = "Fire";
|
||||
stateScript[3] = "onFire";
|
||||
stateSound[3] = MissileFireSound;
|
||||
|
||||
stateName[4] = "Reload";
|
||||
stateTransitionOnNoAmmo[4] = "NoAmmo";
|
||||
stateTransitionOnTimeout[4] = "Ready";
|
||||
stateTimeoutValue[4] = 4.5;
|
||||
stateAllowImageChange[4] = false;
|
||||
stateSequence[4] = "Reload";
|
||||
stateSound[4] = MissileReloadSound;
|
||||
|
||||
stateName[5] = "NoAmmo";
|
||||
stateTransitionOnAmmo[5] = "Reload";
|
||||
stateSequence[5] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[5] = "DryFire";
|
||||
|
||||
stateName[6] = "DryFire";
|
||||
stateSound[6] = MissileDryFireSound;
|
||||
stateTimeoutValue[6] = 1.0;
|
||||
stateTransitionOnTimeout[6] = "ActivateReady";
|
||||
|
||||
stateName[7] = "CheckTarget";
|
||||
stateTransitionOnNoTarget[7] = "Fire";
|
||||
stateTransitionOnTarget[7] = "Fire";
|
||||
|
||||
stateName[8] = "CheckWet";
|
||||
stateTransitionOnWet[8] = "DryFire";
|
||||
stateTransitionOnNotWet[8] = "CheckTarget";
|
||||
|
||||
stateName[9] = "WetFire";
|
||||
stateTransitionOnNoAmmo[9] = "NoAmmo";
|
||||
stateTransitionOnTimeout[9] = "Reload";
|
||||
stateTimeoutValue[9] = 0.4;
|
||||
stateScript[9] = "onWetFire";
|
||||
stateAllowImageChange[9] = false;
|
||||
};
|
||||
|
||||
function IonLauncherImage::onFire(%data,%obj,%slot) {
|
||||
%p = Parent::onFire(%data, %obj, %slot);
|
||||
MissileSet.add(%p);
|
||||
|
||||
%target = %obj.getLockedTarget();
|
||||
if(%target)
|
||||
%p.setObjectTarget(%target);
|
||||
else if(%obj.isLocked())
|
||||
%p.setPositionTarget(%obj.getLockedPosition());
|
||||
else
|
||||
%p.setNoTarget();
|
||||
}
|
||||
|
||||
function IonLauncherImage::onWetFire(%data, %obj, %slot) {
|
||||
%p = Parent::onFire(%data, %obj, %slot);
|
||||
MissileSet.add(%p);
|
||||
|
||||
%p.setObjectTarget(0);
|
||||
}
|
||||
96
scripts/weapons/Other/IonRifle.cs
Normal file
96
scripts/weapons/Other/IonRifle.cs
Normal file
|
|
@ -0,0 +1,96 @@
|
|||
datablock ItemData(IonRifle) {
|
||||
className = Weapon;
|
||||
catagory = "Spawn Items";
|
||||
shapeFile = "weapon_sniper.dts";
|
||||
image = IonRifleImage;
|
||||
mass = 1;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
pickupRadius = 2;
|
||||
pickUpName = "a sniper rifle";
|
||||
|
||||
computeCRC = true;
|
||||
|
||||
};
|
||||
|
||||
datablock ShapeBaseImageData(IonRifleImage) {
|
||||
className = WeaponImage;
|
||||
shapeFile = "weapon_sniper.dts";
|
||||
item = IonRifle;
|
||||
projectile = ShockBeam;
|
||||
projectileType = SniperProjectile;
|
||||
armThread = looksn;
|
||||
|
||||
MedalRequire = 1;
|
||||
|
||||
usesEnergy = true;
|
||||
minEnergy = 6;
|
||||
|
||||
stateName[0] = "Activate";
|
||||
stateTransitionOnTimeout[0] = "ActivateReady";
|
||||
stateSound[0] = SniperRifleSwitchSound;
|
||||
stateTimeoutValue[0] = 0.5;
|
||||
stateSequence[0] = "Activate";
|
||||
|
||||
stateName[1] = "ActivateReady";
|
||||
stateTransitionOnLoaded[1] = "Ready";
|
||||
stateTransitionOnNoAmmo[1] = "NoAmmo";
|
||||
|
||||
stateName[2] = "Ready";
|
||||
stateTransitionOnNoAmmo[2] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[2] = "CheckWet";
|
||||
|
||||
stateName[3] = "Fire";
|
||||
stateTransitionOnTimeout[3] = "Reload";
|
||||
stateTimeoutValue[3] = 0.5;
|
||||
stateFire[3] = true;
|
||||
stateAllowImageChange[3] = false;
|
||||
stateSequence[3] = "Fire";
|
||||
stateScript[3] = "onFire";
|
||||
|
||||
stateName[4] = "Reload";
|
||||
stateTransitionOnTimeout[4] = "Ready";
|
||||
stateTimeoutValue[4] = 0.5;
|
||||
stateAllowImageChange[4] = false;
|
||||
|
||||
stateName[5] = "CheckWet";
|
||||
stateTransitionOnWet[5] = "DryFire";
|
||||
stateTransitionOnNotWet[5] = "Fire";
|
||||
|
||||
stateName[6] = "NoAmmo";
|
||||
stateTransitionOnAmmo[6] = "Reload";
|
||||
stateTransitionOnTriggerDown[6] = "DryFire";
|
||||
stateSequence[6] = "NoAmmo";
|
||||
|
||||
stateName[7] = "DryFire";
|
||||
stateSound[7] = SniperRifleDryFireSound;
|
||||
stateTimeoutValue[7] = 0.5;
|
||||
stateTransitionOnTimeout[7] = "Ready";
|
||||
};
|
||||
|
||||
function IonRifleImage::OnFire(%data, %obj, %slot) {
|
||||
ServerPlay3D(thunderCrash2, %obj.getPosition());
|
||||
%pos = %obj.getMuzzlePoint(%slot);
|
||||
%vec = %obj.getMuzzleVector(%slot);
|
||||
%res = containerRayCast(%pos,vectorAdd(%pos,vectorScale(%vec,2000)), $TypeMasks::PlayerObjectType | $TypeMasks::TerrainObjectType | $TypeMasks::InteriorObjectType | $TypeMasks::StaticObjectType,%obj);
|
||||
%HObj = getWord(%res, 0);
|
||||
if(%HObj !$= "" && %HObj != 0) {
|
||||
if(!(%HObj.getType() & ($TypeMasks::InteriorObjectType | $TypeMasks::TerrainObjectType))) {
|
||||
%cn = %HObj.getDatablock().getClassName();
|
||||
if(%cn $= "PlayerData" || strstr(%cn, "Vehicle") != -1) {
|
||||
%HObj.getDataBlock().damageObject(%HObj, %obj, %HObj.getPosition(), 0.45, $DamageType::Lightning);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (%res)
|
||||
%hitLoc = getWords(%res,1,3);
|
||||
else
|
||||
%hitLoc = vectorAdd(%pos,vectorScale(%vec,2000));
|
||||
%p = discharge(%pos,%vec);
|
||||
%p.setEnergyPercentage(1);
|
||||
createLifeLight(%hitLoc,1,1000);
|
||||
addToShock(%p);
|
||||
%p.schedule(1000,"delete");
|
||||
zap(0,25,%hitLoc);
|
||||
ServerPlay3D(thunderCrash2, %hitLoc);
|
||||
}
|
||||
111
scripts/weapons/Other/MiniCollider.cs
Normal file
111
scripts/weapons/Other/MiniCollider.cs
Normal file
|
|
@ -0,0 +1,111 @@
|
|||
datablock ShapeBaseImageData(MiniColliderCannonImage) {
|
||||
className = WeaponImage;
|
||||
shapeFile = "turret_mortar_large.dts";
|
||||
item = MiniColliderCannon;
|
||||
usesenergy = true;
|
||||
|
||||
projectile = MiniColliderShell;
|
||||
projectileType = GrenadeProjectile;
|
||||
|
||||
emap = true;
|
||||
|
||||
MedalRequire = 1;
|
||||
|
||||
HasChallenges = 1;
|
||||
ChallengeCt = 8;
|
||||
Challenge[1] = "Collider Hunter\t100\t100\tNone";
|
||||
Challenge[2] = "Collider Expert\t250\t500\tNone";
|
||||
Challenge[3] = "Collider Master\t500\t1000\tDouble Burst";
|
||||
Challenge[4] = "Collider God\t1000\t2000\tTriple Burst";
|
||||
Challenge[5] = "Collider Bronze Commendation\t2500\t10000\tNone";
|
||||
Challenge[6] = "Collider Silver Commendation\t5000\t25000\tNone";
|
||||
Challenge[7] = "Collider Gold Commendation\t10000\t50000\tNone";
|
||||
Challenge[8] = "Collider Titan Commendation\t25000\t75000\tNone";
|
||||
Upgrade[1] = "Double Burst";
|
||||
Upgrade[2] = "Triple Burst";
|
||||
GunName = "PRTCL-995 MCC";
|
||||
|
||||
stateName[0] = "Activate";
|
||||
stateTransitionOnTimeout[0] = "ActivateReady";
|
||||
stateTimeoutValue[0] = 0.5;
|
||||
stateSequence[0] = "Activate";
|
||||
stateSound[0] = MortarReloadSound;
|
||||
|
||||
stateName[1] = "ActivateReady";
|
||||
stateTransitionOnLoaded[1] = "Ready";
|
||||
stateTransitionOnNoAmmo[1] = "NoAmmo";
|
||||
|
||||
stateName[2] = "Ready";
|
||||
stateTransitionOnNoAmmo[2] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[2] = "Fire";
|
||||
|
||||
stateName[3] = "Fire";
|
||||
stateTransitionOnTimeout[3] = "Reload";
|
||||
stateTimeoutValue[3] = 4.6;
|
||||
stateFire[3] = true;
|
||||
stateRecoil[3] = LightRecoil;
|
||||
stateAllowImageChange[3] = false;
|
||||
stateSequence[3] = "Fire";
|
||||
stateSound[3] = CentaurArtilleryFireSound;
|
||||
stateScript[3] = "onFire";
|
||||
|
||||
stateName[4] = "Reload";
|
||||
stateTransitionOnNoAmmo[4] = "NoAmmo";
|
||||
stateTransitionOnTimeout[4] = "Ready";
|
||||
stateSound[4] = MortarSwitchSound;
|
||||
stateEjectShell[4] = true;
|
||||
stateAllowImageChange[4] = false;
|
||||
stateSequence[4] = "Reload";
|
||||
|
||||
stateName[5] = "NoAmmo";
|
||||
stateTransitionOnAmmo[5] = "Reload";
|
||||
stateSequence[5] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[5] = "DryFire";
|
||||
|
||||
stateName[6] = "DryFire";
|
||||
stateTimeoutValue[6] = 0.3;
|
||||
stateSound[6] = ChaingunDryFireSound;
|
||||
stateTransitionOnTimeout[6] = "Ready";
|
||||
};
|
||||
|
||||
//item//
|
||||
datablock ItemData(MiniColliderCannon) {
|
||||
className = Weapon;
|
||||
catagory = "Spawn Items";
|
||||
shapeFile = "turret_mortar_large.dts";
|
||||
image = MiniColliderCannonImage;
|
||||
mass = 1;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
pickupRadius = 2;
|
||||
pickUpName = "a PRTCL-995 Mini Collider Cannon";
|
||||
|
||||
computeCRC = true;
|
||||
emap = true;
|
||||
};
|
||||
|
||||
function MiniColliderCannonImage::onFire(%data, %obj, %slot) {
|
||||
%vector = %obj.getMuzzleVector(%slot);
|
||||
%mp = %obj.getMuzzlePoint(%slot);
|
||||
if(%obj.client.UpgradeOn("Double Burst", %data.getName())) {
|
||||
%p1 = Parent::OnFire(%data, %obj, %slot);
|
||||
%p2 = Schedule(100, 0, "spawnprojectile", %data.Projectile, %data.ProjectileType,
|
||||
%obj.getMuzzlePoint(%slot), %vector, %obj);
|
||||
%p2.WeaponImageSource = "MiniColliderCannonImage";
|
||||
schedule(100, 0, "ServerPlay3D", "CentaurArtilleryFireSound", %obj.getPosition());
|
||||
}
|
||||
else if(%obj.client.UpgradeOn("Triple Burst", %data.getName())) {
|
||||
%p1 = Parent::OnFire(%data, %obj, %slot);
|
||||
%p2 = Schedule(100, 0, "spawnprojectile", %data.Projectile, %data.ProjectileType,
|
||||
%obj.getMuzzlePoint(%slot), %vector, %obj);
|
||||
%p2.WeaponImageSource = "MiniColliderCannonImage";
|
||||
schedule(100, 0, "ServerPlay3D", "CentaurArtilleryFireSound", %obj.getPosition());
|
||||
%p3 = Schedule(200, 0, "spawnprojectile", %data.Projectile, %data.ProjectileType,
|
||||
%obj.getMuzzlePoint(%slot), %vector, %obj);
|
||||
%p3.WeaponImageSource = "MiniColliderCannonImage";
|
||||
schedule(100, 0, "ServerPlay3D", "CentaurArtilleryFireSound", %obj.getPosition());
|
||||
}
|
||||
else {
|
||||
%p = Parent::OnFire(%data, %obj, %slot);
|
||||
}
|
||||
}
|
||||
117
scripts/weapons/Other/NapalmLauncher.cs
Normal file
117
scripts/weapons/Other/NapalmLauncher.cs
Normal file
|
|
@ -0,0 +1,117 @@
|
|||
datablock ItemData(NapalmAmmo)
|
||||
{
|
||||
className = Ammo;
|
||||
catagory = "Ammo";
|
||||
shapeFile = "ammo_grenade.dts";
|
||||
mass = 1;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
pickupRadius = 2;
|
||||
pickUpName = "some Napalm";
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Weapon
|
||||
//--------------------------------------
|
||||
|
||||
datablock ShapeBaseImageData(NapalmImage)
|
||||
{
|
||||
className = WeaponImage;
|
||||
shapeFile = "ammo_grenade.dts";
|
||||
item = Napalm;
|
||||
ammo = NapalmAmmo;
|
||||
offset = "0 0 0";
|
||||
armThread = lookms;
|
||||
emap = true;
|
||||
|
||||
projectileSpread = 0;
|
||||
|
||||
projectile = NapalmShot;
|
||||
projectileType = LinearProjectile;
|
||||
|
||||
RankRequire = $TWM2::RankRequire["NapalmLauncher"];
|
||||
MedalRequire = 1;
|
||||
|
||||
//ClipStuff
|
||||
ClipName = "NapalmClip";
|
||||
ClipPickupName["NapalmClip"] = "some napalm fuel clusters";
|
||||
ShowsClipInHud = 1;
|
||||
ClipReloadTime = 5;
|
||||
ClipReturn = 1;
|
||||
InitialClips = 6;
|
||||
|
||||
//Challenges
|
||||
HasChallenges = 1;
|
||||
ChallengeCt = 9;
|
||||
Challenge[1] = "Napalm Novice\t25\t100\tNone";
|
||||
Challenge[2] = "Napalm Hunter\t50\t150\tNone";
|
||||
Challenge[3] = "Napalm Expert\t100\t250\tNone";
|
||||
Challenge[4] = "Napalm Master\t250\t500\tNone";
|
||||
Challenge[5] = "Napalm God\t500\t1000\tNone";
|
||||
Challenge[6] = "Napalm Bronze Commendation\t2500\t10000\tNone";
|
||||
Challenge[7] = "Napalm Silver Commendation\t5000\t25000\tNone";
|
||||
Challenge[8] = "Napalm Gold Commendation\t10000\t50000\tNone";
|
||||
Challenge[9] = "Napalm Titan Commendation\t25000\t75000\tNone";
|
||||
GunName = "ZH7C8 Napalm Launcher";
|
||||
//
|
||||
|
||||
// State Data
|
||||
stateName[0] = "ActivateReady";
|
||||
stateTransitionOnLoaded[0] = "Activate";
|
||||
stateTransitionOnNoAmmo[0] = "NoAmmo";
|
||||
|
||||
stateName[1] = "Activate";
|
||||
stateTransitionOnTimeout[1] = "Ready";
|
||||
stateTimeoutValue[1] = 0.5;
|
||||
stateSequence[1] = "Activated";
|
||||
stateSound[1] = PlasmaSwitchSound;
|
||||
|
||||
stateName[2] = "Ready";
|
||||
stateTransitionOnNoAmmo[2] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[2] = "Fire";
|
||||
stateSequence[2] = "DiscSpin";
|
||||
// stateSound[2] = DiscLoopSound;
|
||||
|
||||
stateName[3] = "Fire";
|
||||
stateTransitionOnTimeout[3] = "Reload";
|
||||
stateTimeoutValue[3] = 0.3;
|
||||
stateFire[3] = true;
|
||||
stateRecoil[3] = LightRecoil;
|
||||
stateAllowImageChange[3] = false;
|
||||
stateSequence[3] = "Fire";
|
||||
stateScript[3] = "onFire";
|
||||
stateSound[3] = MortarFireSound;
|
||||
|
||||
stateName[4] = "Reload";
|
||||
stateTransitionOnNoAmmo[4] = "NoAmmo";
|
||||
stateTransitionOnTimeout[4] = "Ready";
|
||||
stateTimeoutValue[4] = 2.2; // 0.25 load, 0.25 spinup
|
||||
stateAllowImageChange[4] = false;
|
||||
stateSequence[4] = "Reload";
|
||||
// stateSound[4] = DiscReloadSound;
|
||||
|
||||
stateName[5] = "NoAmmo";
|
||||
stateTransitionOnAmmo[5] = "Reload";
|
||||
stateSequence[5] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[5] = "DryFire";
|
||||
|
||||
stateName[6] = "DryFire";
|
||||
stateSound[6] = GrenadeDryFireSound;
|
||||
stateTimeoutValue[6] = 0.3;
|
||||
stateTransitionOnTimeout[6] = "NoAmmo";
|
||||
|
||||
};
|
||||
|
||||
datablock ItemData(Napalm)
|
||||
{
|
||||
className = Weapon;
|
||||
catagory = "Spawn Items";
|
||||
shapeFile = "ammo_grenade.dts";
|
||||
image = NapalmImage;
|
||||
mass = 1;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
pickupRadius = 2;
|
||||
pickUpName = "a Napalm Gun";
|
||||
emap = true;
|
||||
};
|
||||
126
scripts/weapons/Other/PlasmaTorpedo.cs
Normal file
126
scripts/weapons/Other/PlasmaTorpedo.cs
Normal file
|
|
@ -0,0 +1,126 @@
|
|||
datablock TracerProjectileData(PlasmaTorpedoProjectile) {
|
||||
doDynamicClientHits = true;
|
||||
|
||||
directDamage = 0.0;
|
||||
hasDamageRadius = true;
|
||||
indirectDamage = 1.5;
|
||||
damageRadius = 25.0;
|
||||
kickBackStrength = 4000;
|
||||
radiusDamageType = $DamageType::PTorpdeo; //obviously change this
|
||||
|
||||
ImageSource = "PlasmaTorpedoImage";
|
||||
|
||||
explosion = "SatchelMainExplosion";
|
||||
splash = ChaingunSplash;
|
||||
|
||||
sound = ShrikeBlasterProjectileSound;
|
||||
|
||||
dryVelocity = 425.0;
|
||||
wetVelocity = 100.0;
|
||||
velInheritFactor = 1.0;
|
||||
fizzleTimeMS = 1000;
|
||||
lifetimeMS = 1000;
|
||||
explodeOnDeath = false;
|
||||
reflectOnWaterImpactAngle = 0.0;
|
||||
explodeOnWaterImpact = false;
|
||||
deflectionOnWaterImpact = 0.0;
|
||||
fizzleUnderwaterMS = 3000;
|
||||
|
||||
tracerLength = 45.0;
|
||||
tracerAlpha = false;
|
||||
tracerMinPixels = 6;
|
||||
tracerColor = "1.0 0.0 0.0 0.0";
|
||||
tracerTex[0] = "special/shrikeBolt";
|
||||
tracerTex[1] = "special/shrikeBoltCross";
|
||||
tracerWidth = 0.55;
|
||||
crossSize = 0.99;
|
||||
crossViewAng = 0.990;
|
||||
renderCross = true;
|
||||
|
||||
};
|
||||
|
||||
datablock ShapeBaseImageData(PlasmaTorpedoImage) {
|
||||
className = WeaponImage;
|
||||
shapeFile = "turret_fusion_large.dts";
|
||||
item = PlasmaTorpedo;
|
||||
usesenergy = true;
|
||||
|
||||
projectile = PlasmaTorpedoProjectile;
|
||||
projectileType = TracerProjectile;
|
||||
|
||||
emap = true;
|
||||
|
||||
RankRequire = $TWM2::RankRequire["SCD343"];
|
||||
PrestigeRequire = 4;
|
||||
|
||||
HasChallenges = 1;
|
||||
ChallengeCt = 8;
|
||||
Challenge[1] = "PTC Hunter\t100\t100\tNone";
|
||||
Challenge[2] = "PTC Expert\t250\t500\tNone";
|
||||
Challenge[3] = "PTC Master\t500\t1000\tNone";
|
||||
Challenge[4] = "PTC God\t1000\t2000\tNone";
|
||||
Challenge[5] = "PTC Bronze Commendation\t2500\t10000\tNone";
|
||||
Challenge[6] = "PTC Silver Commendation\t5000\t25000\tNone";
|
||||
Challenge[7] = "PTC Gold Commendation\t10000\t50000\tNone";
|
||||
Challenge[8] = "PTC Titan Commendation\t25000\t75000\tNone";
|
||||
GunName = "Plasma Torpedo Cannon";
|
||||
|
||||
stateName[0] = "Activate";
|
||||
stateTransitionOnTimeout[0] = "ActivateReady";
|
||||
stateTimeoutValue[0] = 0.5;
|
||||
stateSequence[0] = "Activate";
|
||||
stateSound[0] = MortarReloadSound;
|
||||
|
||||
stateName[1] = "ActivateReady";
|
||||
stateTransitionOnLoaded[1] = "Ready";
|
||||
stateTransitionOnNoAmmo[1] = "NoAmmo";
|
||||
|
||||
stateName[2] = "Ready";
|
||||
stateTransitionOnNoAmmo[2] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[2] = "Fire";
|
||||
|
||||
stateName[3] = "Fire";
|
||||
stateTransitionOnTimeout[3] = "Reload";
|
||||
stateTimeoutValue[3] = 7.6;
|
||||
stateFire[3] = true;
|
||||
stateRecoil[3] = LightRecoil;
|
||||
stateAllowImageChange[3] = false;
|
||||
stateSequence[3] = "Fire";
|
||||
stateSound[3] = CentaurArtilleryFireSound;
|
||||
stateScript[3] = "onFire";
|
||||
|
||||
stateName[4] = "Reload";
|
||||
stateTransitionOnNoAmmo[4] = "NoAmmo";
|
||||
stateTransitionOnTimeout[4] = "Ready";
|
||||
stateSound[4] = MortarSwitchSound;
|
||||
stateEjectShell[4] = true;
|
||||
stateAllowImageChange[4] = false;
|
||||
stateSequence[4] = "Reload";
|
||||
|
||||
stateName[5] = "NoAmmo";
|
||||
stateTransitionOnAmmo[5] = "Reload";
|
||||
stateSequence[5] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[5] = "DryFire";
|
||||
|
||||
stateName[6] = "DryFire";
|
||||
stateTimeoutValue[6] = 0.3;
|
||||
stateSound[6] = ChaingunDryFireSound;
|
||||
stateTransitionOnTimeout[6] = "Ready";
|
||||
};
|
||||
|
||||
//item//
|
||||
datablock ItemData(PlasmaTorpedo) {
|
||||
className = Weapon;
|
||||
catagory = "Spawn Items";
|
||||
shapeFile = "turret_mortar_large.dts";
|
||||
image = PlasmaTorpedoImage;
|
||||
mass = 1;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
pickupRadius = 2;
|
||||
pickUpName = "a Plasma Torpedo Cannon";
|
||||
|
||||
computeCRC = true;
|
||||
emap = true;
|
||||
};
|
||||
|
||||
210
scripts/weapons/Other/ShadowRifle.cs
Normal file
210
scripts/weapons/Other/ShadowRifle.cs
Normal file
|
|
@ -0,0 +1,210 @@
|
|||
datablock ParticleData(NMMissileBaseParticle) {
|
||||
dragCoeffiecient = 0.0;
|
||||
gravityCoefficient = -0.2;
|
||||
inheritedVelFactor = 0.0;
|
||||
|
||||
lifetimeMS = 800;
|
||||
lifetimeVarianceMS = 500;
|
||||
|
||||
useInvAlpha = false;
|
||||
spinRandomMin = -160.0;
|
||||
spinRandomMax = 160.0;
|
||||
|
||||
animateTexture = true;
|
||||
framesPerSec = 15;
|
||||
|
||||
textureName = "special/cloudflash";
|
||||
|
||||
colors[0] = "0.5 0.1 0.9 1.0";
|
||||
colors[1] = "0.5 0.1 0.9 1.0";
|
||||
colors[2] = "0.5 0.1 0.9 1.0";
|
||||
|
||||
sizes[0] = 2.5;
|
||||
sizes[1] = 2.7;
|
||||
sizes[2] = 3.0;
|
||||
|
||||
times[0] = 0.0;
|
||||
times[1] = 0.7;
|
||||
times[2] = 1.0;
|
||||
};
|
||||
|
||||
datablock ParticleEmitterData(NMMissileBaseEmitter) {
|
||||
ejectionPeriodMS = 10;
|
||||
periodVarianceMS = 0;
|
||||
|
||||
ejectionVelocity = 1.5;
|
||||
velocityVariance = 0.3;
|
||||
|
||||
thetaMin = 0.0;
|
||||
thetaMax = 30.0;
|
||||
|
||||
particles = "NMMissileBaseParticle";
|
||||
};
|
||||
|
||||
datablock LinearFlareProjectileData(ShadowRifleBolt) {
|
||||
projectileShapeName = "turret_muzzlepoint.dts";
|
||||
scale = "1.0 1.0 1.0";
|
||||
faceViewer = true;
|
||||
directDamage = 0.02;
|
||||
hasDamageRadius = true;
|
||||
indirectDamage = 0.1;
|
||||
damageRadius = 4.0;
|
||||
kickBackStrength = 0.0;
|
||||
radiusDamageType = $DamageType::Shadow;
|
||||
|
||||
explosion = "BlasterExplosion";
|
||||
splash = PlasmaSplash;
|
||||
|
||||
baseEmitter = NMMissileBaseEmitter;
|
||||
|
||||
ImageSource = "ShadowRifleImage";
|
||||
|
||||
dryVelocity = 120.0; // z0dd - ZOD, 7/20/02. Faster plasma projectile. was 55
|
||||
wetVelocity = -1;
|
||||
velInheritFactor = 0.3;
|
||||
fizzleTimeMS = 250;
|
||||
lifetimeMS = 8000;
|
||||
explodeOnDeath = false;
|
||||
reflectOnWaterImpactAngle = 0.0;
|
||||
explodeOnWaterImpact = true;
|
||||
deflectionOnWaterImpact = 0.0;
|
||||
fizzleUnderwaterMS = -1;
|
||||
|
||||
//activateDelayMS = 100;
|
||||
activateDelayMS = -1;
|
||||
|
||||
size[0] = 0.2;
|
||||
size[1] = 0.5;
|
||||
size[2] = 0.1;
|
||||
|
||||
|
||||
numFlares = 35;
|
||||
flareColor = "1 0.18 0.03";
|
||||
flareModTexture = "flaremod";
|
||||
flareBaseTexture = "flarebase";
|
||||
|
||||
sound = PlasmaProjectileSound;
|
||||
fireSound = FlamethrowerFireSound;
|
||||
wetFireSound = PlasmaFireWetSound;
|
||||
|
||||
hasLight = true;
|
||||
lightRadius = 10.0;
|
||||
lightColor = "0.94 0.03 0.12";
|
||||
};
|
||||
|
||||
datablock ItemData(ShadowRifle) {
|
||||
className = Weapon;
|
||||
catagory = "Spawn Items";
|
||||
shapeFile = "weapon_sniper.dts";
|
||||
image = ShadowRifleImage;
|
||||
mass = 1;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
pickupRadius = 2;
|
||||
pickUpName = "a shadow rifle";
|
||||
|
||||
computeCRC = true;
|
||||
|
||||
};
|
||||
|
||||
datablock ShapeBaseImageData(ShadowRifleImage) {
|
||||
className = WeaponImage;
|
||||
shapeFile = "weapon_sniper.dts";
|
||||
item = ShadowRifle;
|
||||
projectile = ShadowRifleBolt;
|
||||
projectileType = LinearFlareProjectile;
|
||||
|
||||
MedalRequire = 1;
|
||||
|
||||
usesEnergy = true;
|
||||
minEnergy = 6;
|
||||
|
||||
stateName[0] = "Activate";
|
||||
stateTransitionOnTimeout[0] = "ActivateReady";
|
||||
stateSound[0] = SniperRifleSwitchSound;
|
||||
stateTimeoutValue[0] = 0.5;
|
||||
stateSequence[0] = "Activate";
|
||||
|
||||
stateName[1] = "ActivateReady";
|
||||
stateTransitionOnLoaded[1] = "Ready";
|
||||
stateTransitionOnNoAmmo[1] = "NoAmmo";
|
||||
|
||||
stateName[2] = "Ready";
|
||||
stateTransitionOnNoAmmo[2] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[2] = "CheckWet";
|
||||
|
||||
stateName[3] = "Fire";
|
||||
stateTransitionOnTimeout[3] = "Reload";
|
||||
stateTimeoutValue[3] = 0.5;
|
||||
stateFire[3] = true;
|
||||
stateAllowImageChange[3] = false;
|
||||
stateSequence[3] = "Fire";
|
||||
stateScript[3] = "onFire";
|
||||
|
||||
stateName[4] = "Reload";
|
||||
stateTransitionOnTimeout[4] = "Ready";
|
||||
stateTimeoutValue[4] = 2.5;
|
||||
stateAllowImageChange[4] = false;
|
||||
|
||||
stateName[5] = "CheckWet";
|
||||
stateTransitionOnWet[5] = "DryFire";
|
||||
stateTransitionOnNotWet[5] = "Fire";
|
||||
|
||||
stateName[6] = "NoAmmo";
|
||||
stateTransitionOnAmmo[6] = "Reload";
|
||||
stateTransitionOnTriggerDown[6] = "DryFire";
|
||||
stateSequence[6] = "NoAmmo";
|
||||
|
||||
stateName[7] = "DryFire";
|
||||
stateSound[7] = SniperRifleDryFireSound;
|
||||
stateTimeoutValue[7] = 0.5;
|
||||
stateTransitionOnTimeout[7] = "Ready";
|
||||
};
|
||||
|
||||
function ShadowRifleBolt::onCollision(%data,%projectile,%targetObject,%modifier,%position,%normal) {
|
||||
Parent::OnCollision(%data,%projectile,%targetObject,%modifier,%position,%normal);
|
||||
%cn = %targetObject.getClassName();
|
||||
if(%cn $= "Player") {
|
||||
if($Host::TeamDamageOn == 0) {
|
||||
if(%targetObject.team == %projectile.sourceObject.team) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(%targetObject.beingSapped) {
|
||||
return;
|
||||
}
|
||||
if(%targetObject.isBoss) {
|
||||
%targetObject.playShieldEffect("1 1 1");
|
||||
%vec = vectorsub(%projectile.sourceObject.getworldboxcenter(),vectorAdd(%targetObject.getPosition(), "0 0 1"));
|
||||
%vec = vectoradd(%vec, vectorscale(%projectile.sourceObject.getvelocity(),vectorlen(%vec)/100));
|
||||
%p = new LinearFlareProjectile() {
|
||||
dataBlock = ShadowRifleBolt; //burn :)
|
||||
initialDirection = %vec;
|
||||
initialPosition = vectorAdd(%targetObject.getPosition(), "0 0 1");
|
||||
sourceObject = %targetObject;
|
||||
sourceSlot = 0;
|
||||
};
|
||||
messageClient(%projectile.sourceObject.client, 'MsgWarn', "WARNING: The boss deflects the pulse back at you!");
|
||||
return;
|
||||
}
|
||||
else {
|
||||
%targetObject.beingSapped = 1;
|
||||
SapLoop(%projectile.sourceObject, %targetObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function SapLoop(%source, %target) {
|
||||
if(!%source.isAlive()) {
|
||||
return;
|
||||
}
|
||||
if(!%target.isAlive()) {
|
||||
createBlood(%target);
|
||||
return;
|
||||
}
|
||||
%target.zapObject();
|
||||
%target.getDatablock().damageObject(%target, %source, %source.getPosition, 0.05, $DamageType::Shadow);
|
||||
%target.lastDamagedImage = "ShadowRifleImage";
|
||||
%source.applyRepair(0.05);
|
||||
schedule(500, 0, "SapLoop", %source, %target);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue