mirror of
https://github.com/PhantomGamesDevelopment/TWM2.git
synced 2026-02-13 19:53:47 +00:00
Additional Server Controls, Other Stuff
Added more name change capabilities to serverControl.cs, adjusted the Acid Cannon to the new behavior, prep work for sniper zombies and the new mini boss coming in 3.9.2.
This commit is contained in:
parent
34dc29b805
commit
301ce62a62
35 changed files with 1004 additions and 479 deletions
|
|
@ -1,322 +1,171 @@
|
|||
// 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;
|
||||
};
|
||||
datablock TracerProjectileData(AcidCannonPulse) {
|
||||
doDynamicClientHits = true;
|
||||
|
||||
//acid bomb
|
||||
datablock ParticleData(ZAcidBombParticle) {
|
||||
dragCoeffiecient = 0.0;
|
||||
gravityCoefficient = 0.5;
|
||||
inheritedVelFactor = 0.5;
|
||||
projectileShapeName = "";
|
||||
directDamage = 0.3;
|
||||
directDamageType = $DamageType::AcidCannon;
|
||||
hasDamageRadius = true;
|
||||
indirectDamage = 0.35;
|
||||
damageRadius = 10.0;
|
||||
kickBackStrength = 0.0;
|
||||
radiusDamageType = $DamageType::AcidCannon;
|
||||
sound = BlasterProjectileSound;
|
||||
explosion = ZAcidBallExplosion;
|
||||
|
||||
lifetimeMS = 4000;
|
||||
lifetimeVarianceMS = 500;
|
||||
ImageSource = "AcidCannonImage";
|
||||
|
||||
spinRandomMin = -200.0;
|
||||
spinRandomMax = 200.0;
|
||||
dryVelocity = 150.0;
|
||||
wetVelocity = 150.0;
|
||||
velInheritFactor = 1.0;
|
||||
fizzleTimeMS = 1200;
|
||||
lifetimeMS = 1500;
|
||||
explodeOnDeath = false;
|
||||
reflectOnWaterImpactAngle = 0.0;
|
||||
explodeOnWaterImpact = true;
|
||||
deflectionOnWaterImpact = 0.0;
|
||||
fizzleUnderwaterMS = -1;
|
||||
|
||||
textureName = "special/bubbles";
|
||||
activateDelayMS = 100;
|
||||
|
||||
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";
|
||||
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;
|
||||
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;
|
||||
};
|
||||
function AcidCannonPulse::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.setWhiteout(1.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
className = WeaponImage;
|
||||
shapeFile = "weapon_energy.dts";
|
||||
item = AcidCannon;
|
||||
projectile = AcidCannonPulse;
|
||||
projectileType = TracerProjectile;
|
||||
|
||||
usesEnergy = true;
|
||||
fireEnergy = 4;
|
||||
minEnergy = 4;
|
||||
HasChallenges = 0;
|
||||
//RankRequire = $TWM2::RankRequire["PulsePhaser"];
|
||||
//No rank required, this weapon is picked up from killed zombies
|
||||
|
||||
stateName[0] = "Activate";
|
||||
stateTransitionOnTimeout[0] = "ActivateReady";
|
||||
stateTimeoutValue[0] = 0.5;
|
||||
stateSequence[0] = "Activate";
|
||||
stateSound[0] = BlasterSwitchSound;
|
||||
usesEnergy = true;
|
||||
fireEnergy = 4;
|
||||
minEnergy = 4;
|
||||
|
||||
stateName[1] = "ActivateReady";
|
||||
stateTransitionOnLoaded[1] = "Ready";
|
||||
stateTransitionOnNoAmmo[1] = "NoAmmo";
|
||||
stateName[0] = "Activate";
|
||||
stateTransitionOnTimeout[0] = "ActivateReady";
|
||||
stateTimeoutValue[0] = 0.5;
|
||||
stateSequence[0] = "Activate";
|
||||
stateSound[0] = BlasterSwitchSound;
|
||||
|
||||
stateName[2] = "Ready";
|
||||
stateTransitionOnNoAmmo[2] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[2] = "Fire";
|
||||
stateName[1] = "ActivateReady";
|
||||
stateTransitionOnLoaded[1] = "Ready";
|
||||
stateTransitionOnNoAmmo[1] = "NoAmmo";
|
||||
|
||||
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[2] = "Ready";
|
||||
stateTransitionOnNoAmmo[2] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[2] = "Fire";
|
||||
|
||||
stateName[4] = "Reload";
|
||||
stateTransitionOnNoAmmo[4] = "NoAmmo";
|
||||
stateTransitionOnTimeout[4] = "Ready";
|
||||
stateTimeoutValue[4] = 4.2;
|
||||
stateAllowImageChange[4] = false;
|
||||
stateSequence[4] = "Reload";
|
||||
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[5] = "NoAmmo";
|
||||
stateTransitionOnAmmo[5] = "Reload";
|
||||
stateSequence[5] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[5] = "DryFire";
|
||||
stateName[4] = "Reload";
|
||||
stateTransitionOnNoAmmo[4] = "NoAmmo";
|
||||
stateTransitionOnTimeout[4] = "Ready";
|
||||
stateTimeoutValue[4] = 4.2;
|
||||
stateAllowImageChange[4] = false;
|
||||
stateSequence[4] = "Reload";
|
||||
|
||||
stateName[6] = "DryFire";
|
||||
stateTimeoutValue[6] = 0.3;
|
||||
stateSound[6] = BlasterDryFireSound;
|
||||
stateTransitionOnTimeout[6] = "Ready";
|
||||
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;
|
||||
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);
|
||||
Parent::onMount(%this, %obj, %slot);
|
||||
}
|
||||
|
||||
function AcidCannonImage::onUnmount(%this,%obj,%slot) {
|
||||
Parent::onUnmount(%this, %obj, %slot);
|
||||
Parent::onUnmount(%this, %obj, %slot);
|
||||
}
|
||||
|
||||
function AcidCannonImage::onFire(%data,%obj,%slot) {
|
||||
AcidCannonAttack(%obj, %slot, 0);
|
||||
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);
|
||||
}
|
||||
%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 || %chargecount == 9) {
|
||||
%p = new TracerProjectile() {
|
||||
dataBlock = AcidCannonPulse;
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
217
scripts/weapons/Other/NLS22AcidSniper.cs
Normal file
217
scripts/weapons/Other/NLS22AcidSniper.cs
Normal file
|
|
@ -0,0 +1,217 @@
|
|||
datablock TracerProjectileData(M1Bullet) {
|
||||
doDynamicClientHits = true;
|
||||
|
||||
directDamage = 0.65;
|
||||
directDamageType = $DamageType::M1;
|
||||
explosion = "ChaingunExplosion";
|
||||
splash = ChaingunSplash;
|
||||
HeadMultiplier = 1.5;
|
||||
LegsMultiplier = 0.35;
|
||||
|
||||
HeadShotKill = 1;
|
||||
|
||||
ImageSource = "NLS22AcidSniperImage";
|
||||
|
||||
kickBackStrength = 15.0;
|
||||
sound = ChaingunProjectile;
|
||||
|
||||
dryVelocity = 3000.0;
|
||||
wetVelocity = 2000.0;
|
||||
velInheritFactor = 1.0;
|
||||
fizzleTimeMS = 1000;
|
||||
lifetimeMS = 1000;
|
||||
explodeOnDeath = false;
|
||||
reflectOnWaterImpactAngle = 0.0;
|
||||
explodeOnWaterImpact = false;
|
||||
deflectionOnWaterImpact = 0.0;
|
||||
fizzleUnderwaterMS = 3000;
|
||||
|
||||
tracerLength = 20.0;
|
||||
tracerAlpha = false;
|
||||
tracerMinPixels = 6;
|
||||
tracerColor = 211.0/255.0 @ " " @ 215.0/255.0 @ " " @ 120.0/255.0 @ " 0.75";
|
||||
tracerTex[0] = "special/tracer00";
|
||||
tracerTex[1] = "special/tracercross";
|
||||
tracerWidth = 0.09;
|
||||
crossSize = 0.20;
|
||||
crossViewAng = 0.990;
|
||||
renderCross = true;
|
||||
|
||||
decalData[0] = ChaingunDecal1;
|
||||
decalData[1] = ChaingunDecal2;
|
||||
decalData[2] = ChaingunDecal3;
|
||||
decalData[3] = ChaingunDecal4;
|
||||
decalData[4] = ChaingunDecal5;
|
||||
decalData[5] = ChaingunDecal6;
|
||||
};
|
||||
|
||||
datablock ItemData(NLS22AcidSniperAmmo) {
|
||||
className = Ammo;
|
||||
catagory = "Ammo";
|
||||
shapeFile = "ammo_chaingun.dts";
|
||||
mass = 1;
|
||||
elasticity = 0.2;
|
||||
friction = 0.6;
|
||||
pickupRadius = 2;
|
||||
pickUpName = "Some NLS-22 Acid Sniper Canisters";
|
||||
|
||||
computeCRC = true;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Weapon
|
||||
//--------------------------------------
|
||||
datablock ShapeBaseImageData(NLS22AcidSniperImage) {
|
||||
className = WeaponImage;
|
||||
shapeFile = "weapon_sniper.dts";
|
||||
mass = 10;
|
||||
item = NLS22AcidSniper;
|
||||
ammo = NLS22AcidSniperAmmo;
|
||||
projectile = M1Bullet;
|
||||
projectileType = TracerProjectile;
|
||||
emap = true;
|
||||
|
||||
armThread = looksn;
|
||||
|
||||
//ClipStuff
|
||||
ClipName = "NLS22AcidSniperClip";
|
||||
ClipPickupName["NLS22AcidSniperClip"] = "A Few Boxes Of NLS-22 Acid Canisters";
|
||||
ShowsClipInHud = 1;
|
||||
ClipReloadTime = 4;
|
||||
ClipReturn = 4;
|
||||
InitialClips = 5;
|
||||
//
|
||||
//Challenges
|
||||
HasChallenges = 1;
|
||||
ChallengeCt = 8;
|
||||
Challenge[1] = "NLS-22 Hunter\t100\t150\tNone";
|
||||
Challenge[2] = "NLS-22 Expert\t200\t250\tNone";
|
||||
Challenge[3] = "NLS-22 Master\t500\t500\tNone";
|
||||
Challenge[4] = "NLS-22 God\t1000\t1000\tNone";
|
||||
Challenge[5] = "NLS-22 Bronze Commendation\t2500\t10000\tNone";
|
||||
Challenge[6] = "NLS-22 Silver Commendation\t5000\t25000\tNone";
|
||||
Challenge[7] = "NLS-22 Gold Commendation\t10000\t50000\tNone";
|
||||
Challenge[8] = "NLS-22 Titan Commendation\t25000\t75000\tNone";
|
||||
GunName = "NLS-22 Acid Sniper Rifle";
|
||||
//
|
||||
|
||||
RankRequire = $TWM2::RankRequire["M1"];
|
||||
|
||||
casing = ShellDebris;
|
||||
shellExitDir = "1.0 0.3 1.0";
|
||||
shellExitOffset = "0.15 -0.56 -0.1";
|
||||
shellExitVariance = 15.0;
|
||||
shellVelocity = 3.0;
|
||||
|
||||
|
||||
stateName[0] = "Activate";
|
||||
stateTransitionOnTimeout[0] = "ActivateReady";
|
||||
stateTimeoutValue[0] = 0.5;
|
||||
stateSequence[0] = "Activate";
|
||||
stateSound[0] = ChaingunSwitchSound;
|
||||
|
||||
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.01;
|
||||
stateFire[3] = true;
|
||||
stateRecoil[3] = LightRecoil;
|
||||
stateAllowImageChange[3] = false;
|
||||
stateScript[3] = "onFire";
|
||||
stateSound[3] = "M1FireSound";
|
||||
|
||||
stateName[4] = "Reload";
|
||||
stateTransitionOnNoAmmo[4] = "NoAmmo";
|
||||
stateTransitionOnTimeout[4] = "Ready";
|
||||
stateTimeoutValue[4] = 0.9;
|
||||
stateAllowImageChange[4] = false;
|
||||
stateSequence[4] = "Reload";
|
||||
|
||||
stateName[5] = "NoAmmo";
|
||||
stateTransitionOnAmmo[5] = "Reload";
|
||||
stateSequence[5] = "NoAmmo";
|
||||
stateTransitionOnTriggerDown[5] = "DryFire";
|
||||
|
||||
stateName[6] = "DryFire";
|
||||
stateSound[6] = ChaingunDryFireSound;
|
||||
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";
|
||||
};
|
||||
|
||||
datablock ItemData(NLS22AcidSniper) {
|
||||
className = Weapon;
|
||||
catagory = "Spawn Items";
|
||||
shapeFile = "weapon_sniper.dts";
|
||||
image = NLS22AcidSniperImage;
|
||||
mass = 1.0;
|
||||
elasticity = 0.0;
|
||||
friction = 0.6;
|
||||
pickupRadius = 2;
|
||||
pickUpName = "a NLS-22 Acid Sniper Rifle";
|
||||
|
||||
computeCRC = true;
|
||||
emap = true;
|
||||
};
|
||||
|
||||
//Two images make the scope
|
||||
datablock ShapeBaseImageData(NLS22AcidSniperScopeImage) : NLS22AcidSniperImage {
|
||||
shapeFile = "turret_belly_barrell.dts";
|
||||
offset = "0 0.25 0.25";
|
||||
rotation = "1 0 0 180";
|
||||
};
|
||||
|
||||
datablock ShapeBaseImageData(NLS22AcidSniperScopeImage2) : NLS22AcidSniperImage {
|
||||
shapeFile = "turret_belly_barrell.dts";
|
||||
offset = "0 0.3 0.25";
|
||||
rotation = "1 0 0 0";
|
||||
};
|
||||
|
||||
datablock ShapeBaseImageData(NLS22AcidSniperBarrelImage) : NLS22AcidSniperImage {
|
||||
shapeFile = "weapon_elf.dts";
|
||||
offset = "0 0.3 0";
|
||||
rotation = "1 0 0 0";
|
||||
};
|
||||
|
||||
function NLS22AcidSniperImage::onMount(%this,%obj,%slot) {
|
||||
if(!$TWM2::AllowSnipers) {
|
||||
bottomPrint(%obj.client, "The host has disabled sniper weapons.", 2, 2);
|
||||
%obj.throwweapon(1);
|
||||
%obj.throwweapon(0);
|
||||
}
|
||||
Parent::onMount(%this, %obj, %slot);
|
||||
%obj.mountImage(NLS22AcidSniperScopeImage, 5);
|
||||
%obj.mountImage(NLS22AcidSniperScopeImage2, 6);
|
||||
%obj.mountImage(NLS22AcidSniperBarrelImage, 7);
|
||||
}
|
||||
|
||||
function NLS22AcidSniperImage::onUnmount(%this,%obj,%slot) {
|
||||
Parent::onUnmount(%this, %obj, %slot);
|
||||
%obj.unmountImage(5);
|
||||
%obj.unmountImage(6);
|
||||
%obj.unmountImage(7);
|
||||
}
|
||||
|
||||
function M1SniperRifleImage::onFire(%data, %obj, %slot) {
|
||||
if(!$TWM2::AllowSnipers) {
|
||||
bottomPrint(%obj.client, "The host has disabled sniper weapons.", 2, 2);
|
||||
%obj.throwweapon(1);
|
||||
%obj.throwweapon(0);
|
||||
}
|
||||
%p = Parent::onFire(%data, %obj, %slot);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue