November Changes

3.9.2 Balancing Pass, Armor System Adjustments, More Zombie Types Added
This commit is contained in:
Robert Fritzen 2017-11-30 19:43:22 -06:00
parent 19be242dfd
commit 0954efcdc4
58 changed files with 7602 additions and 7354 deletions

View file

@ -1,58 +1,58 @@
datablock SeekerProjectileData(JavelinMissile) {
casingShapeName = "weapon_missile_casement.dts";
projectileShapeName = "weapon_missile_projectile.dts";
hasDamageRadius = true;
indirectDamage = 1.8; //Requires Lock
damageRadius = 18.0;
radiusDamageType = $DamageType::Missile;
kickBackStrength = 2000;
ImageSource = "JavelinImage";
casingShapeName = "weapon_missile_casement.dts";
projectileShapeName = "weapon_missile_projectile.dts";
hasDamageRadius = true;
indirectDamage = 1.8; //Requires Lock
damageRadius = 18.0;
radiusDamageType = $DamageType::Javelin;
kickBackStrength = 2000;
explosion = "SatchelMainExplosion";
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
ImageSource = "JavelinImage";
baseEmitter = MissileSmokeEmitter;
delayEmitter = MissileFireEmitter;
puffEmitter = MissilePuffEmitter;
bubbleEmitter = GrenadeBubbleEmitter;
bubbleEmitTime = 1.0;
explosion = "SatchelMainExplosion";
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
exhaustEmitter = MissileLauncherExhaustEmitter;
exhaustTimeMs = 300;
exhaustNodeName = "muzzlePoint1";
baseEmitter = MissileSmokeEmitter;
delayEmitter = MissileFireEmitter;
puffEmitter = MissilePuffEmitter;
bubbleEmitter = GrenadeBubbleEmitter;
bubbleEmitTime = 1.0;
lifetimeMS = 30000;
muzzleVelocity = 10.0;
maxVelocity = 150.0;
turningSpeed = 110.0;
acceleration = 350.0;
exhaustEmitter = MissileLauncherExhaustEmitter;
exhaustTimeMs = 300;
exhaustNodeName = "muzzlePoint1";
proximityRadius = 3;
lifetimeMS = 30000;
muzzleVelocity = 10.0;
maxVelocity = 150.0;
turningSpeed = 110.0;
acceleration = 350.0;
terrainAvoidanceSpeed = 180;
terrainScanAhead = 25;
terrainHeightFail = 12;
terrainAvoidanceRadius = 100;
proximityRadius = 3;
flareDistance = 200;
flareAngle = 30;
terrainAvoidanceSpeed = 180;
terrainScanAhead = 25;
terrainHeightFail = 12;
terrainAvoidanceRadius = 100;
sound = MissileProjectileSound;
flareDistance = 200;
flareAngle = 30;
hasLight = true;
lightRadius = 5.0;
lightColor = "0.2 0.05 0";
sound = MissileProjectileSound;
useFlechette = true;
flechetteDelayMs = 550;
casingDeb = FlechetteDebris;
hasLight = true;
lightRadius = 5.0;
lightColor = "0.2 0.05 0";
explodeOnWaterImpact = false;
useFlechette = true;
flechetteDelayMs = 550;
casingDeb = FlechetteDebris;
explodeOnWaterImpact = false;
};
@ -61,183 +61,180 @@ datablock SeekerProjectileData(JavelinMissile) {
// Ammo
//--------------------------------------
datablock ItemData(JavelinAmmo)
{
className = Ammo;
catagory = "Ammo";
shapeFile = "ammo_missile.dts";
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
datablock ItemData(JavelinAmmo) {
className = Ammo;
catagory = "Ammo";
shapeFile = "ammo_missile.dts";
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "some javelin rockets";
computeCRC = true;
computeCRC = true;
};
//--------------------------------------------------------------------------
// Weapon
//--------------------------------------
datablock ItemData(Javelin)
{
className = Weapon;
catagory = "Spawn Items";
shapeFile = "weapon_mortar.dts";
image = JavelinImage;
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
datablock ItemData(Javelin) {
className = Weapon;
catagory = "Spawn Items";
shapeFile = "weapon_mortar.dts";
image = JavelinImage;
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "a javelin launcher";
computeCRC = true;
emap = true;
computeCRC = true;
emap = true;
};
datablock ShapeBaseImageData(JavelinImage) {
className = WeaponImage;
shapeFile = "weapon_mortar.dts";
item = Javelin;
ammo = JavelinAmmo;
offset = "0 0 0";
armThread = lookms;
emap = true;
className = WeaponImage;
shapeFile = "weapon_mortar.dts";
item = Javelin;
ammo = JavelinAmmo;
offset = "0 0 0";
armThread = lookms;
emap = true;
projectile = JavelinMissile;
projectileType = SeekerProjectile;
projectile = JavelinMissile;
projectileType = SeekerProjectile;
isSeeker = true;
seekRadius = 700;
maxSeekAngle = 8;
seekTime = 0.5;
minSeekHeat = 0.01; // the heat that must be present on a target to lock it.
//ClipStuff
ClipName = "JavelinClip";
ClipPickupName["JavelinClip"] = "A Few Javelin Missiles";
ShowsClipInHud = 1;
ClipReloadTime = 6;
ClipReturn = 1;
InitialClips = 2;
//
HasChallenges = 1;
ChallengeCt = 7;
Challenge[1] = "Javelin Hunter\t100\t500\tLaser";
Challenge[2] = "Javelin Expert\t250\t1000\tNone";
Challenge[3] = "Javelin Mastery\t500\t2500\tNone";
Challenge[4] = "Javelin Bronze Commendation\t1000\t10000\tNone";
Challenge[5] = "Javelin Silver Commendation\t2500\t25000\tNone";
Challenge[6] = "Javelin Gold Commendation\t5000\t50000\tNone";
Challenge[7] = "Javelin Titan Commendation\t10000\t75000\tNone";
Upgrade[1] = "Laser";
GunName = "Javelin";
isSeeker = true;
seekRadius = 700;
maxSeekAngle = 8;
seekTime = 0.5;
minSeekHeat = 0.01; // the heat that must be present on a target to lock it.
RankRequire = $TWM2::RankRequire["Javelin"];
//ClipStuff
ClipName = "JavelinClip";
ClipPickupName["JavelinClip"] = "A Few Javelin Missiles";
ShowsClipInHud = 1;
ClipReloadTime = 6;
ClipReturn = 1;
InitialClips = 2;
//
HasChallenges = 1;
ChallengeCt = 7;
Challenge[1] = "Javelin Hunter\t100\t500\tLaser";
Challenge[2] = "Javelin Expert\t250\t1000\tNone";
Challenge[3] = "Javelin Mastery\t500\t2500\tNone";
Challenge[4] = "Javelin Bronze Commendation\t1000\t10000\tNone";
Challenge[5] = "Javelin Silver Commendation\t2500\t25000\tNone";
Challenge[6] = "Javelin Gold Commendation\t5000\t50000\tNone";
Challenge[7] = "Javelin Titan Commendation\t10000\t75000\tNone";
Upgrade[1] = "Laser";
GunName = "Javelin";
// only target objects outside this range
minTargetingDistance = 80;
RankRequire = $TWM2::RankRequire["Javelin"];
stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "ActivateReady";
stateTimeoutValue[0] = 0.5;
stateSequence[0] = "Activate";
stateSound[0] = MissileSwitchSound;
// only target objects outside this range
minTargetingDistance = 80;
stateName[1] = "ActivateReady";
stateTransitionOnLoaded[1] = "Ready";
stateTransitionOnNoAmmo[1] = "NoAmmo";
stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "ActivateReady";
stateTimeoutValue[0] = 0.5;
stateSequence[0] = "Activate";
stateSound[0] = MissileSwitchSound;
stateName[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTransitionOnTriggerDown[2] = "CheckWet";
stateName[1] = "ActivateReady";
stateTransitionOnLoaded[1] = "Ready";
stateTransitionOnNoAmmo[1] = "NoAmmo";
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[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTransitionOnTriggerDown[2] = "CheckWet";
stateName[4] = "Reload";
stateTransitionOnNoAmmo[4] = "NoAmmo";
stateTransitionOnTimeout[4] = "Ready";
stateTimeoutValue[4] = 2.5;
stateAllowImageChange[4] = false;
stateSequence[4] = "Reload";
stateSound[4] = MissileReloadSound;
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[5] = "NoAmmo";
stateTransitionOnAmmo[5] = "Reload";
stateSequence[5] = "NoAmmo";
stateTransitionOnTriggerDown[5] = "DryFire";
stateName[4] = "Reload";
stateTransitionOnNoAmmo[4] = "NoAmmo";
stateTransitionOnTimeout[4] = "Ready";
stateTimeoutValue[4] = 2.5;
stateAllowImageChange[4] = false;
stateSequence[4] = "Reload";
stateSound[4] = MissileReloadSound;
stateName[6] = "DryFire";
stateSound[6] = MissileDryFireSound;
stateTimeoutValue[6] = 1.0;
stateTransitionOnTimeout[6] = "ActivateReady";
stateName[5] = "NoAmmo";
stateTransitionOnAmmo[5] = "Reload";
stateSequence[5] = "NoAmmo";
stateTransitionOnTriggerDown[5] = "DryFire";
stateName[7] = "CheckTarget";
stateTransitionOnNoTarget[7] = "DryFire";
stateTransitionOnTarget[7] = "Fire";
stateName[6] = "DryFire";
stateSound[6] = MissileDryFireSound;
stateTimeoutValue[6] = 1.0;
stateTransitionOnTimeout[6] = "ActivateReady";
stateName[8] = "CheckWet";
stateTransitionOnWet[8] = "WetFire";
stateTransitionOnNotWet[8] = "CheckTarget";
stateName[7] = "CheckTarget";
stateTransitionOnNoTarget[7] = "DryFire";
stateTransitionOnTarget[7] = "Fire";
stateName[9] = "WetFire";
stateTransitionOnNoAmmo[9] = "NoAmmo";
stateTransitionOnTimeout[9] = "Reload";
stateSound[9] = MissileFireSound;
stateRecoil[3] = LightRecoil;
stateTimeoutValue[9] = 0.4;
stateScript[9] = "onWetFire";
stateAllowImageChange[9] = false;
stateName[8] = "CheckWet";
stateTransitionOnWet[8] = "WetFire";
stateTransitionOnNotWet[8] = "CheckTarget";
stateName[9] = "WetFire";
stateTransitionOnNoAmmo[9] = "NoAmmo";
stateTransitionOnTimeout[9] = "Reload";
stateSound[9] = MissileFireSound;
stateRecoil[3] = LightRecoil;
stateTimeoutValue[9] = 0.4;
stateScript[9] = "onWetFire";
stateAllowImageChange[9] = false;
};
function JavelinImage::onFire(%data,%obj,%slot) {
%obj.decInventory(%data.ammo,1);
if(%obj.inv[%data.ammo] == 0) { //Added Phantom139, TWM2
AttemptReload(%data, %obj, %slot);
}
%obj.decInventory(%data.ammo,1);
if(%obj.inv[%data.ammo] == 0) { //Added Phantom139, TWM2
AttemptReload(%data, %obj, %slot);
}
%p = new (SeekerProjectile)() {
dataBlock = JavelinMissile;
initialDirection = "0 0 10";
initialPosition = %obj.getPosition();
damageFactor = 1;
sourceObject = %obj;
};
%p.WeaponImageSource = %data.getName();
MissileSet.add(%p);
%p = new (SeekerProjectile)() {
dataBlock = JavelinMissile;
initialDirection = "0 0 10";
initialPosition = %obj.getPosition();
damageFactor = 1;
sourceObject = %obj;
};
%p.WeaponImageSource = %data.getName();
%target = %obj.getLockedTarget();
if(%target) {
//go up first!!!
//%p.setPositionTarget(vectorAdd(%obj.getPosition(), "0 0 200"));
%p.schedule(3500, "setObjectTarget", %target);
schedule(3501, 0, "SetMissileTargeted", %target, %p);
}
else if(%obj.isLocked()) {
//%p.setPositionTarget(vectorAdd(%obj.getPosition(), "0 0 200"));
//echo("Javelin Lock: "@%obj.getLockedPosition()@"");
%p.JavBeac = new BeaconObject() {
dataBlock = "BomberBeacon";
beaconType = "vehicle";
position = %obj.getLockedPosition();
};
%p.schedule(3500, "setObjectTarget", %p.JavBeac);
schedule(3500, 0, "SetMissileTargeted", %p.JavBeac, %p);
%p.JavBeac.schedule(10000, "Delete");
}
else {
//no lock, this missile must self destruct...
%p.setNoTarget();
%p.getDatablock().onExplode(%p, %p.getPosition(), 1);
}
MissileSet.add(%p);
%target = %obj.getLockedTarget();
if(%target) {
//go up first!!!
//%p.setPositionTarget(vectorAdd(%obj.getPosition(), "0 0 200"));
%p.schedule(3500, "setObjectTarget", %target);
schedule(3501, 0, "SetMissileTargeted", %target, %p);
}
else if(%obj.isLocked()) {
//%p.setPositionTarget(vectorAdd(%obj.getPosition(), "0 0 200"));
//echo("Javelin Lock: "@%obj.getLockedPosition()@"");
%p.JavBeac = new BeaconObject() {
dataBlock = "BomberBeacon";
beaconType = "vehicle";
position = %obj.getLockedPosition();
};
%p.schedule(3500, "setObjectTarget", %p.JavBeac);
schedule(3500, 0, "SetMissileTargeted", %p.JavBeac, %p);
%p.JavBeac.schedule(10000, "Delete");
}
else {
//no lock, this missile must self destruct...
%p.setNoTarget();
%p.getDatablock().onExplode(%p, %p.getPosition(), 1);
}
}

View file

@ -1,236 +1,229 @@
datablock SeekerProjectileData(RPGMissile) {
casingShapeName = "weapon_missile_casement.dts";
projectileShapeName = "grenade.dts";
hasDamageRadius = true;
indirectDamage = 1.3; //TWM2 2.1, Increased to 1.3 from 0.8
damageRadius = 8.0;
radiusDamageType = $DamageType::RPG;
kickBackStrength = 3500;
casingShapeName = "weapon_missile_casement.dts";
projectileShapeName = "grenade.dts";
hasDamageRadius = true;
indirectDamage = 1.3; //TWM2 2.1, Increased to 1.3 from 0.8
damageRadius = 8.0;
radiusDamageType = $DamageType::RPG;
kickBackStrength = 3500;
ImageSource = "RPGImage";
ImageSource = "RPGImage";
explosion = "HandGrenadeExplosion";
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
explosion = "HandGrenadeExplosion";
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 = MissileSmokeEmitter;
delayEmitter = MissileFireEmitter;
puffEmitter = MissilePuffEmitter;
bubbleEmitter = GrenadeBubbleEmitter;
bubbleEmitTime = 1.0;
baseEmitter = MissileSmokeEmitter;
delayEmitter = MissileFireEmitter;
puffEmitter = MissilePuffEmitter;
bubbleEmitter = GrenadeBubbleEmitter;
bubbleEmitTime = 1.0;
exhaustEmitter = MissileLauncherExhaustEmitter;
exhaustTimeMs = 300;
exhaustNodeName = "muzzlePoint1";
exhaustEmitter = MissileLauncherExhaustEmitter;
exhaustTimeMs = 300;
exhaustNodeName = "muzzlePoint1";
lifetimeMS = 5000; // z0dd - ZOD, 4/14/02. Was 6000
muzzleVelocity = 100.0;
maxVelocity = 350.0; // z0dd - ZOD, 4/14/02. Was 80.0
turningSpeed = 54.0;
acceleration = 50.0;
lifetimeMS = 5000; // z0dd - ZOD, 4/14/02. Was 6000
muzzleVelocity = 100.0;
maxVelocity = 350.0; // z0dd - ZOD, 4/14/02. Was 80.0
turningSpeed = 54.0;
acceleration = 50.0;
explodeOnDeath = true;
explodeOnDeath = true;
proximityRadius = 3;
proximityRadius = 3;
sound = MissileProjectileSound;
sound = MissileProjectileSound;
hasLight = true;
lightRadius = 3.0;
lightColor = "0.2 0.05 0";
hasLight = true;
lightRadius = 3.0;
lightColor = "0.2 0.05 0";
useFlechette = true;
flechetteDelayMs = 10;
casingDeb = FlechetteDebris;
useFlechette = true;
flechetteDelayMs = 10;
casingDeb = FlechetteDebris;
explodeOnWaterImpact = true;
explodeOnWaterImpact = true;
};
//--------------------------------------------------------------------------
// Ammo
//--------------------------------------
datablock ItemData(RPGAmmo)
{
className = Ammo;
catagory = "Ammo";
shapeFile = "ammo_missile.dts";
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
datablock ItemData(RPGAmmo) {
className = Ammo;
catagory = "Ammo";
shapeFile = "ammo_missile.dts";
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "Some RPGs";
computeCRC = true;
computeCRC = true;
};
//--------------------------------------------------------------------------
// Weapon
//--------------------------------------
datablock ItemData(RPG)
{
className = Weapon;
catagory = "Spawn Items";
shapeFile = "weapon_grenade_launcher.dts";
image = RPGImage;
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "an RPG";
datablock ItemData(RPG) {
className = Weapon;
catagory = "Spawn Items";
shapeFile = "weapon_grenade_launcher.dts";
image = RPGImage;
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "an RPG";
computeCRC = true;
emap = true;
computeCRC = true;
emap = true;
};
datablock ShapeBaseImageData(RPGImage)
{
className = WeaponImage;
shapeFile = "weapon_grenade_launcher.dts";
item = RPG;
ammo = RPGAmmo;
offset = "0 -1 0";
armThread = lookms;
emap = true;
datablock ShapeBaseImageData(RPGImage) {
className = WeaponImage;
shapeFile = "weapon_grenade_launcher.dts";
item = RPG;
ammo = RPGAmmo;
offset = "0 -1 0";
armThread = lookms;
emap = true;
projectile = RPGMissile;
projectileType = seekerprojectile;
projectileSpread = 1.0 / 1000.0;
//ClipStuff
ClipName = "RPGClip";
ClipPickupName["RPGClip"] = "A Few RPGs";
ShowsClipInHud = 1;
ClipReloadTime = 5;
ClipReturn = 1;
InitialClips = 7;
//
HasChallenges = 1;
ChallengeCt = 9;
Challenge[1] = "RPG Killer\t50\t100\tNone";
Challenge[2] = "RPG Extremist\t100\t150\tNone";
Challenge[3] = "RPG Expert\t250\t250\tNone";
Challenge[4] = "RPG Master\t500\t500\tEnhanced Explosives";
Challenge[5] = "RPG Legend\t1000\t1000\tSpread Neutralizer";
Challenge[6] = "RPG Bronze Commendation\t2500\t10000\tNone";
Challenge[7] = "RPG Silver Commendation\t5000\t25000\tNone";
Challenge[8] = "RPG Gold Commendation\t10000\t50000\tNone";
Challenge[9] = "RPG Titan Commendation\t25000\t75000\tNone";
Upgrade[1] = "RPG Explosives";
Upgrade[2] = "Spread Neutralizer";
GunName = "RPG-7";
RankRequire = $TWM2::RankRequire["RPG7"];
projectile = RPGMissile;
projectileType = seekerprojectile;
projectileSpread = 1.0 / 1000.0;
stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "ActivateReady";
stateTimeoutValue[0] = 2.0;
stateSequence[0] = "Activate";
stateSound[0] = MissileSwitchSound;
//ClipStuff
ClipName = "RPGClip";
ClipPickupName["RPGClip"] = "A Few RPGs";
ShowsClipInHud = 1;
ClipReloadTime = 5;
ClipReturn = 1;
InitialClips = 7;
//
HasChallenges = 1;
ChallengeCt = 9;
Challenge[1] = "RPG Killer\t50\t100\tNone";
Challenge[2] = "RPG Extremist\t100\t150\tNone";
Challenge[3] = "RPG Expert\t250\t250\tNone";
Challenge[4] = "RPG Master\t500\t500\tEnhanced Explosives";
Challenge[5] = "RPG Legend\t1000\t1000\tSpread Neutralizer";
Challenge[6] = "RPG Bronze Commendation\t2500\t10000\tNone";
Challenge[7] = "RPG Silver Commendation\t5000\t25000\tNone";
Challenge[8] = "RPG Gold Commendation\t10000\t50000\tNone";
Challenge[9] = "RPG Titan Commendation\t25000\t75000\tNone";
Upgrade[1] = "RPG Explosives";
Upgrade[2] = "Spread Neutralizer";
GunName = "RPG-7";
stateName[1] = "ActivateReady";
stateTransitionOnLoaded[1] = "Ready";
stateTransitionOnNoAmmo[1] = "NoAmmo";
RankRequire = $TWM2::RankRequire["RPG7"];
stateName[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTransitionOnTriggerDown[2] = "CheckWet";
stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "ActivateReady";
stateTimeoutValue[0] = 2.0;
stateSequence[0] = "Activate";
stateSound[0] = MissileSwitchSound;
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[1] = "ActivateReady";
stateTransitionOnLoaded[1] = "Ready";
stateTransitionOnNoAmmo[1] = "NoAmmo";
stateName[4] = "Reload";
stateTransitionOnNoAmmo[4] = "NoAmmo";
stateTransitionOnTimeout[4] = "Ready";
stateTimeoutValue[4] = 0.1;
stateAllowImageChange[4] = false;
stateSequence[4] = "Reload";
stateSound[4] = MissileReloadSound;
stateName[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTransitionOnTriggerDown[2] = "CheckWet";
stateName[5] = "NoAmmo";
stateTransitionOnAmmo[5] = "Reload";
stateSequence[5] = "NoAmmo";
stateTransitionOnTriggerDown[5] = "DryFire";
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[6] = "DryFire";
stateSound[6] = MissileDryFireSound;
stateTimeoutValue[6] = 1.0;
stateTransitionOnTimeout[6] = "ActivateReady";
stateName[4] = "Reload";
stateTransitionOnNoAmmo[4] = "NoAmmo";
stateTransitionOnTimeout[4] = "Ready";
stateTimeoutValue[4] = 0.1;
stateAllowImageChange[4] = false;
stateSequence[4] = "Reload";
stateSound[4] = MissileReloadSound;
stateName[7] = "CheckTarget";
stateTransitionOnNoTarget[7] = "Fire";
stateTransitionOnTarget[7] = "Fire";
stateName[5] = "NoAmmo";
stateTransitionOnAmmo[5] = "Reload";
stateSequence[5] = "NoAmmo";
stateTransitionOnTriggerDown[5] = "DryFire";
stateName[8] = "CheckWet";
stateTransitionOnWet[8] = "DryFire";
stateTransitionOnNotWet[8] = "CheckTarget";
stateName[6] = "DryFire";
stateSound[6] = MissileDryFireSound;
stateTimeoutValue[6] = 1.0;
stateTransitionOnTimeout[6] = "ActivateReady";
stateName[9] = "WetFire";
stateTransitionOnNoAmmo[9] = "NoAmmo";
stateTransitionOnTimeout[9] = "Reload";
stateTimeoutValue[9] = 0.4;
stateScript[9] = "onWetFire";
stateAllowImageChange[9] = false;
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 RPGImage::OnFire(%data, %obj, %slot) {
// if($TWM2::PlayingSabo) { Inv. Ban lifted TWM2 1.8
// MessageClient(%thrower.client, 'MsgC4IsBanned', "\c5RPGs are banned in this game mode");
// return;
// }
%p = Parent::OnFire(%data, %obj, %slot);
if(!%obj.client.UpgradeOn("Spread Neutralizer", %data.getName())) {
schedule(500, 0, "RPGRandomMovement", %p);
}
if(%obj.client.UpgradeOn("Enhanced Explosives", %data.getName())) {
%p.damageFactor = 5; //heh
}
%p.ticksleft = 10;
// if($TWM2::PlayingSabo) { Inv. Ban lifted TWM2 1.8
// MessageClient(%thrower.client, 'MsgC4IsBanned', "\c5RPGs are banned in this game mode");
// return;
// }
%p = Parent::OnFire(%data, %obj, %slot);
if(!%obj.client.UpgradeOn("Spread Neutralizer", %data.getName())) {
schedule(500, 0, "RPGRandomMovement", %p);
}
if(%obj.client.UpgradeOn("Enhanced Explosives", %data.getName())) {
%p.damageFactor = 5; //heh
}
%p.ticksleft = 10;
}
function RPGRandomMovement(%p) {
if(!isObject(%p)) {
return;
}
%fw = %p.initialDirection; //current direction
%x = (getRandom() - 0.5) * 2 * 3.1415926 * (25/1000);
%y = (getRandom() - 0.5) * 2 * 3.1415926 * (25/1000);
%z = (getRandom() - 0.5) * 2 * 3.1415926 * (10/1000);
%mat = MatrixCreateFromEuler(%x @ " " @ %y @ " " @ %z);
%newvector = MatrixMulVector(%mat, %fw);
//now lets use basic torque operations to spawn a new RPG missile going the new direction
%pnew = new (SeekerProjectile)() {
dataBlock = RPGMissile;
initialDirection = %newvector;
initialPosition = %p.getPosition();
damageFactor = %p.damageFactor;
//sourceObject = %p.sourceObject; // <-- done below to prevent spawning suicidal missiles
};
MissionCleanup.add(%pnew);
%pnew.sourceObject = %p.sourceObject;
%pnew.WeaponImageSource = %p.WeaponImageSource;
%pnew.ticksleft = %p.ticksleft - 1;
%pnew.ImageSource = "RPGImage";
//echo(%pnew.ticksleft);
if(%pnew.ticksleft <= 0) { //time up!
%pnew.getDatablock().onExplode(%pnew, %pnew.getPosition(), 1);
%p.delete();
%pnew.delete();
//echo("end");
return;
}
else {
%p.delete();
schedule(500, 0, "RPGRandomMovement", %pnew);
}
if(!isObject(%p)) {
return;
}
if(%p.ticksleft <= 0) { //time up!
%p.getDatablock().onExplode(%p, %p.getPosition(), 1);
%p.delete();
return;
}
%fw = %p.initialDirection; //current direction
%x = (getRandom() - 0.5) * 2 * 3.1415926 * (25/1000);
%y = (getRandom() - 0.5) * 2 * 3.1415926 * (25/1000);
%z = (getRandom() - 0.5) * 2 * 3.1415926 * (10/1000);
%mat = MatrixCreateFromEuler(%x @ " " @ %y @ " " @ %z);
%newvector = MatrixMulVector(%mat, %fw);
//now lets use basic torque operations to spawn a new RPG missile going the new direction
%pnew = new (SeekerProjectile)() {
dataBlock = RPGMissile;
initialDirection = %newvector;
initialPosition = %p.getPosition();
damageFactor = %p.damageFactor;
//sourceObject = %p.sourceObject; // <-- done below to prevent spawning suicidal missiles
};
MissionCleanup.add(%pnew);
%pnew.sourceObject = %p.sourceObject;
%pnew.WeaponImageSource = %p.WeaponImageSource;
%pnew.ticksleft = %p.ticksleft - 1;
%pnew.ImageSource = "RPGImage";
//echo(%pnew.ticksleft);
%p.delete();
schedule(500, 0, "RPGRandomMovement", %pnew);
}

View file

@ -1,58 +1,58 @@
datablock SeekerProjectileData(StingerMissile) {
casingShapeName = "weapon_missile_casement.dts";
projectileShapeName = "weapon_missile_projectile.dts";
hasDamageRadius = true;
indirectDamage = 1.4; //Requires Lock
damageRadius = 18.0;
radiusDamageType = $DamageType::Missile;
kickBackStrength = 1000;
ImageSource = "StingerImage";
casingShapeName = "weapon_missile_casement.dts";
projectileShapeName = "weapon_missile_projectile.dts";
hasDamageRadius = true;
indirectDamage = 1.4; //Requires Lock
damageRadius = 18.0;
radiusDamageType = $DamageType::Stinger;
kickBackStrength = 1000;
explosion = "SatchelMainExplosion";
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
ImageSource = "StingerImage";
baseEmitter = MissileSmokeEmitter;
delayEmitter = MissileFireEmitter;
puffEmitter = MissilePuffEmitter;
bubbleEmitter = GrenadeBubbleEmitter;
bubbleEmitTime = 1.0;
explosion = "SatchelMainExplosion";
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
exhaustEmitter = MissileLauncherExhaustEmitter;
exhaustTimeMs = 300;
exhaustNodeName = "muzzlePoint1";
baseEmitter = MissileSmokeEmitter;
delayEmitter = MissileFireEmitter;
puffEmitter = MissilePuffEmitter;
bubbleEmitter = GrenadeBubbleEmitter;
bubbleEmitTime = 1.0;
lifetimeMS = 30000;
muzzleVelocity = 10.0;
maxVelocity = 150.0;
turningSpeed = 110.0;
acceleration = 350.0;
exhaustEmitter = MissileLauncherExhaustEmitter;
exhaustTimeMs = 300;
exhaustNodeName = "muzzlePoint1";
proximityRadius = 3;
lifetimeMS = 30000;
muzzleVelocity = 10.0;
maxVelocity = 150.0;
turningSpeed = 110.0;
acceleration = 350.0;
terrainAvoidanceSpeed = 180;
terrainScanAhead = 25;
terrainHeightFail = 12;
terrainAvoidanceRadius = 100;
proximityRadius = 3;
flareDistance = 200;
flareAngle = 30;
terrainAvoidanceSpeed = 180;
terrainScanAhead = 25;
terrainHeightFail = 12;
terrainAvoidanceRadius = 100;
sound = MissileProjectileSound;
flareDistance = 200;
flareAngle = 30;
hasLight = true;
lightRadius = 5.0;
lightColor = "0.2 0.05 0";
sound = MissileProjectileSound;
useFlechette = true;
flechetteDelayMs = 550;
casingDeb = FlechetteDebris;
hasLight = true;
lightRadius = 5.0;
lightColor = "0.2 0.05 0";
explodeOnWaterImpact = false;
useFlechette = true;
flechetteDelayMs = 550;
casingDeb = FlechetteDebris;
explodeOnWaterImpact = false;
};
@ -61,170 +61,165 @@ datablock SeekerProjectileData(StingerMissile) {
// Ammo
//--------------------------------------
datablock ItemData(StingerAmmo)
{
className = Ammo;
catagory = "Ammo";
shapeFile = "ammo_missile.dts";
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
datablock ItemData(StingerAmmo) {
className = Ammo;
catagory = "Ammo";
shapeFile = "ammo_missile.dts";
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "some Stinger rockets";
computeCRC = true;
computeCRC = true;
};
//--------------------------------------------------------------------------
// Weapon
//--------------------------------------
datablock ItemData(Stinger)
{
className = Weapon;
catagory = "Spawn Items";
shapeFile = "weapon_mortar.dts";
image = StingerImage;
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
datablock ItemData(Stinger) {
className = Weapon;
catagory = "Spawn Items";
shapeFile = "weapon_mortar.dts";
image = StingerImage;
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "a Stinger launcher";
computeCRC = true;
emap = true;
computeCRC = true;
emap = true;
};
datablock ShapeBaseImageData(StingerImage) {
className = WeaponImage;
shapeFile = "weapon_grenade_launcher.dts";
item = Stinger;
ammo = StingerAmmo;
offset = "0 0 0";
armThread = lookms;
emap = true;
className = WeaponImage;
shapeFile = "weapon_grenade_launcher.dts";
item = Stinger;
ammo = StingerAmmo;
offset = "0 0 0";
armThread = lookms;
emap = true;
projectile = StingerMissile;
projectileType = SeekerProjectile;
projectile = StingerMissile;
projectileType = SeekerProjectile;
isSeeker = true;
seekRadius = 700;
maxSeekAngle = 8;
seekTime = 0.5;
minSeekHeat = 0.01; // the heat that must be present on a target to lock it.
//ClipStuff
ClipName = "StingerClip";
ClipPickupName["StingerClip"] = "A Few Stinger Missiles";
ShowsClipInHud = 1;
ClipReloadTime = 4;
ClipReturn = 1;
InitialClips = 4;
//
HasChallenges = 1;
ChallengeCt = 7;
Challenge[1] = "Stinger Hunter\t100\t500\tNone";
Challenge[2] = "Stinger Expert\t250\t1000\tNone";
Challenge[3] = "Stinger Mastery\t500\t2500\tNone";
Challenge[4] = "Stinger Bronze Commendation\t1000\t10000\tNone";
Challenge[5] = "Stinger Silver Commendation\t2500\t25000\tNone";
Challenge[6] = "Stinger Gold Commendation\t5000\t50000\tNone";
Challenge[7] = "Stinger Titan Commendation\t10000\t75000\tNone";
GunName = "Stinger";
isSeeker = true;
seekRadius = 700;
maxSeekAngle = 8;
seekTime = 0.5;
minSeekHeat = 0.01; // the heat that must be present on a target to lock it.
RankRequire = $TWM2::RankRequire["Stinger"];
//ClipStuff
ClipName = "StingerClip";
ClipPickupName["StingerClip"] = "A Few Stinger Missiles";
ShowsClipInHud = 1;
ClipReloadTime = 4;
ClipReturn = 1;
InitialClips = 4;
//
HasChallenges = 1;
ChallengeCt = 7;
Challenge[1] = "Stinger Hunter\t100\t500\tNone";
Challenge[2] = "Stinger Expert\t250\t1000\tNone";
Challenge[3] = "Stinger Mastery\t500\t2500\tNone";
Challenge[4] = "Stinger Bronze Commendation\t1000\t10000\tNone";
Challenge[5] = "Stinger Silver Commendation\t2500\t25000\tNone";
Challenge[6] = "Stinger Gold Commendation\t5000\t50000\tNone";
Challenge[7] = "Stinger Titan Commendation\t10000\t75000\tNone";
GunName = "Stinger";
// only target objects outside this range
minTargetingDistance = 80;
RankRequire = $TWM2::RankRequire["Stinger"];
stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "ActivateReady";
stateTimeoutValue[0] = 0.5;
stateSequence[0] = "Activate";
stateSound[0] = MissileSwitchSound;
// only target objects outside this range
minTargetingDistance = 80;
stateName[1] = "ActivateReady";
stateTransitionOnLoaded[1] = "Ready";
stateTransitionOnNoAmmo[1] = "NoAmmo";
stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "ActivateReady";
stateTimeoutValue[0] = 0.5;
stateSequence[0] = "Activate";
stateSound[0] = MissileSwitchSound;
stateName[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTransitionOnTriggerDown[2] = "CheckWet";
stateName[1] = "ActivateReady";
stateTransitionOnLoaded[1] = "Ready";
stateTransitionOnNoAmmo[1] = "NoAmmo";
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[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTransitionOnTriggerDown[2] = "CheckWet";
stateName[4] = "Reload";
stateTransitionOnNoAmmo[4] = "NoAmmo";
stateTransitionOnTimeout[4] = "Ready";
stateTimeoutValue[4] = 2.5;
stateAllowImageChange[4] = false;
stateSequence[4] = "Reload";
stateSound[4] = MissileReloadSound;
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[5] = "NoAmmo";
stateTransitionOnAmmo[5] = "Reload";
stateSequence[5] = "NoAmmo";
stateTransitionOnTriggerDown[5] = "DryFire";
stateName[4] = "Reload";
stateTransitionOnNoAmmo[4] = "NoAmmo";
stateTransitionOnTimeout[4] = "Ready";
stateTimeoutValue[4] = 2.5;
stateAllowImageChange[4] = false;
stateSequence[4] = "Reload";
stateSound[4] = MissileReloadSound;
stateName[6] = "DryFire";
stateSound[6] = MissileDryFireSound;
stateTimeoutValue[6] = 1.0;
stateTransitionOnTimeout[6] = "ActivateReady";
stateName[5] = "NoAmmo";
stateTransitionOnAmmo[5] = "Reload";
stateSequence[5] = "NoAmmo";
stateTransitionOnTriggerDown[5] = "DryFire";
stateName[7] = "CheckTarget";
stateTransitionOnNoTarget[7] = "DryFire";
stateTransitionOnTarget[7] = "Fire";
stateName[6] = "DryFire";
stateSound[6] = MissileDryFireSound;
stateTimeoutValue[6] = 1.0;
stateTransitionOnTimeout[6] = "ActivateReady";
stateName[8] = "CheckWet";
stateTransitionOnWet[8] = "WetFire";
stateTransitionOnNotWet[8] = "CheckTarget";
stateName[7] = "CheckTarget";
stateTransitionOnNoTarget[7] = "DryFire";
stateTransitionOnTarget[7] = "Fire";
stateName[9] = "WetFire";
stateTransitionOnNoAmmo[9] = "NoAmmo";
stateTransitionOnTimeout[9] = "Reload";
stateSound[9] = MissileFireSound;
stateRecoil[3] = LightRecoil;
stateTimeoutValue[9] = 0.4;
stateScript[9] = "onWetFire";
stateAllowImageChange[9] = false;
stateName[8] = "CheckWet";
stateTransitionOnWet[8] = "WetFire";
stateTransitionOnNotWet[8] = "CheckTarget";
stateName[9] = "WetFire";
stateTransitionOnNoAmmo[9] = "NoAmmo";
stateTransitionOnTimeout[9] = "Reload";
stateSound[9] = MissileFireSound;
stateRecoil[3] = LightRecoil;
stateTimeoutValue[9] = 0.4;
stateScript[9] = "onWetFire";
stateAllowImageChange[9] = false;
};
function StingerImage::onFire(%data,%obj,%slot) {
%obj.decInventory(%data.ammo,1);
if(%obj.inv[%data.ammo] == 0) { //Added Phantom139, TWM2
AttemptReload(%data, %obj, %slot);
}
function StingerImage::onFire(%data, %obj, %slot) {
if(%obj.inv[%data.ammo] == 0) { //Added Phantom139, TWM2
AttemptReload(%data, %obj, %slot);
}
%target = %obj.getLockedTarget();
//requires lock
if(%target) {
%p = new (SeekerProjectile)() {
dataBlock = StingerMissile;
initialDirection = "0 0 10";
initialPosition = %obj.getPosition();
damageFactor = 1;
sourceObject = %obj;
};
%p.WeaponImageSource = %data.getName();
%target = %obj.getLockedTarget();
//requires lock
if(%target) {
%p = new (SeekerProjectile)() {
dataBlock = StingerMissile;
initialDirection = "0 0 10";
initialPosition = %obj.getPosition();
damageFactor = 1;
sourceObject = %obj;
};
%p.WeaponImageSource = %data.getName();
MissileSet.add(%p);
MissileSet.add(%p);
%p.schedule(500, "setObjectTarget", %target);
schedule(501, 0, "SetMissileTargeted", %target, %p);
}
else if(%obj.isLocked()) {
return;
}
else {
return;
}
%p.schedule(500, "setObjectTarget", %target);
schedule(501, 0, "SetMissileTargeted", %target, %p);
%obj.decInventory(%data.ammo,1);
}
else if(%obj.isLocked()) {
return;
}
}

View file

@ -1,54 +1,49 @@
datablock ItemData(StaticGrenadeThrown)
{
datablock ItemData(StaticGrenadeThrown) {
className = Weapon;
shapeFile = "ammo_plasma.dts";
mass = 0.4;
elasticity = 0.2;
friction = 1;
pickupRadius = 2;
maxDamage = 0.5;
friction = 1;
pickupRadius = 2;
maxDamage = 0.5;
explosion = PlasmaBarrelBoltExplosion;
underwaterExplosion = PlasmaBarrelBoltExplosion;
indirectDamage = 0.4;
damageRadius = 10.0;
radiusDamageType = $DamageType::Grenade;
kickBackStrength = 2000;
computeCRC = true;
indirectDamage = 0.4;
damageRadius = 10.0;
radiusDamageType = $DamageType::StaticGrenade;
kickBackStrength = 2000;
computeCRC = true;
};
datablock ItemData(StaticGrenade)
{
datablock ItemData(StaticGrenade) {
className = HandInventory;
catagory = "Handheld";
shapeFile = "ammo_plasma.dts";
mass = 0.4;
elasticity = 0.2;
friction = 1;
pickupRadius = 2;
thrownItem = StaticGrenadeThrown;
friction = 1;
pickupRadius = 2;
thrownItem = StaticGrenadeThrown;
pickUpName = "some static grenades";
isGrenade = true;
computeCRC = true;
computeCRC = true;
};
function StaticGrenadeThrown::onThrow(%this, %gren) {
AIGrenadeThrown(%gren);
%gren.detThread = schedule(3000, %gren, "detonateGrenade", %gren);
AIGrenadeThrown(%gren);
%gren.detThread = schedule(3000, %gren, "detonateGrenade", %gren);
}
function StaticGrenadeThrown::onCollision(%data, %obj, %col) {
%cn = %col.getDatablock().getClassName();
if(%cn $= "PlayerData" || strstr(%cn, "Vehicle") != -1) {
//BOOM!
detonateGrenade(%obj);
//Die now...
if(!%col.isBoss && !%col.isGOF) {
RadiusExplosion( %obj, %obj.getPosition(), 1, 100, 1000,
%obj.sourceObject, $DamageType::Grenade);
}
}
%cn = %col.getDatablock().getClassName();
if(%cn $= "PlayerData" || strstr(%cn, "Vehicle") != -1) {
//BOOM!
detonateGrenade(%obj);
//Die now...
if(!%col.isBoss && !%col.isGOF) {
RadiusExplosion( %obj, %obj.getPosition(), 1, 100, 1000, %obj.sourceObject, $DamageType::StaticGrenade);
}
}
}

View file

@ -1,229 +1,226 @@
datablock TracerProjectileData(MG42Bullet) {
doDynamicClientHits = true;
doDynamicClientHits = true;
directDamage = 0.063;
directDamageType = $DamageType::MG42;
explosion = "ChaingunExplosion";
splash = ChaingunSplash;
HeadMultiplier = 1.5;
LegsMultiplier = 0.5;
ImageSource = "MG42Image";
directDamage = 0.063;
directDamageType = $DamageType::MG42;
explosion = "ChaingunExplosion";
splash = ChaingunSplash;
HeadMultiplier = 1.5;
LegsMultiplier = 0.5;
kickBackStrength = 50.0;
sound = ChaingunProjectile;
ImageSource = "MG42Image";
dryVelocity = 3000.0;
wetVelocity = 1000.0;
velInheritFactor = 1.0;
fizzleTimeMS = 3000;
lifetimeMS = 3000;
explodeOnDeath = false;
reflectOnWaterImpactAngle = 0.0;
explodeOnWaterImpact = false;
deflectionOnWaterImpact = 0.0;
fizzleUnderwaterMS = 3000;
kickBackStrength = 50.0;
sound = ChaingunProjectile;
tracerLength = 40.0;
tracerAlpha = false;
tracerMinPixels = 6;
tracerColor = 10.0/255.0 @ " " @ 30.0/255.0 @ " " @ 240.0/255.0 @ " 0.75";
dryVelocity = 3000.0;
wetVelocity = 1000.0;
velInheritFactor = 1.0;
fizzleTimeMS = 3000;
lifetimeMS = 3000;
explodeOnDeath = false;
reflectOnWaterImpactAngle = 0.0;
explodeOnWaterImpact = false;
deflectionOnWaterImpact = 0.0;
fizzleUnderwaterMS = 3000;
tracerLength = 40.0;
tracerAlpha = false;
tracerMinPixels = 6;
tracerColor = 10.0/255.0 @ " " @ 30.0/255.0 @ " " @ 240.0/255.0 @ " 0.75";
tracerTex[0] = "special/tracer00";
tracerTex[1] = "special/tracercross";
tracerWidth = 0.2;
crossSize = 0.20;
crossViewAng = 0.990;
renderCross = true;
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;
decalData[0] = ChaingunDecal1;
decalData[1] = ChaingunDecal2;
decalData[2] = ChaingunDecal3;
decalData[3] = ChaingunDecal4;
decalData[4] = ChaingunDecal5;
decalData[5] = ChaingunDecal6;
};
//--------------------------------------------------------------------------
// Ammo
//--------------------------------------
datablock ItemData(MG42Ammo) {
className = Ammo;
catagory = "Ammo";
shapeFile = "ammo_chaingun.dts";
mass = 3;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "some PCT ammo";
computeCRC = true;
className = Ammo;
catagory = "Ammo";
shapeFile = "ammo_chaingun.dts";
mass = 3;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "some mg42 rounds";
computeCRC = true;
};
//--------------------------------------------------------------------------
// Weapon
//--------------------------------------
datablock ShapeBaseImageData(MG42Image) {
className = WeaponImage;
shapeFile = "weapon_sniper.dts";
item = MG42;
ammo = MG42Ammo;
projectile = MG42Bullet;
projectileType = TracerProjectile;
emap = true;
mass = 26;
className = WeaponImage;
shapeFile = "weapon_sniper.dts";
item = MG42;
ammo = MG42Ammo;
projectile = MG42Bullet;
projectileType = TracerProjectile;
emap = true;
mass = 26;
offset = "0.08 0.22 0.15"; // L/R - F/B - T/B
offset = "0.08 0.22 0.15"; // L/R - F/B - T/B
casing = ShellDebris;
shellExitDir = "0.5 0 1";
shellExitOffset = "0.0 0.75 0.0";
shellExitVariance = 5.0;
shellVelocity = 4.5;
//ClipStuff
ClipName = "MG42Clip";
ClipPickupName["MG42Clip"] = "Some MG42 Clip Boxes";
ShowsClipInHud = 1;
ClipReloadTime = 7;
ClipReturn = 200;
InitialClips = 4;
//
//Challenges
HasChallenges = 1;
ChallengeCt = 8;
Challenge[1] = "MG42 Hunter\t100\t250\tNone";
Challenge[2] = "MG42 Expert\t250\t500\tGrip";
Challenge[3] = "MG42 Master\t750\t1000\tNone";
Challenge[4] = "MG42 God\t1500\t2000\tSilencer";
Challenge[5] = "MG42 Bronze Commendation\t3000\t10000\tNone";
Challenge[6] = "MG42 Silver Commendation\t6000\t25000\tNone";
Challenge[7] = "MG42 Gold Commendation\t12500\t50000\tNone";
Challenge[8] = "MG42 Titan Commendation\t35000\t75000\tNone";
Upgrade[1] = "Grip";
Upgrade[2] = "Silencer";
GunName = "MG42 Machine Gun";
//
casing = ShellDebris;
shellExitDir = "0.5 0 1";
shellExitOffset = "0.0 0.75 0.0";
shellExitVariance = 5.0;
shellVelocity = 4.5;
RankRequire = $TWM2::RankRequire["MG42"];
projectileSpread = 12.5 / 1000.0;
//ClipStuff
ClipName = "MG42Clip";
ClipPickupName["MG42Clip"] = "Some MG42 Clip Boxes";
ShowsClipInHud = 1;
ClipReloadTime = 7;
ClipReturn = 200;
InitialClips = 4;
//
//Challenges
HasChallenges = 1;
ChallengeCt = 8;
Challenge[1] = "MG42 Hunter\t100\t250\tNone";
Challenge[2] = "MG42 Expert\t250\t500\tGrip";
Challenge[3] = "MG42 Master\t750\t1000\tNone";
Challenge[4] = "MG42 God\t1500\t2000\tSilencer";
Challenge[5] = "MG42 Bronze Commendation\t3000\t10000\tNone";
Challenge[6] = "MG42 Silver Commendation\t6000\t25000\tNone";
Challenge[7] = "MG42 Gold Commendation\t12500\t50000\tNone";
Challenge[8] = "MG42 Titan Commendation\t35000\t75000\tNone";
Upgrade[1] = "Grip";
Upgrade[2] = "Silencer";
GunName = "MG42 Machine Gun";
//
//--------------------------------------
stateName[0] = "Activate";
stateSequence[0] = "Activate";
stateSound[0] = ChaingunSwitchSound;
stateAllowImageChange[0] = false;
//
stateTimeoutValue[0] = 0.5;
stateTransitionOnTimeout[0] = "Ready";
stateTransitionOnNoAmmo[0] = "NoAmmo";
RankRequire = $TWM2::RankRequire["MG42"];
//--------------------------------------
stateName[1] = "Ready";
stateSpinThread[1] = Stop;
//
stateTransitionOnTriggerDown[1] = "Spinup";
stateTransitionOnNoAmmo[1] = "NoAmmo";
projectileSpread = 12.5 / 1000.0;
//--------------------------------------
stateName[2] = "NoAmmo";
stateTransitionOnAmmo[2] = "Ready";
stateSpinThread[2] = Stop;
stateTransitionOnTriggerDown[2] = "DryFire";
//--------------------------------------
stateName[0] = "Activate";
stateSequence[0] = "Activate";
stateSound[0] = ChaingunSwitchSound;
stateAllowImageChange[0] = false;
//
stateTimeoutValue[0] = 0.5;
stateTransitionOnTimeout[0] = "Ready";
stateTransitionOnNoAmmo[0] = "NoAmmo";
//--------------------------------------
stateName[3] = "Spinup";
stateSpinThread[3] = SpinUp;
stateSound[3] = ChaingunSpinupSound;
//
stateTimeoutValue[3] = 0.1;
stateWaitForTimeout[3] = false;
stateTransitionOnTimeout[3] = "Fire";
stateTransitionOnTriggerUp[3] = "Spindown";
//--------------------------------------
stateName[1] = "Ready";
stateSpinThread[1] = Stop;
//
stateTransitionOnTriggerDown[1] = "Spinup";
stateTransitionOnNoAmmo[1] = "NoAmmo";
//--------------------------------------
stateName[4] = "Fire";
stateSequence[4] = "Fire";
stateSequenceRandomFlash[4] = true;
stateSpinThread[4] = FullSpeed;
//stateSound[4] = ChaingunFireSound;
stateAllowImageChange[4] = false;
stateScript[4] = "onFire";
stateFire[4] = true;
stateEjectShell[4] = true;
stateTimeoutValue[4] = 0.02;
stateTransitionOnTimeout[4] = "Fire";
stateTransitionOnTriggerUp[4] = "Spindown";
stateTransitionOnNoAmmo[4] = "EmptySpindown";
//--------------------------------------
stateName[2] = "NoAmmo";
stateTransitionOnAmmo[2] = "Ready";
stateSpinThread[2] = Stop;
stateTransitionOnTriggerDown[2] = "DryFire";
//--------------------------------------
stateName[5] = "Spindown";
stateSound[5] = ChaingunSpinDownSound;
stateSpinThread[5] = SpinDown;
//
stateTimeoutValue[5] = 0.1;
stateWaitForTimeout[5] = true;
stateTransitionOnTimeout[5] = "Ready";
stateTransitionOnTriggerDown[5] = "Spinup";
//--------------------------------------
stateName[3] = "Spinup";
stateSpinThread[3] = SpinUp;
stateSound[3] = ChaingunSpinupSound;
//
stateTimeoutValue[3] = 0.1;
stateWaitForTimeout[3] = false;
stateTransitionOnTimeout[3] = "Fire";
stateTransitionOnTriggerUp[3] = "Spindown";
//--------------------------------------
stateName[6] = "EmptySpindown";
stateSound[6] = ChaingunSpinDownSound;
stateSpinThread[6] = SpinDown;
//
stateTimeoutValue[6] = 1.0;
stateTransitionOnTimeout[6] = "NoAmmo";
//--------------------------------------
stateName[4] = "Fire";
stateSequence[4] = "Fire";
stateSequenceRandomFlash[4] = true;
stateSpinThread[4] = FullSpeed;
//stateSound[4] = ChaingunFireSound;
stateAllowImageChange[4] = false;
stateScript[4] = "onFire";
stateFire[4] = true;
stateEjectShell[4] = true;
stateTimeoutValue[4] = 0.02;
stateTransitionOnTimeout[4] = "Fire";
stateTransitionOnTriggerUp[4] = "Spindown";
stateTransitionOnNoAmmo[4] = "EmptySpindown";
//--------------------------------------
stateName[7] = "DryFire";
stateSound[7] = ChaingunDryFireSound;
stateTimeoutValue[7] = 0.5;
stateTransitionOnTimeout[7] = "NoAmmo";
//--------------------------------------
stateName[5] = "Spindown";
stateSound[5] = ChaingunSpinDownSound;
stateSpinThread[5] = SpinDown;
//
stateTimeoutValue[5] = 0.1;
stateWaitForTimeout[5] = true;
stateTransitionOnTimeout[5] = "Ready";
stateTransitionOnTriggerDown[5] = "Spinup";
//--------------------------------------
stateName[6] = "EmptySpindown";
stateSound[6] = ChaingunSpinDownSound;
stateSpinThread[6] = SpinDown;
//
stateTimeoutValue[6] = 1.0;
stateTransitionOnTimeout[6] = "NoAmmo";
//--------------------------------------
stateName[7] = "DryFire";
stateSound[7] = ChaingunDryFireSound;
stateTimeoutValue[7] = 0.5;
stateTransitionOnTimeout[7] = "NoAmmo";
};
datablock ItemData(MG42) {
className = Weapon;
catagory = "Spawn Items";
shapeFile = "turret_tank_barrelchain.dts";
image = MG42Image;
mass = 1.0;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "a Portible Chaingun Turret";
className = Weapon;
catagory = "Spawn Items";
shapeFile = "turret_tank_barrelchain.dts";
image = MG42Image;
mass = 1.0;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "a MG42 machine gun";
computeCRC = true;
emap = true;
computeCRC = true;
emap = true;
};
datablock ShapeBaseImageData(MG42Image1) : MG42Image {
className = WeaponImage;
className = WeaponImage;
shapeFile = "weapon_missile.dts";
rotation = "0 0 1 180";
offset = "0.01 0.04 0.0"; // L/R - F/B - T/B
shapeFile = "weapon_missile.dts";
rotation = "0 0 1 180";
offset = "0.01 0.04 0.0"; // L/R - F/B - T/B
};
function MG42Image::onMount(%this,%obj,%slot) {
Parent::onMount(%this, %obj, %slot);
%obj.mountImage(MG42Image1, 3);
Parent::onMount(%this, %obj, %slot);
%obj.mountImage(MG42Image1, 3);
}
function MG42Image::onUnmount(%this,%obj,%slot) {
Parent::onUnmount(%this, %obj, %slot);
%obj.unmountImage(3);
Parent::onUnmount(%this, %obj, %slot);
%obj.unmountImage(3);
}
function MG42Image::onFire(%data, %obj, %slot) {
%p = Parent::onFire(%data, %obj, %slot);
if(%obj.client.UpgradeOn("Silencer", %data.getName())) {
//zero sound :p
}
else {
ServerPlay3d(ChaingunFireSound, %obj.getPosition());
}
}
%p = Parent::onFire(%data, %obj, %slot);
if(%obj.client.UpgradeOn("Silencer", %data.getName())) {
//zero sound :p
}
else {
ServerPlay3d(ChaingunFireSound, %obj.getPosition());
}
}

View file

@ -1,204 +1,202 @@
datablock TracerProjectileData(MRXXBullet) {
doDynamicClientHits = true;
doDynamicClientHits = true;
directDamage = 0.043;
directDamageType = $DamageType::MRXX;
explosion = "ChaingunExplosion";
splash = ChaingunSplash;
HeadMultiplier = 1.25;
LegsMultiplier = 0.75;
ImageSource = "MRXXImage";
directDamage = 0.043;
directDamageType = $DamageType::MRXX;
explosion = "ChaingunExplosion";
splash = ChaingunSplash;
HeadMultiplier = 1.25;
LegsMultiplier = 0.75;
kickBackStrength = 15.0;
sound = ChaingunProjectile;
ImageSource = "MRXXImage";
dryVelocity = 1750.0;
wetVelocity = 1500.0;
velInheritFactor = 0.0;
fizzleTimeMS = 3000;
lifetimeMS = 3000;
explodeOnDeath = false;
reflectOnWaterImpactAngle = 0.0;
explodeOnWaterImpact = false;
deflectionOnWaterImpact = 0.0;
fizzleUnderwaterMS = 3000;
kickBackStrength = 15.0;
sound = ChaingunProjectile;
tracerLength = 9.0;
tracerAlpha = false;
tracerMinPixels = 6;
tracerColor = 211.0/255.0 @ " " @ 215.0/255.0 @ " " @ 120.0/255.0 @ " 0.75";
dryVelocity = 1750.0;
wetVelocity = 1500.0;
velInheritFactor = 0.0;
fizzleTimeMS = 3000;
lifetimeMS = 3000;
explodeOnDeath = false;
reflectOnWaterImpactAngle = 0.0;
explodeOnWaterImpact = false;
deflectionOnWaterImpact = 0.0;
fizzleUnderwaterMS = 3000;
tracerLength = 9.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;
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;
decalData[0] = ChaingunDecal1;
decalData[1] = ChaingunDecal2;
decalData[2] = ChaingunDecal3;
decalData[3] = ChaingunDecal4;
decalData[4] = ChaingunDecal5;
decalData[5] = ChaingunDecal6;
};
datablock ItemData(MRXXAmmo)
{
className = Ammo;
catagory = "Ammo";
shapeFile = "ammo_chaingun.dts";
mass = 3;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
datablock ItemData(MRXXAmmo) {
className = Ammo;
catagory = "Ammo";
shapeFile = "ammo_chaingun.dts";
mass = 3;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "some MRXX ammo";
computeCRC = true;
computeCRC = true;
};
//--------------------------------------------------------------------------
// Weapon
//--------------------------------------
datablock ShapeBaseImageData(MRXXImage) {
className = WeaponImage;
shapeFile = "weapon_mortar.dts";
item = MRXX;
ammo = MRXXAmmo;
projectile = MRXXBullet;
projectileType = TracerProjectile;
emap = true;
mass = 26;
className = WeaponImage;
shapeFile = "weapon_mortar.dts";
item = MRXX;
ammo = MRXXAmmo;
projectile = MRXXBullet;
projectileType = TracerProjectile;
emap = true;
mass = 26;
//ClipStuff
ClipName = "MRXXClip";
ClipPickupName["MRXXClip"] = "some MRXX Clip Boxes";
ShowsClipInHud = 1;
ClipReloadTime = 9;
ClipReturn = 150;
InitialClips = 5;
//
HasChallenges = 1;
ChallengeCt = 8;
Challenge[1] = "MRXX ZC4 Killer\t50\t100\tNone";
Challenge[2] = "MRXX ZC4 Expert\t100\t250\tNone";
Challenge[3] = "MRXX ZC4 Master\t250\t500\tGrip";
Challenge[4] = "MRXX ZC4 God\t500\t1000\tSilencer";
Challenge[5] = "MRXX ZC4 Bronze Commendation\t1500\t10000\tNone";
Challenge[6] = "MRXX ZC4 Silver Commendation\t5000\t25000\tNone";
Challenge[7] = "MRXX ZC4 Gold Commendation\t10000\t50000\tNone";
Challenge[8] = "MRXX ZC4 Titan Commendation\t25000\t75000\tNone";
Upgrade[1] = "Grip";
Upgrade[2] = "Silencer";
GunName = "MRXX ZC4 Machine Gun";
//ClipStuff
ClipName = "MRXXClip";
ClipPickupName["MRXXClip"] = "some MRXX Clip Boxes";
ShowsClipInHud = 1;
ClipReloadTime = 9;
ClipReturn = 150;
InitialClips = 5;
//
HasChallenges = 1;
ChallengeCt = 8;
Challenge[1] = "MRXX ZC4 Killer\t50\t100\tNone";
Challenge[2] = "MRXX ZC4 Expert\t100\t250\tNone";
Challenge[3] = "MRXX ZC4 Master\t250\t500\tGrip";
Challenge[4] = "MRXX ZC4 God\t500\t1000\tSilencer";
Challenge[5] = "MRXX ZC4 Bronze Commendation\t1500\t10000\tNone";
Challenge[6] = "MRXX ZC4 Silver Commendation\t5000\t25000\tNone";
Challenge[7] = "MRXX ZC4 Gold Commendation\t10000\t50000\tNone";
Challenge[8] = "MRXX ZC4 Titan Commendation\t25000\t75000\tNone";
Upgrade[1] = "Grip";
Upgrade[2] = "Silencer";
GunName = "MRXX ZC4 Machine Gun";
RankRequire = $TWM2::RankRequire["MRXX"];
RankRequire = $TWM2::RankRequire["MRXX"];
casing = ShellDebris;
shellExitDir = "0.5 0 1";
shellExitOffset = "0.0 0.75 0.0";
shellExitVariance = 5.0;
shellVelocity = 4.5;
casing = ShellDebris;
shellExitDir = "0.5 0 1";
shellExitOffset = "0.0 0.75 0.0";
shellExitVariance = 5.0;
shellVelocity = 4.5;
projectileSpread = 10.0 / 1000.0;
projectileSpread = 10.0 / 1000.0;
//--------------------------------------
stateName[0] = "Activate";
stateSequence[0] = "Activate";
stateSound[0] = ChaingunSwitchSound;
stateAllowImageChange[0] = false;
//
stateTimeoutValue[0] = 0.5;
stateTransitionOnTimeout[0] = "Ready";
stateTransitionOnNoAmmo[0] = "NoAmmo";
//--------------------------------------
stateName[0] = "Activate";
stateSequence[0] = "Activate";
stateSound[0] = ChaingunSwitchSound;
stateAllowImageChange[0] = false;
//
stateTimeoutValue[0] = 0.5;
stateTransitionOnTimeout[0] = "Ready";
stateTransitionOnNoAmmo[0] = "NoAmmo";
//--------------------------------------
stateName[1] = "Ready";
stateSpinThread[1] = Stop;
//
stateTransitionOnTriggerDown[1] = "Spinup";
stateTransitionOnNoAmmo[1] = "NoAmmo";
//--------------------------------------
stateName[1] = "Ready";
stateSpinThread[1] = Stop;
//
stateTransitionOnTriggerDown[1] = "Spinup";
stateTransitionOnNoAmmo[1] = "NoAmmo";
//--------------------------------------
stateName[2] = "NoAmmo";
stateTransitionOnAmmo[2] = "Ready";
stateSpinThread[2] = Stop;
stateTransitionOnTriggerDown[2] = "DryFire";
//--------------------------------------
stateName[2] = "NoAmmo";
stateTransitionOnAmmo[2] = "Ready";
stateSpinThread[2] = Stop;
stateTransitionOnTriggerDown[2] = "DryFire";
//--------------------------------------
stateName[3] = "Spinup";
stateSpinThread[3] = SpinUp;
stateSound[3] = ChaingunSpinupSound;
//
stateTimeoutValue[3] = 0.1;
stateWaitForTimeout[3] = false;
stateTransitionOnTimeout[3] = "Fire";
stateTransitionOnTriggerUp[3] = "Spindown";
//--------------------------------------
stateName[3] = "Spinup";
stateSpinThread[3] = SpinUp;
stateSound[3] = ChaingunSpinupSound;
//
stateTimeoutValue[3] = 0.1;
stateWaitForTimeout[3] = false;
stateTransitionOnTimeout[3] = "Fire";
stateTransitionOnTriggerUp[3] = "Spindown";
//--------------------------------------
stateName[4] = "Fire";
stateSequence[4] = "Fire";
stateSequenceRandomFlash[4] = true;
stateSpinThread[4] = FullSpeed;
//stateSound[4] = MRXXFireSound;
//--------------------------------------
stateName[4] = "Fire";
stateSequence[4] = "Fire";
stateSequenceRandomFlash[4] = true;
stateSpinThread[4] = FullSpeed;
//stateSound[4] = MRXXFireSound;
stateAllowImageChange[4] = false;
stateScript[4] = "onFire";
stateFire[4] = true;
stateEjectShell[4] = true;
stateTimeoutValue[4] = 0.02;
stateTransitionOnTimeout[4] = "Fire";
stateTransitionOnTriggerUp[4] = "Spindown";
stateTransitionOnNoAmmo[4] = "EmptySpindown";
stateAllowImageChange[4] = false;
stateScript[4] = "onFire";
stateFire[4] = true;
stateEjectShell[4] = true;
stateTimeoutValue[4] = 0.02;
stateTransitionOnTimeout[4] = "Fire";
stateTransitionOnTriggerUp[4] = "Spindown";
stateTransitionOnNoAmmo[4] = "EmptySpindown";
//--------------------------------------
stateName[5] = "Spindown";
stateSound[5] = ChaingunSpinDownSound;
stateSpinThread[5] = SpinDown;
//
stateTimeoutValue[5] = 0.1;
stateWaitForTimeout[5] = true;
stateTransitionOnTimeout[5] = "Ready";
stateTransitionOnTriggerDown[5] = "Spinup";
//--------------------------------------
stateName[5] = "Spindown";
stateSound[5] = ChaingunSpinDownSound;
stateSpinThread[5] = SpinDown;
//
stateTimeoutValue[5] = 0.1;
stateWaitForTimeout[5] = true;
stateTransitionOnTimeout[5] = "Ready";
stateTransitionOnTriggerDown[5] = "Spinup";
//--------------------------------------
stateName[6] = "EmptySpindown";
stateSound[6] = ChaingunSpinDownSound;
stateSpinThread[6] = SpinDown;
//
stateTimeoutValue[6] = 1.0;
stateTransitionOnTimeout[6] = "NoAmmo";
//--------------------------------------
stateName[6] = "EmptySpindown";
stateSound[6] = ChaingunSpinDownSound;
stateSpinThread[6] = SpinDown;
//
stateTimeoutValue[6] = 1.0;
stateTransitionOnTimeout[6] = "NoAmmo";
//--------------------------------------
stateName[7] = "DryFire";
stateSound[7] = ChaingunDryFireSound;
stateTimeoutValue[7] = 0.5;
stateTransitionOnTimeout[7] = "NoAmmo";
//--------------------------------------
stateName[7] = "DryFire";
stateSound[7] = ChaingunDryFireSound;
stateTimeoutValue[7] = 0.5;
stateTransitionOnTimeout[7] = "NoAmmo";
};
datablock ItemData(MRXX) {
className = Weapon;
catagory = "Spawn Items";
shapeFile = "turret_tank_barrelchain.dts";
image = MRXXImage;
mass = 1.0;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "a MRXX ZC4 MG";
className = Weapon;
catagory = "Spawn Items";
shapeFile = "turret_tank_barrelchain.dts";
image = MRXXImage;
mass = 1.0;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "a MRXX ZC4 MG";
computeCRC = true;
emap = true;
computeCRC = true;
emap = true;
};
function MRXXImage::onFire(%data, %obj, %slot) {
%p = Parent::onFire(%data, %obj, %slot);
if(%obj.client.UpgradeOn("Silencer", %data.getName())) {
//zero sound :p
}
else {
ServerPlay3d(ChaingunFireSound, %obj.getPosition());
}
%p = Parent::onFire(%data, %obj, %slot);
if(%obj.client.UpgradeOn("Silencer", %data.getName())) {
//zero sound :p
}
else {
ServerPlay3d(ChaingunFireSound, %obj.getPosition());
}
}

View file

@ -1,304 +1,273 @@
datablock AudioProfile(BOVHitSound) {
filename = "fx/misc/flag_snatch.wav";
description = AudioClose3d;
preload = true;
filename = "fx/misc/flag_snatch.wav";
description = AudioClose3d;
preload = true;
};
datablock ShapeBaseImageData(BOVButt)
{
shapeFile = "weapon_disc.dts";
mountPoint = 1;
datablock ShapeBaseImageData(BOVButt) {
shapeFile = "weapon_disc.dts";
mountPoint = 1;
offset = "0.0 0.8 0.55"; // L/R - F/B - T/B
rotation = "2.0 -2.0 3.0 45"; // L/R - F/B - T/B
offset = "0.0 0.8 0.55"; // L/R - F/B - T/B
rotation = "2.0 -2.0 3.0 45"; // L/R - F/B - T/B
};
datablock ShapeBaseImageData(BoVSwing) {
shapeFile = "weapon_disc.dts";
mountPoint = 1;
offset = "0.0 1.45 -0.4"; // L/R - F/B - T/B
rotation = "0 0 1 180"; // L/R - F/B - T/B
};
function swingbackbov(%obj) {
%obj.unmountImage(6);
%obj.mountImage(BOVButt, 5);
%obj.unmountImage(6);
%obj.mountImage(BOVButt, 5);
}
datablock LinearProjectileData(BOVhit) {
projectileShapeName = "disc.dts";
emitterDelay = -1;
directDamage = 100.0;
radiusDamageType = $DamageType::Admin;
kickBackStrength = 1750;
ImageSource = "BOVImage";
projectileShapeName = "disc.dts";
emitterDelay = -1;
directDamage = 0.9;
radiusDamageType = $DamageType::BladeOfVengance;
kickBackStrength = 1750;
sound = discProjectileSound;
explosion = "ChaingunExplosion";
underwaterExplosion = "ChaingunExplosion";
splash = DiscSplash;
ImageSource = "BOVImage";
dryVelocity = 50;
wetVelocity = 30;
velInheritFactor = 0.5;
fizzleTimeMS = 100;
lifetimeMS = 100;
explodeOnDeath = true;
reflectOnWaterImpactAngle = 15.0;
explodeOnWaterImpact = true;
deflectionOnWaterImpact = 0.0;
fizzleUnderwaterMS = 5000;
sound = discProjectileSound;
explosion = "ChaingunExplosion";
underwaterExplosion = "ChaingunExplosion";
splash = DiscSplash;
activateDelayMS = 200;
dryVelocity = 200;
wetVelocity = 200;
velInheritFactor = 0.5;
fizzleTimeMS = 25;
lifetimeMS = 25;
explodeOnDeath = true;
reflectOnWaterImpactAngle = 15.0;
explodeOnWaterImpact = true;
deflectionOnWaterImpact = 0.0;
fizzleUnderwaterMS = 5000;
hasLight = true;
lightRadius = 6.0;
lightColor = "0.175 0.175 0.5";
activateDelayMS = 200;
hasLight = true;
lightRadius = 6.0;
lightColor = "0.175 0.175 0.5";
};
//--------------------------------------------------------------------------
// Weapon
//--------------------------------------
datablock ShapeBaseImageData(BOVImage)
{
className = WeaponImage;
shapeFile = "turret_muzzlepoint.dts";
item = BOV;
projectile = BOVhit;
projectileType = LinearProjectile;
datablock ShapeBaseImageData(BOVImage) {
className = WeaponImage;
shapeFile = "turret_muzzlepoint.dts";
item = BOV;
projectile = BOVhit;
projectileType = LinearProjectile;
usesEnergy = true;
fireEnergy = 20;
minEnergy = 30;
MedalRequire = 1;
usesEnergy = true;
fireEnergy = 20;
minEnergy = 30;
stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "ActivateReady";
stateTimeoutValue[0] = 1.0;
stateSequence[0] = "Activate";
stateSound[0] = BlasterSwitchSound;
MedalRequire = 1;
stateName[1] = "ActivateReady";
stateTransitionOnLoaded[1] = "Ready";
stateTransitionOnNoAmmo[1] = "NoAmmo";
stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "ActivateReady";
stateTimeoutValue[0] = 1.0;
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.5;
stateFire[3] = true;
stateRecoil[3] = NoRecoil;
stateAllowImageChange[3] = false;
stateSequence[3] = "Fire";
stateScript[3] = "onFire";
stateName[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTransitionOnTriggerDown[2] = "Fire";
stateName[4] = "Reload";
stateTransitionOnNoAmmo[4] = "NoAmmo";
stateTransitionOnTimeout[4] = "Ready";
stateAllowImageChange[4] = false;
stateSequence[4] = "Reload";
stateName[3] = "Fire";
stateTransitionOnTimeout[3] = "Reload";
stateTimeoutValue[3] = 0.5;
stateFire[3] = true;
stateRecoil[3] = NoRecoil;
stateAllowImageChange[3] = false;
stateSequence[3] = "Fire";
stateScript[3] = "onFire";
stateName[5] = "NoAmmo";
stateTransitionOnAmmo[5] = "Reload";
stateSequence[5] = "NoAmmo";
stateTransitionOnTriggerDown[5] = "DryFire";
stateName[4] = "Reload";
stateTransitionOnNoAmmo[4] = "NoAmmo";
stateTransitionOnTimeout[4] = "Ready";
stateAllowImageChange[4] = false;
stateSequence[4] = "Reload";
stateName[6] = "DryFire";
stateTimeoutValue[6] = 1.0;
stateSound[6] = BlasterDryFireSound;
stateTransitionOnTimeout[6] = "Ready";
stateName[5] = "NoAmmo";
stateTransitionOnAmmo[5] = "Reload";
stateSequence[5] = "NoAmmo";
stateTransitionOnTriggerDown[5] = "DryFire";
stateName[6] = "DryFire";
stateTimeoutValue[6] = 1.0;
stateSound[6] = BlasterDryFireSound;
stateTransitionOnTimeout[6] = "Ready";
};
datablock ItemData(BOV)
{
className = Weapon;
catagory = "Spawn Items";
shapeFile = "weapon_disc.dts";
image = BOVImage;
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
datablock ItemData(BOV) {
className = Weapon;
catagory = "Spawn Items";
shapeFile = "weapon_disc.dts";
image = BOVImage;
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "a blade of vengance";
};
function BOVImage::onMount(%data, %obj, %node)
{
%obj.meleeIMG = %obj.mountImage(BOVButt, 5);
function BOVImage::onMount(%data, %obj, %node) {
if(!%obj.client.hasMedal(11) && !%obj.client.isAiControlled()) {
%obj.throwweapon(1);
%obj.throwweapon(0);
messageClient(%obj.client, 'MsgClient', "\c3You must aquire the 'Revenge Avoided Again' Medal to use this.");
return;
}
%obj.meleeIMG = %obj.mountImage(BOVButt, 5);
}
function BOVImage::onUnMount(%data, %obj, %node)
{
%obj.unmountImage(5);
function BOVImage::onUnMount(%data, %obj, %node) {
%obj.unmountImage(5);
}
datablock ShapeBaseImageData(BoVSwing)
{
shapeFile = "weapon_disc.dts";
mountPoint = 1;
offset = "0.0 1.45 -0.4"; // L/R - F/B - T/B
rotation = "0 0 1 180"; // L/R - F/B - T/B
};
function BOVImage::onFire(%data, %obj, %node) {
//dumbass use
//Person without the medal
if(!%obj.client.hasMedal(11) && !%obj.client.isAiControlled()) {
messageClient(%obj.client, 'MsgClient', "\c3You must aquire the 'Revenge Avoided Again' Medal to use this.");
messageall('MsgDummy', "\c0In an effort to use the blade of vengance, "@ %obj.client.namebase@" stabbed himself!");
%obj.scriptKill($DamageType::Admin);
return;
}
if(%obj.cannotuseBOV) { //in the kill anim?
return;
}
//
%obj.unmountImage(5);
%obj.meleeIMG = %obj.mountImage(BoVSwing, 6);
%obj.backswing = schedule(300, 0, "swingbackbov", %obj);
if(!%obj.client.hasMedal(11) && !%obj.client.isAiControlled()) {
messageClient(%obj.client, 'MsgClient', "\c3You must aquire the 'Revenge Avoided Again' Medal to use this.");
return;
}
if(%obj.cannotuseBOV) { //in the kill anim?
return;
}
//
%obj.unmountImage(5);
%obj.meleeIMG = %obj.mountImage(BoVSwing, 6);
%obj.backswing = schedule(300, 0, "swingbackbov", %obj);
if(!%obj.client.IsActivePerk("Blade Sweep")) {
%p = new (LinearProjectile)() {
dataBlock = BOVhit;
initialDirection = %obj.getMuzzleVector(%slot);
initialPosition = %obj.getMuzzlePoint(%slot);
sourceObject = %obj;
sourceSlot = %slot;
};
MissionCleanup.add(%p);
}
else {
for (%i = 0; %i < 7; %i++) {
%x = (getRandom() - 0.5) * 2 * 3.1415926 * (6/1000);
%y = (getRandom() - 0.5) * 2 * 3.1415926 * (6/1000);
%z = 0;
%mat = MatrixCreateFromEuler(%x @ " " @ %y @ " " @ %z);
%newvector = MatrixMulVector(%mat, %vector);
%p = new (LinearProjectile)() {
dataBlock = BOVhit;
initialDirection = %newvector;
initialPosition = %obj.getMuzzlePoint(%slot);
sourceObject = %obj;
damageFactor = 1;
sourceSlot = %slot;
};
%p.WeaponImageSource = %data.getName();
}
}
%p = new (LinearProjectile)() {
dataBlock = BOVhit;
initialDirection = %obj.getMuzzleVector(%slot);
initialPosition = %obj.getMuzzlePoint(%slot);
sourceObject = %obj;
sourceSlot = %slot;
};
MissionCleanup.add(%p);
}
function BOVhit::onCollision(%data, %projectile, %targetObject, %modifier, %position, %normal) {
if(%targetObject.isBoss) {
%targetObject.playShieldEffect("1 1 1");
MessageClient(%projectile.sourceObject.client, 'MsgDeflect', "The Boss Deflects The Swipe");
return;
}
%dMod = 1;
//
if(%targetObject.rapierShield) {
MessageClient(%projectile.sourceObject.client, 'MsgDeflect', "The Target Is Immortal.");
return;
}
%source = %projectile.SourceObject;
%hitObj = %targetObject;
//
if(%targetObject.isBoss) {
%dMod += 7;
}
if(%targetObject.isZombie) {
%dMod += 100;
}
%source = %projectile.SourceObject;
%hitObj = %targetObject;
%muzzlePos = %source.getMuzzlePoint(0);
%muzzleVec = %source.getMuzzleVector(0);
%muzzlePos = %source.getMuzzlePoint(0);
%muzzleVec = %source.getMuzzleVector(0);
// extra damage for head shot or less for close range shots
if(!(%hitObj.getType() & ($TypeMasks::InteriorObjectType | $TypeMasks::TerrainObjectType)) &&
(%hitObj.getDataBlock().getClassName() $= "PlayerData")) {
if(%hitObj.getDataBlock().getClassName() $= "PlayerData") {
// Now we see if we hit from behind...
%forwardVec = %hitobj.getForwardVector();
%objDir2D = getWord(%forwardVec, 0) @ " " @ getWord(%forwardVec,1) @ " " @ "0.0";
%objPos = %hitObj.getPosition();
%dif = VectorSub(%objPos, %muzzlePos);
%dif = getWord(%dif, 0) @ " " @ getWord(%dif, 1) @ " 0";
%dif = VectorNormalize(%dif);
%dot = VectorDot(%dif, %objDir2D);
// 120 Deg angle test...
// 1.05 == 60 degrees in radians
if (%dot >= mCos(1.05)) {
// Rear hit
%source.applyRepair("0.45"); //we get a bonus repair for rear
if(%source.team == %hitObj.team && !$TeamDamage) {
ServerPlay3d(BOVHitSound, %targetObject.getPosition());
return; //stops shredding
}
%source.cannotuseBOV = 1;
if(!%hitObj.IsinvincibleC) {
DoBOVRearKill(%source, %hitObj, 0);
}
return;
}
}
ServerPlay3d(BOVHitSound, %targetObject.getPosition());
//The Blade Only Works On Players
%targetObject.damage(%projectile.sourceObject, %position, %data.directDamage, %data.directDamageType);
if(isObject(%source) || %source.getState() !$= "dead") {
%source.applyRepair("0.15"); //15%
}
if(%targetObject.client !$= "") { //a Player.. goodie
if(%targetObject.getState() $= "dead") {
MessageAll('MessageAll', "\c0"@%targetObject.client.namebase@" was stabbed by "@%source.client.namebase@"'s Sword.");
}
}
}
if(!(%hitObj.getType() & ($TypeMasks::InteriorObjectType | $TypeMasks::TerrainObjectType)) && (%hitObj.getDataBlock().getClassName() $= "PlayerData")) {
if(%hitObj.getDataBlock().getClassName() $= "PlayerData") {
// Now we see if we hit from behind...
%forwardVec = %hitobj.getForwardVector();
%objDir2D = getWord(%forwardVec, 0) @ " " @ getWord(%forwardVec,1) @ " " @ "0.0";
%objPos = %hitObj.getPosition();
%dif = VectorSub(%objPos, %muzzlePos);
%dif = getWord(%dif, 0) @ " " @ getWord(%dif, 1) @ " 0";
%dif = VectorNormalize(%dif);
%dot = VectorDot(%dif, %objDir2D);
// 120 Deg angle test...
// 1.05 == 60 degrees in radians
if (%dot >= mCos(1.05)) {
// Rear hit
%source.applyRepair("0.45"); //we get a bonus repair for rear
if(%source.team == %hitObj.team && !$TeamDamage) {
ServerPlay3d(BOVHitSound, %targetObject.getPosition());
return;
}
%source.cannotuseBOV = 1;
if(!%hitObj.IsinvincibleC) {
DoBOVRearKill(%source, %hitObj, 0);
}
return;
}
}
ServerPlay3d(BOVHitSound, %targetObject.getPosition());
//The Blade Only Works On Players
%totalDamage = %data.directDamage * dMod;
%targetObject.damage(%projectile.sourceObject, %position, %totalDamage, %data.directDamageType);
if(isObject(%source) || %source.getState() !$= "dead") {
%source.applyRepair("0.15"); //15%
}
}
}
function DoBOVRearKill(%source, %target, %count) {
%count++;
if(!isObject(%source) || %source.getState() $= "dead") {
%target.setMoveState(false);
return;
}
%source.setMoveState(true);
%target.setMoveState(true);
%target.clearInventory(); //ha, no guns for You!
//lift
if(%count <= 15) {
%ZPos = %count * 0.025;
%newpos = vectoradd(%target.getPosition(),"0 0 "@%ZPos@"");
%target.setTransform(%newpos);
%target.setvelocity("0 0 0");
}
else if(%count == 16) {
//MessageAll('MsgDIE', "\c4"@%source.client.namebase@": You're so.... weak...");
%newpos = vectoradd(%target.getPosition(),"0 0 "@%ZPos * -1@"");
%target.setTransform(%newpos);
%target.setvelocity("0 0 0");
}
else if(%count == 17) {
if(%target.isZombie) {
recordAction(%source.client, "BACK", "zombie");
if(%target.isPlayerRog && %target.getControllingClient() !$= "") {
if(!%source.client.CheckNWChallengeCompletion("CompletelyUnexpected")) {
CompleteNWChallenge(%source.client, "CompletelyUnexpected");
}
}
}
else {
recordAction(%source.client, "BACK", "player");
if(!%source.client.CheckNWChallengeCompletion("Assassin")) {
CompleteNWChallenge(%source.client, "Assassin");
}
}
//%target.blowup();//BAM!
ServerPlay3d(BOVHitSound, %target.getPosition());
ServerPlay3d(BOVHitSound, %target.getPosition());
ServerPlay3d(BOVHitSound, %target.getPosition());
%target.damage(%source, %target.getposition(), 9999, $DamageType::BladeOfVengance);
//
if(%target.client !$= "") { //a Player.. goodie
MessageAll('MessageAll', "\c0"@%target.client.namebase@" was assassinated by "@%source.client.namebase@".");
}
//Challenges...
%source.cannotuseBOV = 0;
%source.setMoveState(false);
return;
}
schedule(100,0,"DoBOVRearKill", %source, %target, %count);
%count++;
if(!isObject(%source) || %source.getState() $= "dead") {
%target.setMoveState(false);
return;
}
%source.setMoveState(true);
%target.setMoveState(true);
%target.clearInventory(); //ha, no guns for You!
//lift
if(%count <= 15) {
%ZPos = %count * 0.025;
%newpos = vectoradd(%target.getPosition(),"0 0 "@%ZPos@"");
%target.setTransform(%newpos);
%target.setvelocity("0 0 0");
}
else if(%count == 16) {
%newpos = vectoradd(%target.getPosition(),"0 0 "@%ZPos * -1@"");
%target.setTransform(%newpos);
%target.setvelocity("0 0 0");
}
else if(%count == 17) {
if(%target.isZombie) {
recordAction(%source.client, "BACK", "zombie");
if(%target.isPlayerRog && %target.getControllingClient() !$= "") {
if(!%source.client.CheckNWChallengeCompletion("CompletelyUnexpected")) {
CompleteNWChallenge(%source.client, "CompletelyUnexpected");
}
}
}
else {
recordAction(%source.client, "BACK", "player");
if(!%source.client.CheckNWChallengeCompletion("Assassin")) {
CompleteNWChallenge(%source.client, "Assassin");
}
}
ServerPlay3d(BOVHitSound, %target.getPosition());
ServerPlay3d(BOVHitSound, %target.getPosition());
ServerPlay3d(BOVHitSound, %target.getPosition());
%target.damage(%source, %target.getposition(), 9999, $DamageType::BladeOfVengance_Assassination);
//
if(%target.client !$= "") { //a Player.. goodie
MessageAll('MessageAll', "\c0"@%target.client.namebase@" was assassinated by "@%source.client.namebase@".");
}
//Challenges...
%source.cannotuseBOV = 0;
%source.setMoveState(false);
return;
}
schedule(100,0,"DoBOVRearKill", %source, %target, %count);
}

View file

@ -1,31 +1,28 @@
//ALL CREDIT TO THE HALO MOD
// ORIGINALLY CODED BY: SoldierOfLight
datablock AudioProfile(BeamExpSound)
{
filename = "fx/vehicles/shrike_blaster_projectile_impact.wav";
description = AudioClosest3d;
preload = true;
datablock AudioProfile(BeamExpSound) {
filename = "fx/vehicles/shrike_blaster_projectile_impact.wav";
description = AudioClosest3d;
preload = true;
};
datablock ExplosionData(PlasmasaberExplosion)
{
explosionShape = "disc_explosion.dts";
faceViewer = true;
explosionscale = 0.1;
scale = 0.1;
soundProfile = BeamExpSound;
datablock ExplosionData(PlasmasaberExplosion) {
explosionShape = "disc_explosion.dts";
faceViewer = true;
explosionscale = 0.1;
scale = 0.1;
soundProfile = BeamExpSound;
playSpeed = 2;
playSpeed = 2;
sizes[0] = 0.1;
sizes[1] = 0.1;
times[0] = 0.0;
times[1] = 1.0;
sizes[0] = 0.1;
sizes[1] = 0.1;
times[0] = 0.0;
times[1] = 1.0;
};
datablock TracerProjectileData(PlasmasaberExpCreater)
{
datablock TracerProjectileData(PlasmasaberExpCreater) {
className = "TracerProjectileData";
Explosion = "PlasmasaberExplosion";
dryVelocity = "0.1";
@ -35,211 +32,192 @@ datablock TracerProjectileData(PlasmasaberExpCreater)
explodeOnDeath = "1";
crossSize = "0.1";
renderCross = "0";
isFXUnit = "1";
isFXUnit = "1";
};
datablock TargetProjectileData(PlasmasaberBeam)
{
directDamage = 0.0;
hasDamageRadius = false;
indirectDamage = 0.0;
damageRadius = 0.0;
velInheritFactor = 1.0;
datablock TargetProjectileData(PlasmasaberBeam) {
directDamage = 0.0;
hasDamageRadius = false;
indirectDamage = 0.0;
damageRadius = 0.0;
velInheritFactor = 1.0;
maxRifleRange = 1.5;
beamColor = "0 1 1";
maxRifleRange = 1.5;
beamColor = "1 1 0";
startBeamWidth = 0.1;
pulseBeamWidth = 0.1;
beamFlareAngle = 3.0;
minFlareSize = 0.0;
maxFlareSize = 0.0;
pulseSpeed = 0.0;
pulseLength = 0.0;
startBeamWidth = 0.1;
pulseBeamWidth = 0.1;
beamFlareAngle = 3.0;
minFlareSize = 0.0;
maxFlareSize = 0.0;
pulseSpeed = 0.0;
pulseLength = 0.0;
textureName[0] = "special/nonlingradient";
textureName[1] = "special/flare";
textureName[2] = "special/pulse";
textureName[3] = "skins/glow_Red";
textureName[0] = "special/nonlingradient";
textureName[1] = "special/flare";
textureName[2] = "special/pulse";
textureName[3] = "skins/glow_Red";
};
PlasmasaberBeam.maxRifleRange = 1.5;
datablock ItemData(Plasmasaber)
{
className = Weapon;
catagory = "Spawn Items";
//$$ TODO - real shape file
shapeFile = "stackable4m.dts";
image = PlasmasaberImage;
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
datablock ItemData(Plasmasaber) {
className = Weapon;
catagory = "Spawn Items";
//$$ TODO - real shape file
shapeFile = "stackable4m.dts";
image = PlasmasaberImage;
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "a beam sword";
computeCRC = true;
emap=true;
computeCRC = true;
emap = true;
};
datablock ShapeBaseImageData(PlasmasaberImage)
{
className = WeaponImage;
shapeFile = "turret_muzzlepoint.dts";
offset = "0.1 0.7 0.2";
item = Plasmasaber;
emap = true;
projectile = EnergyBolt;
projectileType = EnergyProjectile;
MedalRequire = 1;
datablock ShapeBaseImageData(PlasmasaberImage) {
className = WeaponImage;
shapeFile = "turret_muzzlepoint.dts";
offset = "0.1 0.7 0.2";
item = Plasmasaber;
emap = true;
projectile = EnergyBolt;
projectileType = EnergyProjectile;
// State Data
stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "ActivateReady";
stateTimeoutValue[0] = 0.2;
stateSequence[0] = "Activate";
stateSound[0] = ChaingunSwitchSound;
MedalRequire = 1;
stateName[1] = "ActivateReady";
stateTimeoutValue[1] = 0.01;
stateScript[1] = "onActivateReady";
stateTransitionOnTimeout[1] = "Ready";
// State Data
stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "ActivateReady";
stateTimeoutValue[0] = 0.2;
stateSequence[0] = "Activate";
stateSound[0] = ChaingunSwitchSound;
stateName[2] = "Ready";
stateScript[2] = "onReady";
stateTransitionOnTriggerDown[2] = "Fire";
stateName[1] = "ActivateReady";
stateTimeoutValue[1] = 0.01;
stateScript[1] = "onActivateReady";
stateTransitionOnTimeout[1] = "Ready";
stateName[3] = "Fire";
stateTransitionOnTimeout[3] = "Reload";
stateFire[3] = true;
stateAllowImageChange[3] = false;
stateScript[3] = "onFire";
stateName[2] = "Ready";
stateScript[2] = "onReady";
stateTransitionOnTriggerDown[2] = "Fire";
stateName[4] = "Reload";
stateTransitionOnTimeout[4] = "Ready";
stateTimeoutValue[4] = 1.5;
stateAllowImageChange[4] = false;
stateName[3] = "Fire";
stateTransitionOnTimeout[3] = "Reload";
stateFire[3] = true;
stateAllowImageChange[3] = false;
stateScript[3] = "onFire";
stateName[4] = "Reload";
stateTransitionOnTimeout[4] = "Ready";
stateTimeoutValue[4] = 1.5;
stateAllowImageChange[4] = false;
};
datablock ShapeBaseImageData(PlasmasaberImage2)
{
shapeFile = "weapon_energy_vehicle.dts";
offset = "0.1 0.2 0";
rotation = "1 0 0 -10";
datablock ShapeBaseImageData(PlasmasaberImage2) {
shapeFile = "weapon_energy_vehicle.dts";
offset = "0.1 0.2 0";
rotation = "1 0 0 -10";
};
function PlasmasaberImage::onMount(%data,%obj,%slot)
{
if(%obj.isZombie || %obj.isBoss) {
%obj.setInventory(Plasmasaber, 0, true);
}
Parent::onMount(%data,%obj,%slot);
%obj.mountImage(PlasmasaberImage2,4);
%obj.usingPlasmasaber = 1;
function PlasmasaberImage::onMount(%data, %obj, %slot) {
if(%obj.isZombie || %obj.isBoss) {
%obj.setInventory(Plasmasaber, 0, true);
}
Parent::onMount(%data,%obj,%slot);
%obj.mountImage(PlasmasaberImage2, 4);
%obj.usingPlasmasaber = 1;
}
function PlasmasaberImage::onUnmount(%data,%obj,%slot)
{
Parent::onUnmount(%data,%obj,%slot);
%obj.unMountImage(4);
%obj.usingPlasmasaber = 0;
cancel(%obj.Plasmasaberloop);
if(isObject(%obj.beam1))
{
%obj.beam1.delete();
%obj.beam1 = "";
}
function PlasmasaberImage::onUnmount(%data, %obj, %slot) {
Parent::onUnmount(%data,%obj,%slot);
%obj.unMountImage(4);
%obj.usingPlasmasaber = 0;
cancel(%obj.Plasmasaberloop);
if(isObject(%obj.beam1)) {
%obj.beam1.delete();
%obj.beam1 = "";
}
}
function PlasmasaberImage::onActivateReady(%data,%obj,%slot) //small explosion
{
%p = new TracerProjectile()
{
datablock = "PlasmasaberExpCreater";
initialPosition = %obj.getMuzzlePoint(%slot);
initialDirection = %obj.getMuzzleVector(%slot);
sourceObject = %obj;
};
function PlasmasaberImage::onActivateReady(%data, %obj, %slot) { //small explosion
%p = new TracerProjectile() {
datablock = "PlasmasaberExpCreater";
initialPosition = %obj.getMuzzlePoint(%slot);
initialDirection = %obj.getMuzzleVector(%slot);
sourceObject = %obj;
};
}
function PlasmasaberImage::onReady(%data,%obj,%slot) //create beams
{
Plasmasaberloop(%obj);
function PlasmasaberImage::onReady(%data, %obj, %slot) { //create beams
Plasmasaberloop(%obj);
}
function PlasmasaberLoop(%obj)
{
if(!isObject(%obj) || %obj.getState() $= "dead") {
return;
}
if(%obj.usingPlasmasaber == 0)
{
if(isObject(%obj.beam1))
%obj.beam1.delete();
return;
}
%vec1 = %obj.getMuzzleVector(4);
%vec = %obj.getMuzzleVector(0);
%vec2d = getWords(%vec,0,1) SPC "0";
%left = vectorCross(%vec2d,"0 0 1");
%up = vectorCross(%vec,%left);
%up = vectorScale(%up,0.2);
%down = vectorScale(%up,-1);
%pos1 = %obj.getMuzzlePoint(5);
%dir1 = vectorAdd(%vec1,%down);
if(!isObject(%obj.beam1) && !%obj.isCloaked())
{
%obj.beam1 = new TargetProjectile()
{
datablock = "PlasmasaberBeam";
initialPosition = %pos1;
initialDirection = %dir1;
sourceSlot = 4;
sourceObject = %obj;
};
}
%obj.Plasmasaberloop = schedule(25,0,Plasmasaberloop,%obj);
function PlasmasaberLoop(%obj) {
if(!isObject(%obj) || %obj.getState() $= "dead") {
return;
}
if(%obj.usingPlasmasaber == 0) {
if(isObject(%obj.beam1)) {
%obj.beam1.delete();
}
return;
}
%vec1 = %obj.getMuzzleVector(4);
%vec = %obj.getMuzzleVector(0);
%vec2d = getWords(%vec,0,1) SPC "0";
%left = vectorCross(%vec2d,"0 0 1");
%up = vectorCross(%vec,%left);
%up = vectorScale(%up,0.2);
%down = vectorScale(%up,-1);
%pos1 = %obj.getMuzzlePoint(5);
%dir1 = vectorAdd(%vec1,%down);
if(!isObject(%obj.beam1) && !%obj.isCloaked()) {
%obj.beam1 = new TargetProjectile() {
datablock = "PlasmasaberBeam";
initialPosition = %pos1;
initialDirection = %dir1;
sourceSlot = 4;
sourceObject = %obj;
};
}
%obj.Plasmasaberloop = schedule(25, 0, Plasmasaberloop, %obj);
}
function PlasmasaberImage::onFire(%data,%obj,%slot) //apply damage
{
%vec = %obj.getMuzzleVector(%slot);
%pos = %obj.getMuzzlePoint(%slot);
%vec = vectorScale(%vec,1.5);
%end = vectorAdd(%pos,%vec);
%mask = $TypeMasks::VehicleObjectType | $TypeMasks::PlayerObjectType | $TypeMasks::StaticShapeObjectType;
initContainerRadiusSearch(%end,1.0,%mask);
while((%target = containerSearchNext()) != 0) {
if(%target == %obj) //you can never be too careful
return;
if(!%target.isBoss) {
%target.damage(%obj,%target.getWorldBoxCenter(), 10.4, $DamageType::Plasmasaber);
}
else {
%target.damage(%obj,%target.getWorldBoxCenter(), 0.4, $DamageType::Plasmasaber);
}
%p = new TracerProjectile()
{
datablock = "PlasmasaberExpCreater";
initialPosition = %target.getPosition();
initialDirection = %obj.getMuzzleVector(%slot); //who cares?
sourceObject = %obj;
};
}
//play anim
// %obj.disableMove(true); //don't screw up the kewl animation ;)
// %obj.schedule(500,disableMove,false);
function PlasmasaberImage::onFire(%data, %obj, %slot) { //apply damage
%vec = %obj.getMuzzleVector(%slot);
%pos = %obj.getMuzzlePoint(%slot);
%vec = vectorScale(%vec, 1.5);
%end = vectorAdd(%pos, %vec);
%mask = $TypeMasks::VehicleObjectType | $TypeMasks::PlayerObjectType | $TypeMasks::StaticShapeObjectType;
initContainerRadiusSearch(%end, 1.0, %mask);
while((%target = containerSearchNext()) != 0) {
if(%target == %obj) {
return;
}
//if(!%target.isBoss) {
// %target.damage(%obj, %target.getWorldBoxCenter(), 10.4, $DamageType::Plasmasaber);
//}
//else {
// %target.damage(%obj, %target.getWorldBoxCenter(), 0.4, $DamageType::Plasmasaber);
//}
//TWM2 3.9.2: Balance Update, Bump Up Plasmasaber damage for all enemies
%target.damage(%obj, %target.getWorldBoxCenter(), 5.0, $DamageType::Plasmasaber);
%p = new TracerProjectile() {
datablock = "PlasmasaberExpCreater";
initialPosition = %target.getPosition();
initialDirection = %obj.getMuzzleVector(%slot); //who cares?
sourceObject = %obj;
};
}
}
function Plasmasaber::onThrow(%data,%obj,%plyr)
{
%pos = %obj.getPosition();
%p = new TracerProjectile()
{
datablock = "PlasmasaberExpCreater";
initialPosition = %pos;
initialDirection = "0 0 1";
sourceObject = %obj;
};
function Plasmasaber::onThrow(%data, %obj, %plyr) {
%pos = %obj.getPosition();
%p = new TracerProjectile() {
datablock = "PlasmasaberExpCreater";
initialPosition = %pos;
initialDirection = "0 0 1";
sourceObject = %obj;
};
}

View file

@ -155,49 +155,6 @@ datablock TracerProjectileData(LZombieAcidBall) {
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;

View file

@ -1,146 +1,146 @@
datablock ItemData(IonLauncherAmmo)
{
className = Ammo;
catagory = "Ammo";
shapeFile = "ammo_missile.dts";
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
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;
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";
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;
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;
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;
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.
//ClipStuff
ClipName = "IonLauncherClip";
ClipPickupName["IonLauncherClip"] = "A Few Ion Missile boxes";
ShowsClipInHud = 1;
ClipReloadTime = 6;
ClipReturn = 2;
InitialClips = 7;
// only target objects outside this range
minTargetingDistance = 40;
GunName = "LUX-4 Ion Launcher";
//
stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "ActivateReady";
stateTimeoutValue[0] = 2.0;
stateSequence[0] = "Activate";
stateSound[0] = MissileSwitchSound;
MedalRequire = 1;
stateName[1] = "ActivateReady";
stateTransitionOnLoaded[1] = "Ready";
stateTransitionOnNoAmmo[1] = "NoAmmo";
isSeeker = true;
seekRadius = 1000;
maxSeekAngle = 8;
seekTime = 0.5;
minSeekHeat = 0.1; // the heat that must be present on a target to lock it.
stateName[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTransitionOnTriggerDown[2] = "CheckWet";
// only target objects outside this range
minTargetingDistance = 40;
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[0] = "Activate";
stateTransitionOnTimeout[0] = "ActivateReady";
stateTimeoutValue[0] = 2.0;
stateSequence[0] = "Activate";
stateSound[0] = MissileSwitchSound;
stateName[4] = "Reload";
stateTransitionOnNoAmmo[4] = "NoAmmo";
stateTransitionOnTimeout[4] = "Ready";
stateTimeoutValue[4] = 4.5;
stateAllowImageChange[4] = false;
stateSequence[4] = "Reload";
stateSound[4] = MissileReloadSound;
stateName[1] = "ActivateReady";
stateTransitionOnLoaded[1] = "Ready";
stateTransitionOnNoAmmo[1] = "NoAmmo";
stateName[5] = "NoAmmo";
stateTransitionOnAmmo[5] = "Reload";
stateSequence[5] = "NoAmmo";
stateTransitionOnTriggerDown[5] = "DryFire";
stateName[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTransitionOnTriggerDown[2] = "CheckWet";
stateName[6] = "DryFire";
stateSound[6] = MissileDryFireSound;
stateTimeoutValue[6] = 1.0;
stateTransitionOnTimeout[6] = "ActivateReady";
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[7] = "CheckTarget";
stateTransitionOnNoTarget[7] = "Fire";
stateTransitionOnTarget[7] = "Fire";
stateName[4] = "Reload";
stateTransitionOnNoAmmo[4] = "NoAmmo";
stateTransitionOnTimeout[4] = "Ready";
stateTimeoutValue[4] = 4.5;
stateAllowImageChange[4] = false;
stateSequence[4] = "Reload";
stateSound[4] = MissileReloadSound;
stateName[8] = "CheckWet";
stateTransitionOnWet[8] = "DryFire";
stateTransitionOnNotWet[8] = "CheckTarget";
stateName[5] = "NoAmmo";
stateTransitionOnAmmo[5] = "Reload";
stateSequence[5] = "NoAmmo";
stateTransitionOnTriggerDown[5] = "DryFire";
stateName[9] = "WetFire";
stateTransitionOnNoAmmo[9] = "NoAmmo";
stateTransitionOnTimeout[9] = "Reload";
stateTimeoutValue[9] = 0.4;
stateScript[9] = "onWetFire";
stateAllowImageChange[9] = false;
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);
%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();
%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 = Parent::onFire(%data, %obj, %slot);
MissileSet.add(%p);
%p.setObjectTarget(0);
%p.setObjectTarget(0);
}

View file

@ -1,96 +1,97 @@
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;
className = Weapon;
catagory = "Spawn Items";
shapeFile = "weapon_sniper.dts";
image = IonRifleImage;
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "a LUX Ion Rifle";
computeCRC = true;
};
datablock ShapeBaseImageData(IonRifleImage) {
className = WeaponImage;
shapeFile = "weapon_sniper.dts";
item = IonRifle;
projectile = ShockBeam;
projectileType = SniperProjectile;
armThread = looksn;
className = WeaponImage;
shapeFile = "weapon_sniper.dts";
item = IonRifle;
projectile = ShockBeam;
projectileType = SniperProjectile;
armThread = looksn;
MedalRequire = 1;
MedalRequire = 1;
usesEnergy = true;
minEnergy = 6;
usesEnergy = true;
minEnergy = 6;
stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "ActivateReady";
stateSound[0] = SniperRifleSwitchSound;
stateTimeoutValue[0] = 0.5;
stateSequence[0] = "Activate";
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[1] = "ActivateReady";
stateTransitionOnLoaded[1] = "Ready";
stateTransitionOnNoAmmo[1] = "NoAmmo";
stateName[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTransitionOnTriggerDown[2] = "CheckWet";
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[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[4] = "Reload";
stateTransitionOnTimeout[4] = "Ready";
stateTimeoutValue[4] = 0.5;
stateAllowImageChange[4] = false;
stateName[5] = "CheckWet";
stateTransitionOnWet[5] = "DryFire";
stateTransitionOnNotWet[5] = "Fire";
stateName[5] = "CheckWet";
stateTransitionOnWet[5] = "DryFire";
stateTransitionOnNotWet[5] = "Fire";
stateName[6] = "NoAmmo";
stateTransitionOnAmmo[6] = "Reload";
stateTransitionOnTriggerDown[6] = "DryFire";
stateSequence[6] = "NoAmmo";
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";
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);
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);
}

View file

@ -1,111 +1,111 @@
datablock ShapeBaseImageData(MiniColliderCannonImage) {
className = WeaponImage;
shapeFile = "turret_mortar_large.dts";
item = MiniColliderCannon;
usesenergy = true;
className = WeaponImage;
shapeFile = "turret_mortar_large.dts";
item = MiniColliderCannon;
usesenergy = true;
projectile = MiniColliderShell;
projectileType = GrenadeProjectile;
projectile = MiniColliderShell;
projectileType = GrenadeProjectile;
emap = true;
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";
MedalRequire = 1;
stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "ActivateReady";
stateTimeoutValue[0] = 0.5;
stateSequence[0] = "Activate";
stateSound[0] = MortarReloadSound;
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[1] = "ActivateReady";
stateTransitionOnLoaded[1] = "Ready";
stateTransitionOnNoAmmo[1] = "NoAmmo";
stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "ActivateReady";
stateTimeoutValue[0] = 0.5;
stateSequence[0] = "Activate";
stateSound[0] = MortarReloadSound;
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] = 4.6;
stateFire[3] = true;
stateRecoil[3] = LightRecoil;
stateAllowImageChange[3] = false;
stateSequence[3] = "Fire";
stateSound[3] = CentaurArtilleryFireSound;
stateScript[3] = "onFire";
stateName[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTransitionOnTriggerDown[2] = "Fire";
stateName[4] = "Reload";
stateTransitionOnNoAmmo[4] = "NoAmmo";
stateTransitionOnTimeout[4] = "Ready";
stateSound[4] = MortarSwitchSound;
stateEjectShell[4] = true;
stateAllowImageChange[4] = false;
stateSequence[4] = "Reload";
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[5] = "NoAmmo";
stateTransitionOnAmmo[5] = "Reload";
stateSequence[5] = "NoAmmo";
stateTransitionOnTriggerDown[5] = "DryFire";
stateName[4] = "Reload";
stateTransitionOnNoAmmo[4] = "NoAmmo";
stateTransitionOnTimeout[4] = "Ready";
stateSound[4] = MortarSwitchSound;
stateEjectShell[4] = true;
stateAllowImageChange[4] = false;
stateSequence[4] = "Reload";
stateName[6] = "DryFire";
stateTimeoutValue[6] = 0.3;
stateSound[6] = ChaingunDryFireSound;
stateTransitionOnTimeout[6] = "Ready";
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";
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;
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);
}
%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(200, 0, "ServerPlay3D", "CentaurArtilleryFireSound", %obj.getPosition());
}
else {
%p = Parent::OnFire(%data, %obj, %slot);
}
}

View file

@ -1,117 +1,113 @@
datablock ItemData(NapalmAmmo)
{
className = Ammo;
catagory = "Ammo";
shapeFile = "ammo_grenade.dts";
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "some Napalm";
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;
datablock ShapeBaseImageData(NapalmImage) {
className = WeaponImage;
shapeFile = "ammo_grenade.dts";
item = Napalm;
ammo = NapalmAmmo;
offset = "0 0 0";
armThread = lookms;
emap = true;
projectileSpread = 0;
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;
projectile = NapalmShot;
projectileType = LinearProjectile;
//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";
//
RankRequire = $TWM2::RankRequire["NapalmLauncher"];
MedalRequire = 1;
// State Data
stateName[0] = "ActivateReady";
stateTransitionOnLoaded[0] = "Activate";
stateTransitionOnNoAmmo[0] = "NoAmmo";
//ClipStuff
ClipName = "NapalmClip";
ClipPickupName["NapalmClip"] = "some napalm fuel clusters";
ShowsClipInHud = 1;
ClipReloadTime = 5;
ClipReturn = 1;
InitialClips = 6;
stateName[1] = "Activate";
stateTransitionOnTimeout[1] = "Ready";
stateTimeoutValue[1] = 0.5;
stateSequence[1] = "Activated";
stateSound[1] = PlasmaSwitchSound;
//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";
//
stateName[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTransitionOnTriggerDown[2] = "Fire";
stateSequence[2] = "DiscSpin";
// stateSound[2] = DiscLoopSound;
// State Data
stateName[0] = "ActivateReady";
stateTransitionOnLoaded[0] = "Activate";
stateTransitionOnNoAmmo[0] = "NoAmmo";
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[1] = "Activate";
stateTransitionOnTimeout[1] = "Ready";
stateTimeoutValue[1] = 0.5;
stateSequence[1] = "Activated";
stateSound[1] = PlasmaSwitchSound;
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[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTransitionOnTriggerDown[2] = "Fire";
stateSequence[2] = "DiscSpin";
// stateSound[2] = DiscLoopSound;
stateName[5] = "NoAmmo";
stateTransitionOnAmmo[5] = "Reload";
stateSequence[5] = "NoAmmo";
stateTransitionOnTriggerDown[5] = "DryFire";
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[6] = "DryFire";
stateSound[6] = GrenadeDryFireSound;
stateTimeoutValue[6] = 0.3;
stateTransitionOnTimeout[6] = "NoAmmo";
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;
};
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;
};

View file

@ -1,126 +1,123 @@
datablock TracerProjectileData(PlasmaTorpedoProjectile) {
doDynamicClientHits = true;
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;
directDamage = 0.0;
hasDamageRadius = true;
indirectDamage = 1.5;
damageRadius = 25.0;
kickBackStrength = 4000;
radiusDamageType = $DamageType::PTorpdeo;
sound = ShrikeBlasterProjectileSound;
ImageSource = "PlasmaTorpedoImage";
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;
explosion = "SatchelMainExplosion";
splash = ChaingunSplash;
tracerLength = 45.0;
tracerAlpha = false;
tracerMinPixels = 6;
tracerColor = "1.0 0.0 0.0 0.0";
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;
crossSize = 0.99;
crossViewAng = 0.990;
renderCross = true;
};
datablock ShapeBaseImageData(PlasmaTorpedoImage) {
className = WeaponImage;
shapeFile = "turret_fusion_large.dts";
item = PlasmaTorpedo;
usesenergy = true;
className = WeaponImage;
shapeFile = "turret_fusion_large.dts";
item = PlasmaTorpedo;
usesenergy = true;
projectile = PlasmaTorpedoProjectile;
projectileType = TracerProjectile;
projectile = PlasmaTorpedoProjectile;
projectileType = TracerProjectile;
emap = true;
emap = true;
//RankRequire = $TWM2::RankRequire["SCD343"];
PrestigeRequire = 9;
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";
//RankRequire = $TWM2::RankRequire["SCD343"];
PrestigeRequire = 9;
stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "ActivateReady";
stateTimeoutValue[0] = 0.5;
stateSequence[0] = "Activate";
stateSound[0] = MortarReloadSound;
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[1] = "ActivateReady";
stateTransitionOnLoaded[1] = "Ready";
stateTransitionOnNoAmmo[1] = "NoAmmo";
stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "ActivateReady";
stateTimeoutValue[0] = 0.5;
stateSequence[0] = "Activate";
stateSound[0] = MortarReloadSound;
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] = 7.6;
stateFire[3] = true;
stateRecoil[3] = LightRecoil;
stateAllowImageChange[3] = false;
stateSequence[3] = "Fire";
stateSound[3] = CentaurArtilleryFireSound;
stateScript[3] = "onFire";
stateName[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTransitionOnTriggerDown[2] = "Fire";
stateName[4] = "Reload";
stateTransitionOnNoAmmo[4] = "NoAmmo";
stateTransitionOnTimeout[4] = "Ready";
stateSound[4] = MortarSwitchSound;
stateEjectShell[4] = true;
stateAllowImageChange[4] = false;
stateSequence[4] = "Reload";
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[5] = "NoAmmo";
stateTransitionOnAmmo[5] = "Reload";
stateSequence[5] = "NoAmmo";
stateTransitionOnTriggerDown[5] = "DryFire";
stateName[4] = "Reload";
stateTransitionOnNoAmmo[4] = "NoAmmo";
stateTransitionOnTimeout[4] = "Ready";
stateSound[4] = MortarSwitchSound;
stateEjectShell[4] = true;
stateAllowImageChange[4] = false;
stateSequence[4] = "Reload";
stateName[6] = "DryFire";
stateTimeoutValue[6] = 0.3;
stateSound[6] = ChaingunDryFireSound;
stateTransitionOnTimeout[6] = "Ready";
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;
};
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;
};

View file

@ -1,167 +1,166 @@
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;
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;
explosion = "BlasterExplosion";
splash = PlasmaSplash;
baseEmitter = NMMissileBaseEmitter;
ImageSource = "ShadowRifleImage";
baseEmitter = NMMissileBaseEmitter;
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;
ImageSource = "ShadowRifleImage";
//activateDelayMS = 100;
activateDelayMS = -1;
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;
size[0] = 0.2;
size[1] = 0.5;
size[2] = 0.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";
numFlares = 35;
flareColor = "1 0.18 0.03";
flareModTexture = "flaremod";
flareBaseTexture = "flarebase";
sound = PlasmaProjectileSound;
fireSound = FlamethrowerFireSound;
wetFireSound = PlasmaFireWetSound;
fireSound = FlamethrowerFireSound;
wetFireSound = PlasmaFireWetSound;
hasLight = true;
lightRadius = 10.0;
lightColor = "0.94 0.03 0.12";
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;
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;
computeCRC = true;
};
datablock ShapeBaseImageData(ShadowRifleImage) {
className = WeaponImage;
shapeFile = "weapon_sniper.dts";
item = ShadowRifle;
projectile = ShadowRifleBolt;
projectileType = LinearFlareProjectile;
className = WeaponImage;
shapeFile = "weapon_sniper.dts";
item = ShadowRifle;
projectile = ShadowRifleBolt;
projectileType = LinearFlareProjectile;
MedalRequire = 1;
MedalRequire = 1;
usesEnergy = true;
minEnergy = 6;
usesEnergy = true;
minEnergy = 6;
stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "ActivateReady";
stateSound[0] = SniperRifleSwitchSound;
stateTimeoutValue[0] = 0.5;
stateSequence[0] = "Activate";
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[1] = "ActivateReady";
stateTransitionOnLoaded[1] = "Ready";
stateTransitionOnNoAmmo[1] = "NoAmmo";
stateName[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTransitionOnTriggerDown[2] = "CheckWet";
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[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[4] = "Reload";
stateTransitionOnTimeout[4] = "Ready";
stateTimeoutValue[4] = 2.5;
stateAllowImageChange[4] = false;
stateName[5] = "CheckWet";
stateTransitionOnWet[5] = "DryFire";
stateTransitionOnNotWet[5] = "Fire";
stateName[5] = "CheckWet";
stateTransitionOnWet[5] = "DryFire";
stateTransitionOnNotWet[5] = "Fire";
stateName[6] = "NoAmmo";
stateTransitionOnAmmo[6] = "Reload";
stateTransitionOnTriggerDown[6] = "DryFire";
stateSequence[6] = "NoAmmo";
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";
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);
}
}
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);
}
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);
}

View file

@ -1,8 +1,7 @@
datablock AudioProfile(PistolFireSound)
{
filename = "fx/vehicles/tank_chaingun.wav";
description = AudioDefault3d;
preload = true;
datablock AudioProfile(PistolFireSound) {
filename = "fx/vehicles/tank_chaingun.wav";
description = AudioDefault3d;
preload = true;
};
//--------------------------------------------------------------------------
@ -10,217 +9,214 @@ datablock AudioProfile(PistolFireSound)
//--------------------------------------------------------------------------
datablock TracerProjectileData(coltBullet) {
doDynamicClientHits = true;
doDynamicClientHits = true;
directDamage = 0.15; // z0dd - ZOD, 9-27-02. Was 0.0825
directDamageType = $DamageType::pistol;
explosion = "ChaingunExplosion";
splash = ChaingunSplash;
HeadMultiplier = 1.5;
LegsMultiplier = 0.5;
ImageSource = "PistolImage";
directDamage = 0.15; // z0dd - ZOD, 9-27-02. Was 0.0825
directDamageType = $DamageType::pistol;
explosion = "ChaingunExplosion";
splash = ChaingunSplash;
HeadMultiplier = 1.5;
LegsMultiplier = 0.5;
kickBackStrength = 5.0;
sound = ChaingunProjectile;
ImageSource = "PistolImage";
//dryVelocity = 425.0;
dryVelocity = 2000.0; // z0dd - ZOD, 8-12-02. Was 425.0
wetVelocity = 1750.0;
velInheritFactor = 0.0;
fizzleTimeMS = 3000;
lifetimeMS = 3000;
explodeOnDeath = false;
reflectOnWaterImpactAngle = 0.0;
explodeOnWaterImpact = false;
deflectionOnWaterImpact = 0.0;
fizzleUnderwaterMS = 3000;
kickBackStrength = 5.0;
sound = ChaingunProjectile;
tracerLength = 25.0;
tracerAlpha = false;
tracerMinPixels = 6;
tracerColor = 211.0/255.0 @ " " @ 215.0/255.0 @ " " @ 120.0/255.0 @ " 0.75";
//dryVelocity = 425.0;
dryVelocity = 2000.0; // z0dd - ZOD, 8-12-02. Was 425.0
wetVelocity = 1750.0;
velInheritFactor = 0.0;
fizzleTimeMS = 3000;
lifetimeMS = 3000;
explodeOnDeath = false;
reflectOnWaterImpactAngle = 0.0;
explodeOnWaterImpact = false;
deflectionOnWaterImpact = 0.0;
fizzleUnderwaterMS = 3000;
tracerLength = 25.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;
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;
decalData[0] = ChaingunDecal1;
decalData[1] = ChaingunDecal2;
decalData[2] = ChaingunDecal3;
decalData[3] = ChaingunDecal4;
decalData[4] = ChaingunDecal5;
decalData[5] = ChaingunDecal6;
};
datablock ItemData(pistolAmmo)
{
className = Ammo;
catagory = "Ammo";
shapeFile = "ammo_chaingun.dts";
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
datablock ItemData(pistolAmmo) {
className = Ammo;
catagory = "Ammo";
shapeFile = "ammo_chaingun.dts";
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "some .77mm bullets";
computeCRC = true;
computeCRC = true;
};
datablock ItemData(pistol) {
className = Weapon;
catagory = "Spawn Items";
shapeFile = "weapon_energy_vehicle.dts";
image = pistolImage;
mass = 2;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "a Colt Pistol";
className = Weapon;
catagory = "Spawn Items";
shapeFile = "weapon_energy_vehicle.dts";
image = pistolImage;
mass = 2;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "a Colt Pistol";
};
datablock ShapeBaseImageData(PistolImage)
{
className = WeaponImage;
shapeFile = "weapon_energy_vehicle.dts";
item = pistol;
offset = "0 0 0";
rotation = "0 1 0 180";
mass = 4;
datablock ShapeBaseImageData(PistolImage) {
className = WeaponImage;
shapeFile = "weapon_energy_vehicle.dts";
item = pistol;
offset = "0 0 0";
rotation = "0 1 0 180";
mass = 4;
ammo = pistolAmmo;
ammo = pistolAmmo;
projectile = coltbullet;
projectileType = tracerProjectile;
projectileSpread = 10.0 / 1000.0;
//ClipStuff
ClipName = "ColtClip";
ClipPickupName["ColtClip"] = "Some .77MM Clips";
ShowsClipInHud = 0;
ClipReloadTime = 2;
ClipReturn = 10;
InitialClips = 950;
HellClipCount = 10;
//
//Challenges
HasChallenges = 1;
ChallengeCt = 9;
Challenge[1] = "Coltee\t25\t100\tGrip";
Challenge[2] = "Coltist\t50\t150\tLaser";
Challenge[3] = "Colt Expert\t100\t250\tSilencer";
Challenge[4] = "Colt Master\t250\t500\tExcessive Duality";
Challenge[5] = "Colt God\t500\t1000\tHSBullets";
Challenge[6] = "Colt Bronze Commendation\t1000\t10000\tNone";
Challenge[7] = "Colt Silver Commendation\t2500\t25000\tNone";
Challenge[8] = "Colt Gold Commendation\t5000\t50000\tNone";
Challenge[9] = "Colt Titan Commendation\t15000\t75000\tNone";
Upgrade[1] = "Grip";
Upgrade[2] = "Laser";
Upgrade[3] = "Silencer";
Upgrade[4] = "Excessive Duality";
Upgrade[5] = "HSBullets";
GunName = "Colt Pistol";
//
projectile = coltbullet;
projectileType = tracerProjectile;
projectileSpread = 10.0 / 1000.0;
stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "ActivateReady";
stateTimeoutValue[0] = 0.5;
stateSequence[0] = "Activate";
stateSound[0] = PlasmaSwitchSound;
//ClipStuff
ClipName = "ColtClip";
ClipPickupName["ColtClip"] = "Some .77MM Clips";
ShowsClipInHud = 0;
ClipReloadTime = 2;
ClipReturn = 10;
InitialClips = 950;
HellClipCount = 10;
//
//Challenges
HasChallenges = 1;
ChallengeCt = 9;
Challenge[1] = "Coltee\t25\t100\tGrip";
Challenge[2] = "Coltist\t50\t150\tLaser";
Challenge[3] = "Colt Expert\t100\t250\tSilencer";
Challenge[4] = "Colt Master\t250\t500\tExcessive Duality";
Challenge[5] = "Colt God\t500\t1000\tHSBullets";
Challenge[6] = "Colt Bronze Commendation\t1000\t10000\tNone";
Challenge[7] = "Colt Silver Commendation\t2500\t25000\tNone";
Challenge[8] = "Colt Gold Commendation\t5000\t50000\tNone";
Challenge[9] = "Colt Titan Commendation\t15000\t75000\tNone";
Upgrade[1] = "Grip";
Upgrade[2] = "Laser";
Upgrade[3] = "Silencer";
Upgrade[4] = "Excessive Duality";
Upgrade[5] = "HSBullets";
GunName = "Colt Pistol";
//
stateName[1] = "ActivateReady";
stateTransitionOnLoaded[1] = "Ready";
stateTransitionOnNoAmmo[1] = "NoAmmo";
stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "ActivateReady";
stateTimeoutValue[0] = 0.5;
stateSequence[0] = "Activate";
stateSound[0] = PlasmaSwitchSound;
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.1;
stateFire[3] = true;
stateEmitter[3] = "GunFireEffectEmitter";
stateEmitterNode[3] = "muzzlepoint1";
stateEmitterTime[3] = 1;
stateRecoil[3] = LightRecoil;
stateAllowImageChange[3] = false;
stateScript[3] = "onFire";
stateEmitterTime[3] = 0.2;
//stateSound[3] = PistolFireSound;
stateName[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTransitionOnTriggerDown[2] = "Fire";
stateName[4] = "Reload";
stateTransitionOnNoAmmo[4] = "NoAmmo";
stateTransitionOnTimeout[4] = "Ready";
stateTimeoutValue[4] = 0.1;
stateAllowImageChange[4] = false;
stateSequence[4] = "Reload";
stateName[3] = "Fire";
stateTransitionOnTimeout[3] = "Reload";
stateTimeoutValue[3] = 0.1;
stateFire[3] = true;
stateEmitter[3] = "GunFireEffectEmitter";
stateEmitterNode[3] = "muzzlepoint1";
stateEmitterTime[3] = 1;
stateRecoil[3] = LightRecoil;
stateAllowImageChange[3] = false;
stateScript[3] = "onFire";
stateEmitterTime[3] = 0.2;
//stateSound[3] = PistolFireSound;
stateName[5] = "NoAmmo";
stateTransitionOnAmmo[5] = "Reload";
stateSequence[5] = "NoAmmo";
stateTransitionOnTriggerDown[5] = "DryFire";
stateName[4] = "Reload";
stateTransitionOnNoAmmo[4] = "NoAmmo";
stateTransitionOnTimeout[4] = "Ready";
stateTimeoutValue[4] = 0.1;
stateAllowImageChange[4] = false;
stateSequence[4] = "Reload";
stateName[6] = "DryFire";
stateSound[6] = ChaingunDryFireSound;
stateTimeoutValue[6] = 1.5;
stateTransitionOnTimeout[6] = "NoAmmo";
stateName[5] = "NoAmmo";
stateTransitionOnAmmo[5] = "Reload";
stateSequence[5] = "NoAmmo";
stateTransitionOnTriggerDown[5] = "DryFire";
stateName[6] = "DryFire";
stateSound[6] = ChaingunDryFireSound;
stateTimeoutValue[6] = 1.5;
stateTransitionOnTimeout[6] = "NoAmmo";
};
datablock ShapeBaseImageData(PistolImage2) : PistolImage {
offset = "-0.5 0 0";
offset = "-0.5 0 0";
};
function PistolImage::onMount(%this,%obj,%slot) {
Parent::onMount(%this, %obj, %slot);
if(%obj.client.UpgradeOn("Excessive Duality", %this.getName())) {
%obj.mountImage(PistolImage2, 5);
}
function PistolImage::onMount(%this, %obj, %slot) {
Parent::onMount(%this, %obj, %slot);
if(%obj.client.UpgradeOn("Excessive Duality", %this.getName())) {
%obj.mountImage(PistolImage2, 5);
}
}
function PistolImage::onUnmount(%this,%obj,%slot) {
%obj.unmountImage(5);
Parent::onUnmount(%this, %obj, %slot);
%obj.unmountImage(5);
Parent::onUnmount(%this, %obj, %slot);
}
function PistolImage::onFire(%data, %obj, %slot) {
%p = Parent::onFire(%data, %obj, %slot);
if(%obj.client.UpgradeOn("Silencer", %data.getName())) {
//zero sound :p
}
else if(%obj.client.UpgradeOn("Excessive Duality", %data.getName())) {
schedule(200, 0, "FirePistolShot", %data, %obj, %slot);
ServerPlay3d(PistolFireSound, %obj.getPosition());
}
else {
ServerPlay3d(PistolFireSound, %obj.getPosition());
}
%p = Parent::onFire(%data, %obj, %slot);
if(%obj.client.UpgradeOn("Silencer", %data.getName())) {
//zero sound :p
}
else if(%obj.client.UpgradeOn("Excessive Duality", %data.getName())) {
schedule(200, 0, "FirePistolShot", %data, %obj, %slot);
ServerPlay3d(PistolFireSound, %obj.getPosition());
}
else {
ServerPlay3d(PistolFireSound, %obj.getPosition());
}
}
function FirePistolShot(%data, %obj, %slot) {
serverPlay3d("PistolFireSound", %obj.getPosition());
serverPlay3d("PistolFireSound", %obj.getPosition());
%vector = %obj.getMuzzleVector(%slot);
%mp = %obj.getMuzzlePoint(%slot);
%vector = %obj.getMuzzleVector(%slot);
%mp = %obj.getMuzzlePoint(%slot);
%x = (getRandom() - 0.5) * 2 * 3.1415926 * %data.projectileSpread;
%y = (getRandom() - 0.5) * 2 * 3.1415926 * %data.projectileSpread;
%z = (getRandom() - 0.5) * 2 * 3.1415926 * %data.projectileSpread;
%mat = MatrixCreateFromEuler(%x @ " " @ %y @ " " @ %z);
%newvector = MatrixMulVector(%mat, %vector);
%x = (getRandom() - 0.5) * 2 * 3.1415926 * %data.projectileSpread;
%y = (getRandom() - 0.5) * 2 * 3.1415926 * %data.projectileSpread;
%z = (getRandom() - 0.5) * 2 * 3.1415926 * %data.projectileSpread;
%mat = MatrixCreateFromEuler(%x @ " " @ %y @ " " @ %z);
%newvector = MatrixMulVector(%mat, %vector);
%p = new (%data.projectileType)() {
dataBlock = %data.projectile;
initialDirection = %newvector;
initialPosition = %mp;
sourceObject = %obj;
damageFactor = 1;
sourceSlot = %slot;
};
%p.ImageSource = "PistolImage";
%p.WeaponImageSource = "PistolImage";
%p = new (%data.projectileType)() {
dataBlock = %data.projectile;
initialDirection = %newvector;
initialPosition = %mp;
sourceObject = %obj;
damageFactor = 1;
sourceSlot = %slot;
};
%p.ImageSource = "PistolImage";
%p.WeaponImageSource = "PistolImage";
}

View file

@ -2,203 +2,199 @@
// Projectile
//--------------------------------------------------------------------------
datablock TracerProjectileData(CHawkBullet) {
doDynamicClientHits = true;
doDynamicClientHits = true;
directDamage = 0.23; //reduced 0.5
directDamageType = $DamageType::Hawk; //obviously change this
directDamage = 0.17;
directDamageType = $DamageType::CrimsonHawk; //obviously change this
explosion = "BlasterExplosion";
splash = ChaingunSplash;
explosion = "BlasterExplosion";
splash = ChaingunSplash;
sound = ShrikeBlasterProjectileSound;
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;
ImageSource = "CrimsonHawkImage";
dryVelocity = 425.0;
wetVelocity = 100.0;
velInheritFactor = 1.0;
fizzleTimeMS = 500;
lifetimeMS = 700;
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 1.0";
ImageSource = "CrimsonHawkImage";
tracerLength = 45.0;
tracerAlpha = false;
tracerMinPixels = 6;
tracerColor = "1.0 0.0 0.0 1.0";
tracerTex[0] = "special/shrikeBolt";
tracerTex[1] = "special/shrikeBoltCross";
tracerWidth = 0.55;
crossSize = 0.99;
crossViewAng = 0.990;
renderCross = true;
crossSize = 0.99;
crossViewAng = 0.990;
renderCross = true;
};
datablock ItemData(CrimsonHawkAmmo)
{
className = Ammo;
catagory = "Ammo";
shapeFile = "ammo_chaingun.dts";
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
datablock ItemData(CrimsonHawkAmmo) {
className = Ammo;
catagory = "Ammo";
shapeFile = "ammo_chaingun.dts";
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "some .77mm bullets";
computeCRC = true;
computeCRC = true;
};
datablock ItemData(CrimsonHawk) {
className = Weapon;
catagory = "Spawn Items";
shapeFile = "weapon_energy_vehicle.dts";
image = CrimsonHawkImage;
mass = 2;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "a CrimsonHawk Pistol";
className = Weapon;
catagory = "Spawn Items";
shapeFile = "weapon_energy_vehicle.dts";
image = CrimsonHawkImage;
mass = 2;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "a Crimson Hawk Pistol";
};
datablock ShapeBaseImageData(CrimsonHawkImage)
{
className = WeaponImage;
shapeFile = "weapon_energy_vehicle.dts";
item = CrimsonHawk;
offset = "0 0 0";
rotation = "0 1 0 180";
mass = 4;
datablock ShapeBaseImageData(CrimsonHawkImage) {
className = WeaponImage;
shapeFile = "weapon_energy_vehicle.dts";
item = CrimsonHawk;
offset = "0 0 0";
rotation = "0 1 0 180";
mass = 4;
ammo = CrimsonHawkAmmo;
ammo = CrimsonHawkAmmo;
projectile = CHawkBullet;
projectileType = tracerProjectile;
projectileSpread = 5.0 / 1000.0;
//ClipStuff
ClipName = "CrimsonHawkClip";
ClipPickupName["CrimsonHawkClip"] = "Some .77MM Clips";
ShowsClipInHud = 0;
ClipReloadTime = 4;
ClipReturn = 15;
InitialClips = 950;
HellClipCount = 10;
//
//RankRequire = $TWM2::RankRequire["CrimsonHawk"];
PrestigeRequire = 5;
//Challenges
HasChallenges = 1;
ChallengeCt = 9;
Challenge[1] = "Crimson Hawk Novice\t25\t100\tNone";
Challenge[2] = "Crimson Hawk Hunter\t50\t150\tGrip";
Challenge[3] = "Crimson Hawk Expert\t100\t250\tLaser";
Challenge[4] = "Crimson Hawk Master\t250\t500\tSilencer";
Challenge[5] = "Crimson Hawk God\t500\t1000\tNone";
Challenge[6] = "Crimson Hawk Bronze Commendation\t2500\t10000\tNone";
Challenge[7] = "Crimson Hawk Silver Commendation\t7500\t25000\tNone";
Challenge[8] = "Crimson Hawk Gold Commendation\t25000\t50000\tNone";
Challenge[9] = "Crimson Hawk Titan Commendation\t50000\t75000\tNone";
Upgrade[1] = "Grip";
Upgrade[2] = "Laser";
Upgrade[3] = "Silencer";
GunName = "Crimson Hawk";
//
projectile = CHawkBullet;
projectileType = tracerProjectile;
projectileSpread = 5.0 / 1000.0;
stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "ActivateReady";
stateTimeoutValue[0] = 0.5;
stateSequence[0] = "Activate";
stateSound[0] = PlasmaSwitchSound;
//ClipStuff
ClipName = "CrimsonHawkClip";
ClipPickupName["CrimsonHawkClip"] = "Some .77MM Clips";
ShowsClipInHud = 0;
ClipReloadTime = 4;
ClipReturn = 15;
InitialClips = 950;
HellClipCount = 10;
//
stateName[1] = "ActivateReady";
stateTransitionOnLoaded[1] = "Ready";
stateTransitionOnNoAmmo[1] = "NoAmmo";
//RankRequire = $TWM2::RankRequire["CrimsonHawk"];
PrestigeRequire = 5;
stateName[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTransitionOnTriggerDown[2] = "Fire";
//Challenges
HasChallenges = 1;
ChallengeCt = 9;
Challenge[1] = "Crimson Hawk Novice\t25\t100\tNone";
Challenge[2] = "Crimson Hawk Hunter\t50\t150\tGrip";
Challenge[3] = "Crimson Hawk Expert\t100\t250\tLaser";
Challenge[4] = "Crimson Hawk Master\t250\t500\tSilencer";
Challenge[5] = "Crimson Hawk God\t500\t1000\tNone";
Challenge[6] = "Crimson Hawk Bronze Commendation\t2500\t10000\tNone";
Challenge[7] = "Crimson Hawk Silver Commendation\t7500\t25000\tNone";
Challenge[8] = "Crimson Hawk Gold Commendation\t25000\t50000\tNone";
Challenge[9] = "Crimson Hawk Titan Commendation\t50000\t75000\tNone";
Upgrade[1] = "Grip";
Upgrade[2] = "Laser";
Upgrade[3] = "Silencer";
GunName = "Crimson Hawk";
//
stateName[3] = "Fire";
stateTransitionOnTimeout[3] = "Fire2";
stateTimeoutValue[3] = 0.1;
stateFire[3] = true;
stateRecoil[3] = LightRecoil;
stateAllowImageChange[3] = false;
stateScript[3] = "onFire";
stateEmitterTime[3] = 0.1;
stateName[4] = "Fire2";
stateTransitionOnTimeout[4] = "Fire3";
stateTimeoutValue[4] = 0.1;
stateFire[4] = true;
stateRecoil[4] = LightRecoil;
stateAllowImageChange[4] = false;
stateScript[4] = "onFire";
stateEmitterTime[4] = 0.1;
stateName[5] = "Fire3";
stateTransitionOnTimeout[5] = "Fire4";
stateTimeoutValue[5] = 0.1;
stateFire[5] = true;
stateRecoil[5] = LightRecoil;
stateAllowImageChange[5] = false;
stateScript[5] = "onFire";
stateEmitterTime[5] = 0.1;
stateName[6] = "Fire4";
stateTransitionOnTimeout[6] = "Fire5";
stateTimeoutValue[6] = 0.1;
stateFire[6] = true;
stateRecoil[6] = LightRecoil;
stateAllowImageChange[6] = false;
stateScript[6] = "onFire";
stateEmitterTime[6] = 0.1;
stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "ActivateReady";
stateTimeoutValue[0] = 0.5;
stateSequence[0] = "Activate";
stateSound[0] = PlasmaSwitchSound;
stateName[7] = "Fire5";
stateTransitionOnTimeout[7] = "Reload";
stateTimeoutValue[7] = 0.1;
stateFire[7] = true;
stateRecoil[7] = LightRecoil;
stateAllowImageChange[7] = false;
stateScript[7] = "onFire";
stateEmitterTime[7] = 0.1;
//stateSound[3] = PistolFireSound;
stateName[1] = "ActivateReady";
stateTransitionOnLoaded[1] = "Ready";
stateTransitionOnNoAmmo[1] = "NoAmmo";
stateName[8] = "Reload";
stateTransitionOnNoAmmo[8] = "NoAmmo";
stateTransitionOnTimeout[8] = "Ready";
stateTimeoutValue[8] = 0.1;
stateAllowImageChange[8] = false;
stateSequence[8] = "Reload";
stateName[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTransitionOnTriggerDown[2] = "Fire";
stateName[9] = "NoAmmo";
stateTransitionOnAmmo[9] = "Reload";
stateSequence[9] = "NoAmmo";
stateTransitionOnTriggerDown[9] = "DryFire";
stateName[3] = "Fire";
stateTransitionOnTimeout[3] = "Fire2";
stateTimeoutValue[3] = 0.1;
stateFire[3] = true;
stateRecoil[3] = LightRecoil;
stateAllowImageChange[3] = false;
stateScript[3] = "onFire";
stateEmitterTime[3] = 0.1;
stateName[10] = "DryFire";
stateSound[10] = ChaingunDryFireSound;
stateTimeoutValue[10] = 1.5;
stateTransitionOnTimeout[10] = "NoAmmo";
stateName[4] = "Fire2";
stateTransitionOnTimeout[4] = "Fire3";
stateTimeoutValue[4] = 0.1;
stateFire[4] = true;
stateRecoil[4] = LightRecoil;
stateAllowImageChange[4] = false;
stateScript[4] = "onFire";
stateEmitterTime[4] = 0.1;
stateName[5] = "Fire3";
stateTransitionOnTimeout[5] = "Fire4";
stateTimeoutValue[5] = 0.1;
stateFire[5] = true;
stateRecoil[5] = LightRecoil;
stateAllowImageChange[5] = false;
stateScript[5] = "onFire";
stateEmitterTime[5] = 0.1;
stateName[6] = "Fire4";
stateTransitionOnTimeout[6] = "Fire5";
stateTimeoutValue[6] = 0.1;
stateFire[6] = true;
stateRecoil[6] = LightRecoil;
stateAllowImageChange[6] = false;
stateScript[6] = "onFire";
stateEmitterTime[6] = 0.1;
stateName[7] = "Fire5";
stateTransitionOnTimeout[7] = "Reload";
stateTimeoutValue[7] = 0.1;
stateFire[7] = true;
stateRecoil[7] = LightRecoil;
stateAllowImageChange[7] = false;
stateScript[7] = "onFire";
stateEmitterTime[7] = 0.1;
//stateSound[3] = PistolFireSound;
stateName[8] = "Reload";
stateTransitionOnNoAmmo[8] = "NoAmmo";
stateTransitionOnTimeout[8] = "Ready";
stateTimeoutValue[8] = 0.1;
stateAllowImageChange[8] = false;
stateSequence[8] = "Reload";
stateName[9] = "NoAmmo";
stateTransitionOnAmmo[9] = "Reload";
stateSequence[9] = "NoAmmo";
stateTransitionOnTriggerDown[9] = "DryFire";
stateName[10] = "DryFire";
stateSound[10] = ChaingunDryFireSound;
stateTimeoutValue[10] = 1.5;
stateTransitionOnTimeout[10] = "NoAmmo";
};
function CrimsonHawkImage::onMount(%this,%obj,%slot) {
Parent::onMount(%this, %obj, %slot);
Parent::onMount(%this, %obj, %slot);
}
function CrimsonHawkImage::onFire(%data, %obj, %slot) {
%p = Parent::onFire(%data, %obj, %slot);
if(%obj.client.UpgradeOn("Silencer", %data.getName())) {
//zero sound :p
}
else {
ServerPlay3d(PistolFireSound, %obj.getPosition());
}
%p = Parent::onFire(%data, %obj, %slot);
if(%obj.client.UpgradeOn("Silencer", %data.getName())) {
//zero sound :p
}
else {
ServerPlay3d(PistolFireSound, %obj.getPosition());
}
}

View file

@ -1,163 +1,161 @@
datablock ItemData(LD06SavagerAmmo) {
className = Ammo;
catagory = "Ammo";
shapeFile = "ammo_chaingun.dts";
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
className = Ammo;
catagory = "Ammo";
shapeFile = "ammo_chaingun.dts";
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "some LD06Savager rounds";
computeCRC = true;
computeCRC = true;
};
//--------------------------------------------------------------------------
// Weapon
//--------------------------------------
datablock ShapeBaseImageData(LD06SavagerImage) {
className = WeaponImage;
shapeFile = "weapon_plasma.dts";
item = LD06Savager;
ammo = LD06SavagerAmmo;
projectile = Wp400Pellet;
projectileType = TracerProjectile;
emap = true;
mass = 20;
className = WeaponImage;
shapeFile = "weapon_plasma.dts";
item = LD06Savager;
ammo = LD06SavagerAmmo;
projectile = Wp400Pellet;
projectileType = TracerProjectile;
emap = true;
mass = 20;
casing = ShellDebris;
shellExitDir = "0.5 0.0 1.0"; // L/R - F/B - T/B
shellExitOffset = "0.15 -0.51 -0.1"; // L/R - F/B - T/B
shellExitVariance = 10.0;
shellVelocity = 4.0;
casing = ShellDebris;
shellExitDir = "0.5 0.0 1.0"; // L/R - F/B - T/B
shellExitOffset = "0.15 -0.51 -0.1"; // L/R - F/B - T/B
shellExitVariance = 10.0;
shellVelocity = 4.0;
//ClipStuff
ClipName = "LD06SavagerClip";
ClipPickupName["LD06SavagerClip"] = "some LD06Savager Clip Boxes";
ShowsClipInHud = 0;
ClipReloadTime = 5;
ClipReturn = 10;
InitialClips = 999;
HellClipCount = 7;
//
HasChallenges = 1;
ChallengeCt = 8;
Challenge[1] = "LD06 Killer\t50\t100\tNone";
Challenge[2] = "LD06 Expert\t100\t250\tNone";
Challenge[3] = "LD06 Master\t250\t500\tNone";
Challenge[4] = "LD06 God\t500\t1000\tSilencer";
Challenge[5] = "LD06 Bronze Commendation\t1000\t10000\tNone";
Challenge[6] = "LD06 Silver Commendation\t2500\t25000\tNone";
Challenge[7] = "LD06 Gold Commendation\t5000\t50000\tNone";
Challenge[8] = "LD06 Titan Commendation\t15000\t75000\tNone";
Upgrade[1] = "Silencer";
GunName = "LD06 Savager";
MedalRequire = 1;
//ClipStuff
ClipName = "LD06SavagerClip";
ClipPickupName["LD06SavagerClip"] = "some LD06Savager Clip Boxes";
ShowsClipInHud = 0;
ClipReloadTime = 5;
ClipReturn = 10;
InitialClips = 999;
HellClipCount = 7;
//
HasChallenges = 1;
ChallengeCt = 8;
Challenge[1] = "LD06 Killer\t50\t100\tNone";
Challenge[2] = "LD06 Expert\t100\t250\tNone";
Challenge[3] = "LD06 Master\t250\t500\tNone";
Challenge[4] = "LD06 God\t500\t1000\tSilencer";
Challenge[5] = "LD06 Bronze Commendation\t1000\t10000\tNone";
Challenge[6] = "LD06 Silver Commendation\t2500\t25000\tNone";
Challenge[7] = "LD06 Gold Commendation\t5000\t50000\tNone";
Challenge[8] = "LD06 Titan Commendation\t15000\t75000\tNone";
Upgrade[1] = "Silencer";
GunName = "LD06 Savager";
projectileSpread = 10.0 / 1000.0;
stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "ActivateReady";
stateTimeoutValue[0] = 0.3;
stateSequence[0] = "Activate";
stateSound[0] = ChaingunSwitchSound;
MedalRequire = 1;
stateName[1] = "ActivateReady";
stateTransitionOnLoaded[1] = "Ready";
stateTransitionOnNoAmmo[1] = "NoAmmo";
stateName[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTransitionOnTriggerDown[2] = "CheckWet";
projectileSpread = 10.0 / 1000.0;
stateName[3] = "Fire";
stateTransitionOnTimeout[3] = "Reload";
stateTimeoutValue[3] = 0.0001;
stateFire[3] = true;
stateEjectShell[3] = true;
stateRecoil[3] = LightRecoil;
stateAllowImageChange[3] = false;
stateScript[3] = "onFire";
stateSound[3] = SniperFireSound;
stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "ActivateReady";
stateTimeoutValue[0] = 0.3;
stateSequence[0] = "Activate";
stateSound[0] = ChaingunSwitchSound;
stateName[4] = "Reload";
stateTransitionOnNoAmmo[4] = "NoAmmo";
stateTransitionOnTimeout[4] = "Ready";
stateTimeoutValue[4] = 0.6;
stateAllowImageChange[4] = false;
stateSequence[4] = "Reload";
stateName[1] = "ActivateReady";
stateTransitionOnLoaded[1] = "Ready";
stateTransitionOnNoAmmo[1] = "NoAmmo";
stateName[5] = "NoAmmo";
stateTransitionOnAmmo[5] = "Reload";
stateSequence[5] = "NoAmmo";
stateTransitionOnTriggerDown[5] = "DryFire";
stateName[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTransitionOnTriggerDown[2] = "CheckWet";
stateName[6] = "DryFire";
stateSound[6] = ChaingunDryFireSound;
stateTimeoutValue[6] = 1.0;
stateTransitionOnTimeout[6] = "NoAmmo";
stateName[3] = "Fire";
stateTransitionOnTimeout[3] = "Reload";
stateTimeoutValue[3] = 0.0001;
stateFire[3] = true;
stateEjectShell[3] = true;
stateRecoil[3] = LightRecoil;
stateAllowImageChange[3] = false;
stateScript[3] = "onFire";
stateSound[3] = SniperFireSound;
stateName[7] = "WetFire";
stateSound[7] = ChaingunDryFireSound;
stateTimeoutValue[7] = 1.0;
stateTransitionOnTimeout[7] = "Ready";
stateName[4] = "Reload";
stateTransitionOnNoAmmo[4] = "NoAmmo";
stateTransitionOnTimeout[4] = "Ready";
stateTimeoutValue[4] = 0.6;
stateAllowImageChange[4] = false;
stateSequence[4] = "Reload";
stateName[8] = "CheckWet";
stateTransitionOnWet[8] = "WetFire";
stateTransitionOnNotWet[8] = "Fire";
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] = ChaingunDryFireSound;
stateTimeoutValue[7] = 1.0;
stateTransitionOnTimeout[7] = "Ready";
stateName[8] = "CheckWet";
stateTransitionOnWet[8] = "WetFire";
stateTransitionOnNotWet[8] = "Fire";
};
datablock ItemData(LD06Savager)
{
className = Weapon;
catagory = "Spawn Items";
shapeFile = "weapon_plasma.dts";
image = LD06SavagerImage;
mass = 1.0;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "a LD06Savager";
datablock ItemData(LD06Savager) {
className = Weapon;
catagory = "Spawn Items";
shapeFile = "weapon_plasma.dts";
image = LD06SavagerImage;
mass = 1.0;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "a LD06Savager";
computeCRC = true;
emap = true;
computeCRC = true;
emap = true;
};
function LD06SavagerImage::onMount(%this,%obj,%slot) {
Parent::onMount(%this, %obj, %slot);
function LD06SavagerImage::onMount(%this, %obj, %slot) {
Parent::onMount(%this, %obj, %slot);
}
function LD06SavagerImage::onFire(%data,%obj,%slot) {
%obj.applyKick(-250);
%obj.decInventory(%data.ammo,1);
serverPlay3D(ShotgunFireSound, %obj.getPosition());
%obj.applyKick(-250);
%obj.decInventory(%data.ammo,1);
%vector = %obj.getMuzzleVector(%slot);
%mp = %obj.getMuzzlePoint(%slot);
serverPlay3D(ShotgunFireSound, %obj.getPosition());
%vector = %obj.getMuzzleVector(%slot);
%mp = %obj.getMuzzlePoint(%slot);
for (%i=0; %i < 5; %i++) {
%x = (getRandom() - 0.5) * 2 * 3.1415926 * %data.projectileSpread;
%y = (getRandom() - 0.5) * 2 * 3.1415926 * %data.projectileSpread;
%z = (getRandom() - 0.5) * 2 * 3.1415926 * %data.projectileSpread;
%mat = MatrixCreateFromEuler(%x @ " " @ %y @ " " @ %z);
%newvector = MatrixMulVector(%mat, %vector);
%x = (getRandom() - 0.5) * 2 * 3.1415926 * %data.projectileSpread;
%y = (getRandom() - 0.5) * 2 * 3.1415926 * %data.projectileSpread;
%z = (getRandom() - 0.5) * 2 * 3.1415926 * %data.projectileSpread;
%mat = MatrixCreateFromEuler(%x @ " " @ %y @ " " @ %z);
%newvector = MatrixMulVector(%mat, %vector);
%p = new (%data.projectileType)() {
dataBlock = %data.projectile;
initialDirection = %newvector;
initialPosition = %mp;
sourceObject = %obj;
damageFactor = 1;
sourceSlot = %slot;
};
%p.WeaponImageSource = %data.getName();
%p.ImageSource = "LD06SavagerImage";
}
if(%obj.inv[LD06SavagerAmmo] == 0) { //Added Phantom139, TWM2
AttemptReload(%data, %obj, %slot);
}
%p = new (%data.projectileType)() {
dataBlock = %data.projectile;
initialDirection = %newvector;
initialPosition = %mp;
sourceObject = %obj;
damageFactor = 1;
sourceSlot = %slot;
};
%p.WeaponImageSource = %data.getName();
%p.ImageSource = "LD06SavagerImage";
}
if(%obj.inv[LD06SavagerAmmo] == 0) { //Added Phantom139, TWM2
AttemptReload(%data, %obj, %slot);
}
}

View file

@ -3,195 +3,192 @@
//--------------------------------------------------------------------------
datablock TracerProjectileData(m93Bullet) {
doDynamicClientHits = true;
doDynamicClientHits = true;
directDamage = 0.22; // reduced .26
directDamageType = $DamageType::m93;
explosion = "ChaingunExplosion";
splash = ChaingunSplash;
HeadMultiplier = 1.5;
LegsMultiplier = 0.5;
directDamage = 0.22; // reduced .26
directDamageType = $DamageType::M93;
explosion = "ChaingunExplosion";
splash = ChaingunSplash;
HeadMultiplier = 1.5;
LegsMultiplier = 0.5;
kickBackStrength = 5.0;
sound = ChaingunProjectile;
ImageSource = "m93Image";
kickBackStrength = 5.0;
sound = ChaingunProjectile;
//dryVelocity = 425.0;
dryVelocity = 2000.0; // z0dd - ZOD, 8-12-02. Was 425.0
wetVelocity = 1750.0;
velInheritFactor = 0.0;
fizzleTimeMS = 3000;
lifetimeMS = 3000;
explodeOnDeath = false;
reflectOnWaterImpactAngle = 0.0;
explodeOnWaterImpact = false;
deflectionOnWaterImpact = 0.0;
fizzleUnderwaterMS = 3000;
ImageSource = "m93Image";
tracerLength = 25.0;
tracerAlpha = false;
tracerMinPixels = 6;
tracerColor = 211.0/255.0 @ " " @ 215.0/255.0 @ " " @ 120.0/255.0 @ " 0.75";
//dryVelocity = 425.0;
dryVelocity = 2000.0; // z0dd - ZOD, 8-12-02. Was 425.0
wetVelocity = 1750.0;
velInheritFactor = 0.0;
fizzleTimeMS = 3000;
lifetimeMS = 3000;
explodeOnDeath = false;
reflectOnWaterImpactAngle = 0.0;
explodeOnWaterImpact = false;
deflectionOnWaterImpact = 0.0;
fizzleUnderwaterMS = 3000;
tracerLength = 25.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;
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;
decalData[0] = ChaingunDecal1;
decalData[1] = ChaingunDecal2;
decalData[2] = ChaingunDecal3;
decalData[3] = ChaingunDecal4;
decalData[4] = ChaingunDecal5;
decalData[5] = ChaingunDecal6;
};
datablock ItemData(m93Ammo)
{
className = Ammo;
catagory = "Ammo";
shapeFile = "ammo_chaingun.dts";
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
datablock ItemData(m93Ammo) {
className = Ammo;
catagory = "Ammo";
shapeFile = "ammo_chaingun.dts";
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "some .77mm bullets";
computeCRC = true;
computeCRC = true;
};
datablock ItemData(m93) {
className = Weapon;
catagory = "Spawn Items";
shapeFile = "weapon_energy_vehicle.dts";
image = m93Image;
mass = 2;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "a m93 Pistol";
className = Weapon;
catagory = "Spawn Items";
shapeFile = "weapon_energy_vehicle.dts";
image = m93Image;
mass = 2;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "a m93 Pistol";
};
datablock ShapeBaseImageData(m93Image)
{
className = WeaponImage;
shapeFile = "weapon_energy_vehicle.dts";
item = m93;
offset = "0 0 0";
rotation = "0 1 0 180";
mass = 4;
datablock ShapeBaseImageData(m93Image) {
className = WeaponImage;
shapeFile = "weapon_energy_vehicle.dts";
item = m93;
offset = "0 0 0";
rotation = "0 1 0 180";
mass = 4;
ammo = m93Ammo;
ammo = m93Ammo;
projectile = m93bullet;
projectileType = tracerProjectile;
projectileSpread = 6.0 / 1000.0;
//ClipStuff
ClipName = "m93Clip";
ClipPickupName["m93Clip"] = "Some .77MM Clips";
ShowsClipInHud = 0;
ClipReloadTime = 4;
ClipReturn = 15;
InitialClips = 950;
HellClipCount = 10;
//
RankRequire = $TWM2::RankRequire["ALSWP"];
PrestigeRequire = 2;
//Challenges
HasChallenges = 1;
ChallengeCt = 9;
Challenge[1] = "m93 Novice\t25\t100\tNone";
Challenge[2] = "m93 Hunter\t50\t150\tGrip";
Challenge[3] = "m93 Expert\t100\t250\tLaser";
Challenge[4] = "m93 Master\t250\t500\tSilencer";
Challenge[5] = "m93 God\t500\t1000\tHSBullets";
Challenge[6] = "m93 Bronze Commendation\t1000\t10000\tNone";
Challenge[7] = "m93 Silver Commendation\t2500\t25000\tNone";
Challenge[8] = "m93 Gold Commendation\t5000\t50000\tNone";
Challenge[9] = "m93 Titan Commendation\t15000\t75000\tNone";
Upgrade[1] = "Grip";
Upgrade[2] = "Laser";
Upgrade[3] = "Silencer";
Upgrade[4] = "HSBullets";
GunName = "M93 Pistol";
//
projectile = m93bullet;
projectileType = tracerProjectile;
projectileSpread = 6.0 / 1000.0;
stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "ActivateReady";
stateTimeoutValue[0] = 0.5;
stateSequence[0] = "Activate";
stateSound[0] = PlasmaSwitchSound;
//ClipStuff
ClipName = "m93Clip";
ClipPickupName["m93Clip"] = "Some .77MM Clips";
ShowsClipInHud = 0;
ClipReloadTime = 4;
ClipReturn = 15;
InitialClips = 950;
HellClipCount = 10;
//
stateName[1] = "ActivateReady";
stateTransitionOnLoaded[1] = "Ready";
stateTransitionOnNoAmmo[1] = "NoAmmo";
RankRequire = $TWM2::RankRequire["ALSWP"];
PrestigeRequire = 2;
stateName[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTransitionOnTriggerDown[2] = "Fire";
//Challenges
HasChallenges = 1;
ChallengeCt = 9;
Challenge[1] = "m93 Novice\t25\t100\tNone";
Challenge[2] = "m93 Hunter\t50\t150\tGrip";
Challenge[3] = "m93 Expert\t100\t250\tLaser";
Challenge[4] = "m93 Master\t250\t500\tSilencer";
Challenge[5] = "m93 God\t500\t1000\tHSBullets";
Challenge[6] = "m93 Bronze Commendation\t1000\t10000\tNone";
Challenge[7] = "m93 Silver Commendation\t2500\t25000\tNone";
Challenge[8] = "m93 Gold Commendation\t5000\t50000\tNone";
Challenge[9] = "m93 Titan Commendation\t15000\t75000\tNone";
Upgrade[1] = "Grip";
Upgrade[2] = "Laser";
Upgrade[3] = "Silencer";
Upgrade[4] = "HSBullets";
GunName = "M93 Pistol";
//
stateName[3] = "Fire";
stateTransitionOnTimeout[3] = "Fire2";
stateTimeoutValue[3] = 0.1;
stateFire[3] = true;
stateRecoil[3] = LightRecoil;
stateAllowImageChange[3] = false;
stateScript[3] = "onFire";
stateEmitterTime[3] = 0.1;
stateName[4] = "Fire2";
stateTransitionOnTimeout[4] = "Fire3";
stateTimeoutValue[4] = 0.1;
stateFire[4] = true;
stateRecoil[4] = LightRecoil;
stateAllowImageChange[4] = false;
stateScript[4] = "onFire";
stateEmitterTime[4] = 0.1;
stateName[5] = "Fire3";
stateTransitionOnTimeout[5] = "Reload";
stateTimeoutValue[5] = 0.1;
stateFire[5] = true;
stateRecoil[5] = LightRecoil;
stateAllowImageChange[5] = false;
stateScript[5] = "onFire";
stateEmitterTime[5] = 0.1;
//stateSound[3] = PistolFireSound;
stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "ActivateReady";
stateTimeoutValue[0] = 0.5;
stateSequence[0] = "Activate";
stateSound[0] = PlasmaSwitchSound;
stateName[6] = "Reload";
stateTransitionOnNoAmmo[6] = "NoAmmo";
stateTransitionOnTimeout[6] = "Ready";
stateTimeoutValue[6] = 0.1;
stateAllowImageChange[6] = false;
stateSequence[6] = "Reload";
stateName[1] = "ActivateReady";
stateTransitionOnLoaded[1] = "Ready";
stateTransitionOnNoAmmo[1] = "NoAmmo";
stateName[7] = "NoAmmo";
stateTransitionOnAmmo[7] = "Reload";
stateSequence[7] = "NoAmmo";
stateTransitionOnTriggerDown[7] = "DryFire";
stateName[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTransitionOnTriggerDown[2] = "Fire";
stateName[8] = "DryFire";
stateSound[8] = ChaingunDryFireSound;
stateTimeoutValue[8] = 1.5;
stateTransitionOnTimeout[8] = "NoAmmo";
stateName[3] = "Fire";
stateTransitionOnTimeout[3] = "Fire2";
stateTimeoutValue[3] = 0.1;
stateFire[3] = true;
stateRecoil[3] = LightRecoil;
stateAllowImageChange[3] = false;
stateScript[3] = "onFire";
stateEmitterTime[3] = 0.1;
stateName[4] = "Fire2";
stateTransitionOnTimeout[4] = "Fire3";
stateTimeoutValue[4] = 0.1;
stateFire[4] = true;
stateRecoil[4] = LightRecoil;
stateAllowImageChange[4] = false;
stateScript[4] = "onFire";
stateEmitterTime[4] = 0.1;
stateName[5] = "Fire3";
stateTransitionOnTimeout[5] = "Reload";
stateTimeoutValue[5] = 0.1;
stateFire[5] = true;
stateRecoil[5] = LightRecoil;
stateAllowImageChange[5] = false;
stateScript[5] = "onFire";
stateEmitterTime[5] = 0.1;
//stateSound[3] = PistolFireSound;
stateName[6] = "Reload";
stateTransitionOnNoAmmo[6] = "NoAmmo";
stateTransitionOnTimeout[6] = "Ready";
stateTimeoutValue[6] = 0.1;
stateAllowImageChange[6] = false;
stateSequence[6] = "Reload";
stateName[7] = "NoAmmo";
stateTransitionOnAmmo[7] = "Reload";
stateSequence[7] = "NoAmmo";
stateTransitionOnTriggerDown[7] = "DryFire";
stateName[8] = "DryFire";
stateSound[8] = ChaingunDryFireSound;
stateTimeoutValue[8] = 1.5;
stateTransitionOnTimeout[8] = "NoAmmo";
};
function m93Image::onMount(%this,%obj,%slot) {
Parent::onMount(%this, %obj, %slot);
Parent::onMount(%this, %obj, %slot);
}
function m93Image::onFire(%data, %obj, %slot) {
%p = Parent::onFire(%data, %obj, %slot);
if(%obj.client.UpgradeOn("Silencer", %data.getName())) {
//zero sound :p
}
else {
ServerPlay3d(PistolFireSound, %obj.getPosition());
}
%p = Parent::onFire(%data, %obj, %slot);
if(%obj.client.UpgradeOn("Silencer", %data.getName())) {
//zero sound :p
}
else {
ServerPlay3d(PistolFireSound, %obj.getPosition());
}
}

View file

@ -1,247 +1,245 @@
// Pulse Phaser Weapon
datablock AudioProfile(PPWFireSound)
{
filename = "fx/powered/turret_outdoor_fire.wav";
description = AudioDefault3d;
preload = true;
datablock AudioProfile(PPWFireSound) {
filename = "fx/powered/turret_outdoor_fire.wav";
description = AudioDefault3d;
preload = true;
};
datablock LinearFlareProjectileData(phaserBolt) {
directDamage = 0.2; //reduced 0.45
directDamageType = $DamageType::Phaser;
explosion = "BlasterExplosion";
kickBackStrength = 0.0;
directDamage = 0.26;
directDamageType = $DamageType::ES77PulsePhaser;
explosion = "BlasterExplosion";
kickBackStrength = 0.0;
dryVelocity = 120.0;
wetVelocity = 40.0;
velInheritFactor = 0.5;
fizzleTimeMS = 2000;
lifetimeMS = 3000;
explodeOnDeath = false;
reflectOnWaterImpactAngle = 0.0;
explodeOnWaterImpact = false;
deflectionOnWaterImpact = 0.0;
fizzleUnderwaterMS = 3000;
ImageSource = "PulsePhaserImage";
dryVelocity = 160.0;
wetVelocity = 40.0;
velInheritFactor = 0.5;
fizzleTimeMS = 1300;
lifetimeMS = 1500;
explodeOnDeath = false;
reflectOnWaterImpactAngle = 0.0;
explodeOnWaterImpact = false;
deflectionOnWaterImpact = 0.0;
fizzleUnderwaterMS = 3000;
numFlares = 20;
size = 0.10;
flareColor = "0 1 0";
flareModTexture = "flaremod";
flareBaseTexture = "flarebase";
ImageSource = "PulsePhaserImage";
sound = BlasterProjectileSound;
numFlares = 20;
size = 0.10;
flareColor = "0 1 0";
flareModTexture = "flaremod";
flareBaseTexture = "flarebase";
hasLight = true;
lightRadius = 3.0;
lightColor = "1 1 1";
sound = BlasterProjectileSound;
hasLight = true;
lightRadius = 3.0;
lightColor = "1 1 1";
};
datablock LinearFlareProjectileData(TrevorPhaserBolt) {
directDamage = 0.21; //reduced .485
directDamageType = $DamageType::Phaser;
explosion = "BlasterExplosion";
kickBackStrength = 0.0;
directDamage = 0.3;
directDamageType = $DamageType::ES77PulsePhaser;
explosion = "BlasterExplosion";
kickBackStrength = 0.0;
dryVelocity = 120.0;
wetVelocity = 40.0;
velInheritFactor = 0.5;
fizzleTimeMS = 2000;
lifetimeMS = 3000;
explodeOnDeath = false;
reflectOnWaterImpactAngle = 0.0;
explodeOnWaterImpact = false;
deflectionOnWaterImpact = 0.0;
fizzleUnderwaterMS = 3000;
dryVelocity = 160.0;
wetVelocity = 40.0;
velInheritFactor = 0.5;
fizzleTimeMS = 1300;
lifetimeMS = 1500;
explodeOnDeath = false;
reflectOnWaterImpactAngle = 0.0;
explodeOnWaterImpact = false;
deflectionOnWaterImpact = 0.0;
fizzleUnderwaterMS = 3000;
ImageSource = "PulsePhaserImage";
ImageSource = "PulsePhaserImage";
numFlares = 20;
size = 0.10;
flareColor = "0.5 0.1 0.9";
flareModTexture = "flaremod";
flareBaseTexture = "flarebase";
numFlares = 20;
size = 0.10;
flareColor = "0.5 0.1 0.9";
flareModTexture = "flaremod";
flareBaseTexture = "flarebase";
sound = BlasterProjectileSound;
sound = BlasterProjectileSound;
hasLight = true;
lightRadius = 3.0;
lightColor = "1 1 1";
hasLight = true;
lightRadius = 3.0;
lightColor = "1 1 1";
};
datablock ShapeBaseImageData(PulsePhaserImage) {
className = WeaponImage;
shapeFile = "weapon_energy.dts";
item = PulsePhaser;
projectile = phaserBolt;
projectileType = LinearFlareProjectile;
HasChallenges = 1;
ChallengeCt = 10;
Challenge[1] = "Phaser Killer\t50\t100\tNone";
Challenge[2] = "Phaser Hunter\t150\t250\tNone";
Challenge[3] = "Phaser Expert\t250\t500\tLaser";
Challenge[4] = "Phaser Master\t500\t1000\tTriple Burst";
Challenge[5] = "Phaser God\t1000\t2000\tShotgun";
Challenge[6] = "Phaser Legend\t1500\t5000\tPhaser Blades";
Challenge[7] = "Phaser Bronze Commendation\t3000\t10000\tNone";
Challenge[8] = "Phaser Silver Commendation\t6000\t25000\tNone";
Challenge[9] = "Phaser Gold Commendation\t12500\t50000\tNone";
Challenge[10] = "Phaser Titan Commendation\t35000\t75000\tNone";
Upgrade[1] = "Laser";
Upgrade[2] = "Triple Burst";
Upgrade[3] = "Shotgun";
Upgrade[4] = "Phaser Blades";
GunName = "ES-77 Pulse Phaser";
className = WeaponImage;
shapeFile = "weapon_energy.dts";
item = PulsePhaser;
projectile = phaserBolt;
projectileType = LinearFlareProjectile;
RankRequire = $TWM2::RankRequire["PulsePhaser"];
HasChallenges = 1;
ChallengeCt = 10;
Challenge[1] = "Phaser Killer\t50\t100\tNone";
Challenge[2] = "Phaser Hunter\t150\t250\tNone";
Challenge[3] = "Phaser Expert\t250\t500\tLaser";
Challenge[4] = "Phaser Master\t500\t1000\tTriple Burst";
Challenge[5] = "Phaser God\t1000\t2000\tShotgun";
Challenge[6] = "Phaser Legend\t1500\t5000\tPhaser Blades";
Challenge[7] = "Phaser Bronze Commendation\t3000\t10000\tNone";
Challenge[8] = "Phaser Silver Commendation\t6000\t25000\tNone";
Challenge[9] = "Phaser Gold Commendation\t12500\t50000\tNone";
Challenge[10] = "Phaser Titan Commendation\t35000\t75000\tNone";
Upgrade[1] = "Laser";
Upgrade[2] = "Triple Burst";
Upgrade[3] = "Shotgun";
Upgrade[4] = "Phaser Blades";
GunName = "ES-77 Pulse Phaser";
usesEnergy = true;
fireEnergy = 4;
minEnergy = 4;
RankRequire = $TWM2::RankRequire["PulsePhaser"];
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";
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";
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(PulsePhaser) {
className = Weapon;
catagory = "Spawn Items";
shapeFile = "weapon_energy.dts";
image = PulsePhaserImage;
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
className = Weapon;
catagory = "Spawn Items";
shapeFile = "weapon_energy.dts";
image = PulsePhaserImage;
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "a Pulse Phaser";
};
datablock ShapeBaseImageData(Phaser2Image) : PulsePhaserImage {
shapeFile = "weapon_ELF.dts";
offset = "0 0.3 0.2";
rotation = "0 1 0 180";
shapeFile = "weapon_ELF.dts";
offset = "0 0.3 0.2";
rotation = "0 1 0 180";
};
datablock ShapeBaseImageData(Phaser3Image) : PulsePhaserImage {
shapeFile = "weapon_ELF.dts";
offset = "0 .5 0";
shapeFile = "weapon_ELF.dts";
offset = "0 .5 0";
};
function PulsePhaserImage::onMount(%this, %obj, %slot) {
Parent::onMount(%this, %obj, %slot);
if(%obj.client.UpgradeOn("Phaser Blades", %this.getName())) {
%obj.mountImage(Phaser2Image, 5);
%obj.mountImage(Phaser3Image, 6);
}
Parent::onMount(%this, %obj, %slot);
if(%obj.client.UpgradeOn("Phaser Blades", %this.getName())) {
%obj.mountImage(Phaser2Image, 5);
%obj.mountImage(Phaser3Image, 6);
}
}
function PulsePhaserImage::onUnmount(%this,%obj,%slot) {
%obj.unmountImage(5);
%obj.unmountImage(6);
Parent::onUnmount(%this, %obj, %slot);
%obj.unmountImage(5);
%obj.unmountImage(6);
Parent::onUnmount(%this, %obj, %slot);
}
function PulsePhaserImage::onFire(%data,%obj,%slot) {
if(%obj.cannotFire) {
return;
}
%vector = %obj.getMuzzleVector(%slot);
%mp = %obj.getMuzzlePoint(%slot);
if(%obj.client.UpgradeOn("Triple Burst", %data.getName())) {
%p1 = Parent::OnFire(%data, %obj, %slot);
if(%obj.cannotFire) {
return;
}
%vector = %obj.getMuzzleVector(%slot);
%mp = %obj.getMuzzlePoint(%slot);
if(%obj.client.UpgradeOn("Triple Burst", %data.getName())) {
%p1 = Parent::OnFire(%data, %obj, %slot);
%p2 = Schedule(100, 0, "spawnprojectile", %data.Projectile, %data.ProjectileType,
vectorAdd(%obj.getPosition(), "-.45 0 1.4"), %vector, %obj);
%p2.WeaponImageSource = "PulsePhaserImage";
schedule(100, 0, "ServerPlay3D", "PPWFireSound", %obj.getPosition());
%p2 = Schedule(100, 0, "spawnprojectile", %data.Projectile, %data.ProjectileType,
vectorAdd(%obj.getPosition(), "-.45 0 1.4"), %vector, %obj);
%p2.WeaponImageSource = "PulsePhaserImage";
schedule(100, 0, "ServerPlay3D", "PPWFireSound", %obj.getPosition());
%p3 = Schedule(250, 0, "spawnprojectile", %data.Projectile, %data.ProjectileType,
vectorAdd(%obj.getPosition(), "-.45 0 1.4"), %vector, %obj);
%p3.WeaponImageSource = "PulsePhaserImage";
schedule(250, 0, "ServerPlay3D", "PPWFireSound", %obj.getPosition());
ResetFireRestrict(%obj, 1);
schedule(1350, 0, "ResetFireRestrict", %obj, 0);
}
else if(%obj.client.UpgradeOn("Shotgun", %data.getName())) {
for (%i=0; %i < 3; %i++) {
%x = (getRandom() - 0.5) * 2 * 3.1415926 * (11/1000);
%y = (getRandom() - 0.5) * 2 * 3.1415926 * (11/1000);
%z = (getRandom() - 0.5) * 2 * 3.1415926 * (11/1000);
%mat = MatrixCreateFromEuler(%x @ " " @ %y @ " " @ %z);
%newvector = MatrixMulVector(%mat, %vector);
%p3 = Schedule(250, 0, "spawnprojectile", %data.Projectile, %data.ProjectileType,
vectorAdd(%obj.getPosition(), "-.45 0 1.4"), %vector, %obj);
%p3.WeaponImageSource = "PulsePhaserImage";
schedule(250, 0, "ServerPlay3D", "PPWFireSound", %obj.getPosition());
%p = new (%data.projectileType)() {
dataBlock = %data.projectile;
initialDirection = %newvector;
initialPosition = %mp;
sourceObject = %obj;
damageFactor = 1;
sourceSlot = %slot;
};
ResetFireRestrict(%obj, 1);
schedule(1350, 0, "ResetFireRestrict", %obj, 0);
}
else if(%obj.client.UpgradeOn("Shotgun", %data.getName())) {
for (%i=0; %i < 3; %i++) {
%x = (getRandom() - 0.5) * 2 * 3.1415926 * (11/1000);
%y = (getRandom() - 0.5) * 2 * 3.1415926 * (11/1000);
%z = (getRandom() - 0.5) * 2 * 3.1415926 * (11/1000);
%mat = MatrixCreateFromEuler(%x @ " " @ %y @ " " @ %z);
%newvector = MatrixMulVector(%mat, %vector);
%p.WeaponImageSource = "PulsePhaserImage";
}
ResetFireRestrict(%obj, 1);
schedule(1200, 0, "ResetFireRestrict", %obj, 0);
}
else if(%obj.client.UpgradeOn("Phaser Blades", %data.getName())) {
serverPlay3D("BomberTurretFireSound", %obj.getPosition());
%p = new (%data.projectileType)() {
dataBlock = TrevorPhaserBolt;
initialDirection = %vector;
initialPosition = %mp;
sourceObject = %obj;
damageFactor = 1;
sourceSlot = %slot;
};
%p = new (%data.projectileType)() {
dataBlock = %data.projectile;
initialDirection = %newvector;
initialPosition = %mp;
sourceObject = %obj;
damageFactor = 1;
sourceSlot = %slot;
};
%p.WeaponImageSource = "PulsePhaserImage";
}
else {
%p = Parent::OnFire(%data,%obj,%slot);
}
%p.WeaponImageSource = "PulsePhaserImage";
}
ResetFireRestrict(%obj, 1);
schedule(1200, 0, "ResetFireRestrict", %obj, 0);
}
else if(%obj.client.UpgradeOn("Phaser Blades", %data.getName())) {
serverPlay3D("BomberTurretFireSound", %obj.getPosition());
%p = new (%data.projectileType)() {
dataBlock = TrevorPhaserBolt;
initialDirection = %vector;
initialPosition = %mp;
sourceObject = %obj;
damageFactor = 1;
sourceSlot = %slot;
};
%p.WeaponImageSource = "PulsePhaserImage";
}
else {
%p = Parent::OnFire(%data,%obj,%slot);
}
}
function ResetFireRestrict(%plyr, %onOff) {
%plyr.cannotFire = %onOff;
}
%plyr.cannotFire = %onOff;
}

View file

@ -1,210 +1,206 @@
datablock AudioProfile(ALSWPFireSound) {
filename = "fx/weapons/cg_hard1.wav";
description = AudioDefault3d;
preload = true;
datablock AudioProfile(ALSWPFireSound) {
filename = "fx/weapons/cg_hard1.wav";
description = AudioDefault3d;
preload = true;
};
datablock TracerProjectileData(ALSWPBullet){
doDynamicClientHits = true;
doDynamicClientHits = true;
directDamage = 0.5;
directDamageType = $DamageType::ALSWP;
explosion = "ChaingunExplosion";
splash = ChaingunSplash;
HeadMultiplier = 1.5;
LegsMultiplier = 0.35;
directDamage = 0.5;
directDamageType = $DamageType::ALSWP;
explosion = "ChaingunExplosion";
splash = ChaingunSplash;
HeadMultiplier = 1.5;
LegsMultiplier = 0.35;
HeadShotKill = 0;
ImageSource = "ALSWPSniperRifleImage";
HeadShotKill = 0;
kickBackStrength = 15.0;
sound = ChaingunProjectile;
ImageSource = "ALSWPSniperRifleImage";
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;
kickBackStrength = 15.0;
sound = ChaingunProjectile;
tracerLength = 20.0;
tracerAlpha = false;
tracerMinPixels = 6;
tracerColor = 211.0/255.0 @ " " @ 215.0/255.0 @ " " @ 120.0/255.0 @ " 0.75";
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;
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;
decalData[0] = ChaingunDecal1;
decalData[1] = ChaingunDecal2;
decalData[2] = ChaingunDecal3;
decalData[3] = ChaingunDecal4;
decalData[4] = ChaingunDecal5;
decalData[5] = ChaingunDecal6;
};
datablock ItemData(ALSWPSniperRifleAmmo)
{
className = Ammo;
catagory = "Ammo";
shapeFile = "ammo_chaingun.dts";
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
datablock ItemData(ALSWPSniperRifleAmmo) {
className = Ammo;
catagory = "Ammo";
shapeFile = "ammo_chaingun.dts";
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "Some ALSWP Sniper Rifle Ammo";
computeCRC = true;
computeCRC = true;
};
//--------------------------------------------------------------------------
// Weapon
//--------------------------------------
datablock ShapeBaseImageData(ALSWPSniperRifleImage) {
className = WeaponImage;
shapeFile = "weapon_sniper.dts";
mass = 10;
item = ALSWPSniperRifle;
ammo = ALSWPSniperRifleAmmo;
projectile = ALSWPBullet;
projectileType = TracerProjectile;
emap = true;
className = WeaponImage;
shapeFile = "weapon_sniper.dts";
mass = 10;
item = ALSWPSniperRifle;
ammo = ALSWPSniperRifleAmmo;
projectile = ALSWPBullet;
projectileType = TracerProjectile;
emap = true;
armThread = looksn;
armThread = looksn;
//ClipStuff
ClipName = "ALSWPClip";
ClipPickupName["ALSWPClip"] = "A Few Boxes Of ALSWP Sniper Bullets";
ShowsClipInHud = 1;
ClipReloadTime = 5;
ClipReturn = 10;
InitialClips = 6;
//
//Challenges
HasChallenges = 1;
ChallengeCt = 8;
Challenge[1] = "ALSWP Hunter\t100\t150\tNone";
Challenge[2] = "ALSWP Expert\t200\t250\tNone";
Challenge[3] = "ALSWP Master\t500\t500\tLaser";
Challenge[4] = "ALSWP God\t1000\t1000\tSilencer";
Challenge[5] = "ALSWP Bronze Commendation\t2500\t10000\tNone";
Challenge[6] = "ALSWP Silver Commendation\t5000\t25000\tNone";
Challenge[7] = "ALSWP Gold Commendation\t10000\t50000\tNone";
Challenge[8] = "ALSWP Titan Commendation\t25000\t75000\tNone";
Upgrade[1] = "Laser";
Upgrade[2] = "Silencer";
GunName = "ALSWP Sniper Rifle";
//
//ClipStuff
ClipName = "ALSWPClip";
ClipPickupName["ALSWPClip"] = "A Few Boxes Of ALSWP Sniper Bullets";
ShowsClipInHud = 1;
ClipReloadTime = 5;
ClipReturn = 10;
InitialClips = 6;
//
//Challenges
HasChallenges = 1;
ChallengeCt = 8;
Challenge[1] = "ALSWP Hunter\t100\t150\tNone";
Challenge[2] = "ALSWP Expert\t200\t250\tNone";
Challenge[3] = "ALSWP Master\t500\t500\tLaser";
Challenge[4] = "ALSWP God\t1000\t1000\tSilencer";
Challenge[5] = "ALSWP Bronze Commendation\t2500\t10000\tNone";
Challenge[6] = "ALSWP Silver Commendation\t5000\t25000\tNone";
Challenge[7] = "ALSWP Gold Commendation\t10000\t50000\tNone";
Challenge[8] = "ALSWP Titan Commendation\t25000\t75000\tNone";
Upgrade[1] = "Laser";
Upgrade[2] = "Silencer";
GunName = "ALSWP Sniper Rifle";
//
RankRequire = $TWM2::RankRequire["ALSWP"];
RankRequire = $TWM2::RankRequire["ALSWP"];
casing = ShellDebris;
shellExitDir = "1.0 0.3 1.0";
shellExitOffset = "0.15 -0.56 -0.1";
shellExitVariance = 15.0;
shellVelocity = 3.0;
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[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[1] = "ActivateReady";
stateTransitionOnLoaded[1] = "Ready";
stateTransitionOnNoAmmo[1] = "NoAmmo";
stateName[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTransitionOnTriggerDown[2] = "CheckWet";
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] = "ALSWPFireSound";
stateName[3] = "Fire";
stateTransitionOnTimeout[3] = "Reload";
stateTimeoutValue[3] = 0.01;
stateFire[3] = true;
stateRecoil[3] = LightRecoil;
stateAllowImageChange[3] = false;
stateScript[3] = "onFire";
//stateSound[3] = "ALSWPFireSound";
stateName[4] = "Reload";
stateTransitionOnNoAmmo[4] = "NoAmmo";
stateTransitionOnTimeout[4] = "Ready";
stateTimeoutValue[4] = 0.6;
stateAllowImageChange[4] = false;
stateSequence[4] = "Reload";
stateName[4] = "Reload";
stateTransitionOnNoAmmo[4] = "NoAmmo";
stateTransitionOnTimeout[4] = "Ready";
stateTimeoutValue[4] = 0.6;
stateAllowImageChange[4] = false;
stateSequence[4] = "Reload";
stateName[5] = "NoAmmo";
stateTransitionOnAmmo[5] = "Reload";
stateSequence[5] = "NoAmmo";
stateTransitionOnTriggerDown[5] = "DryFire";
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[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[7] = "WetFire";
stateSound[7] = PlasmaFireWetSound;
stateTimeoutValue[7] = 1.0;
stateTransitionOnTimeout[7] = "Ready";
stateName[8] = "CheckWet";
stateTransitionOnWet[8] = "WetFire";
stateTransitionOnNotWet[8] = "Fire";
stateName[8] = "CheckWet";
stateTransitionOnWet[8] = "WetFire";
stateTransitionOnNotWet[8] = "Fire";
};
datablock ItemData(ALSWPSniperRifle)
{
className = Weapon;
catagory = "Spawn Items";
shapeFile = "weapon_sniper.dts";
image = ALSWPSniperRifleImage;
mass = 1.0;
elasticity = 0.0;
friction = 0.6;
pickupRadius = 2;
pickUpName = "a ALSWP Sniper Rifle";
datablock ItemData(ALSWPSniperRifle) {
className = Weapon;
catagory = "Spawn Items";
shapeFile = "weapon_sniper.dts";
image = ALSWPSniperRifleImage;
mass = 1.0;
elasticity = 0.0;
friction = 0.6;
pickupRadius = 2;
pickUpName = "a ALSWP Sniper Rifle";
computeCRC = true;
emap = true;
computeCRC = true;
emap = true;
};
function ALSWPSniperRifleImage::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);
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);
}
function ALSWPSniperRifleImage::onUnmount(%this,%obj,%slot) {
Parent::onUnmount(%this, %obj, %slot);
Parent::onUnmount(%this, %obj, %slot);
}
function ALSWPSniperRifleImage::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);
if(%obj.client.UpgradeOn("Silencer", %data.getName())) {
//zero sound :p
}
else {
ServerPlay3d(ALSWPFireSound, %obj.getPosition());
}
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);
if(%obj.client.UpgradeOn("Silencer", %data.getName())) {
//zero sound :p
}
else {
ServerPlay3d(ALSWPFireSound, %obj.getPosition());
}
}

View file

@ -1,225 +1,221 @@
datablock AudioProfile(G17FireSound) {
filename = "fx/weapons/cg_metal4.wav";
description = AudioDefault3d;
preload = true;
filename = "fx/weapons/cg_metal4.wav";
description = AudioDefault3d;
preload = true;
};
datablock TracerProjectileData(G17Bullet){
doDynamicClientHits = true;
doDynamicClientHits = true;
directDamage = 0.25;
directDamageType = $DamageType::G17;
explosion = "ChaingunExplosion";
splash = ChaingunSplash;
HeadMultiplier = 1.5;
LegsMultiplier = 0.35;
directDamage = 0.55;
directDamageType = $DamageType::G17;
explosion = "ChaingunExplosion";
splash = ChaingunSplash;
HeadMultiplier = 1.5;
LegsMultiplier = 0.35;
HeadShotKill = 1;
ImageSource = "G17SniperRifleImage";
HeadShotKill = 1;
kickBackStrength = 15.0;
sound = ChaingunProjectile;
ImageSource = "G17SniperRifleImage";
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;
kickBackStrength = 15.0;
sound = ChaingunProjectile;
tracerLength = 20.0;
tracerAlpha = false;
tracerMinPixels = 6;
tracerColor = 211.0/255.0 @ " " @ 215.0/255.0 @ " " @ 120.0/255.0 @ " 0.75";
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;
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;
decalData[0] = ChaingunDecal1;
decalData[1] = ChaingunDecal2;
decalData[2] = ChaingunDecal3;
decalData[3] = ChaingunDecal4;
decalData[4] = ChaingunDecal5;
decalData[5] = ChaingunDecal6;
};
datablock ItemData(G17SniperRifleAmmo)
{
className = Ammo;
catagory = "Ammo";
shapeFile = "ammo_chaingun.dts";
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
datablock ItemData(G17SniperRifleAmmo) {
className = Ammo;
catagory = "Ammo";
shapeFile = "ammo_chaingun.dts";
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "Some G17 Sniper Rifle Ammo";
computeCRC = true;
computeCRC = true;
};
//--------------------------------------------------------------------------
// Weapon
//--------------------------------------
datablock ShapeBaseImageData(G17SniperRifleImage) {
className = WeaponImage;
shapeFile = "weapon_sniper.dts";
mass = 10;
item = G17SniperRifle;
ammo = G17SniperRifleAmmo;
projectile = G17Bullet;
projectileType = TracerProjectile;
emap = true;
className = WeaponImage;
shapeFile = "weapon_sniper.dts";
mass = 10;
item = G17SniperRifle;
ammo = G17SniperRifleAmmo;
projectile = G17Bullet;
projectileType = TracerProjectile;
emap = true;
armThread = looksn;
armThread = looksn;
//ClipStuff
ClipName = "G17Clip";
ClipPickupName["G17Clip"] = "A Few Boxes Of G17 Sniper Bullets";
ShowsClipInHud = 1;
ClipReloadTime = 4;
ClipReturn = 1;
InitialClips = 10;
//
//Challenges
HasChallenges = 1;
ChallengeCt = 8;
Challenge[1] = "G17 Hunter\t100\t150\tNone";
Challenge[2] = "G17 Expert\t200\t250\tNone";
Challenge[3] = "G17 Master\t500\t500\tLaser";
Challenge[4] = "G17 God\t1000\t1000\tSilencer";
Challenge[5] = "G17 Bronze Commendation\t2500\t10000\tNone";
Challenge[6] = "G17 Silver Commendation\t5000\t25000\tNone";
Challenge[7] = "G17 Gold Commendation\t10000\t50000\tNone";
Challenge[8] = "G17 Titan Commendation\t25000\t75000\tNone";
Upgrade[1] = "Laser";
Upgrade[2] = "Silencer";
GunName = "G17 Sniper Rifle";
//
//ClipStuff
ClipName = "G17Clip";
ClipPickupName["G17Clip"] = "A Few Boxes Of G17 Sniper Bullets";
ShowsClipInHud = 1;
ClipReloadTime = 4;
ClipReturn = 1;
InitialClips = 10;
//
//Challenges
HasChallenges = 1;
ChallengeCt = 8;
Challenge[1] = "G17 Hunter\t100\t150\tNone";
Challenge[2] = "G17 Expert\t200\t250\tNone";
Challenge[3] = "G17 Master\t500\t500\tLaser";
Challenge[4] = "G17 God\t1000\t1000\tSilencer";
Challenge[5] = "G17 Bronze Commendation\t2500\t10000\tNone";
Challenge[6] = "G17 Silver Commendation\t5000\t25000\tNone";
Challenge[7] = "G17 Gold Commendation\t10000\t50000\tNone";
Challenge[8] = "G17 Titan Commendation\t25000\t75000\tNone";
Upgrade[1] = "Laser";
Upgrade[2] = "Silencer";
GunName = "G17 Sniper Rifle";
//
casing = ShellDebris;
shellExitDir = "1.0 0.3 1.0";
shellExitOffset = "0.15 -0.56 -0.1";
shellExitVariance = 15.0;
shellVelocity = 3.0;
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[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[1] = "ActivateReady";
stateTransitionOnLoaded[1] = "Ready";
stateTransitionOnNoAmmo[1] = "NoAmmo";
stateName[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTransitionOnTriggerDown[2] = "CheckWet";
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] = "G17FireSound";
stateName[3] = "Fire";
stateTransitionOnTimeout[3] = "Reload";
stateTimeoutValue[3] = 0.01;
stateFire[3] = true;
stateRecoil[3] = LightRecoil;
stateAllowImageChange[3] = false;
stateScript[3] = "onFire";
//stateSound[3] = "G17FireSound";
stateName[4] = "Reload";
stateTransitionOnNoAmmo[4] = "NoAmmo";
stateTransitionOnTimeout[4] = "Ready";
stateTimeoutValue[4] = 1.1;
stateAllowImageChange[4] = false;
stateSequence[4] = "Reload";
stateName[4] = "Reload";
stateTransitionOnNoAmmo[4] = "NoAmmo";
stateTransitionOnTimeout[4] = "Ready";
stateTimeoutValue[4] = 0.7;
stateAllowImageChange[4] = false;
stateSequence[4] = "Reload";
stateName[5] = "NoAmmo";
stateTransitionOnAmmo[5] = "Reload";
stateSequence[5] = "NoAmmo";
stateTransitionOnTriggerDown[5] = "DryFire";
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[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[7] = "WetFire";
stateSound[7] = PlasmaFireWetSound;
stateTimeoutValue[7] = 1.0;
stateTransitionOnTimeout[7] = "Ready";
stateName[8] = "CheckWet";
stateTransitionOnWet[8] = "WetFire";
stateTransitionOnNotWet[8] = "Fire";
stateName[8] = "CheckWet";
stateTransitionOnWet[8] = "WetFire";
stateTransitionOnNotWet[8] = "Fire";
};
datablock ItemData(G17SniperRifle)
{
className = Weapon;
catagory = "Spawn Items";
shapeFile = "weapon_sniper.dts";
image = G17SniperRifleImage;
mass = 1.0;
elasticity = 0.0;
friction = 0.6;
pickupRadius = 2;
pickUpName = "a G17 Sniper Rifle";
datablock ItemData(G17SniperRifle) {
className = Weapon;
catagory = "Spawn Items";
shapeFile = "weapon_sniper.dts";
image = G17SniperRifleImage;
mass = 1.0;
elasticity = 0.0;
friction = 0.6;
pickupRadius = 2;
pickUpName = "a G17 Sniper Rifle";
computeCRC = true;
emap = true;
computeCRC = true;
emap = true;
};
//Two images make the scope
datablock ShapeBaseImageData(G17ScopeImage) : G17SniperRifleImage {
shapeFile = "turret_belly_barrell.dts";
offset = "0 0.25 0.25";
rotation = "1 0 0 180";
shapeFile = "turret_belly_barrell.dts";
offset = "0 0.25 0.25";
rotation = "1 0 0 180";
};
datablock ShapeBaseImageData(G17ScopeImage2) : G17SniperRifleImage {
shapeFile = "turret_belly_barrell.dts";
offset = "0 0.3 0.25";
rotation = "1 0 0 0";
shapeFile = "turret_belly_barrell.dts";
offset = "0 0.3 0.25";
rotation = "1 0 0 0";
};
function G17SniperRifleImage::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(G17ScopeImage, 5);
%obj.mountImage(G17ScopeImage2, 6);
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(G17ScopeImage, 5);
%obj.mountImage(G17ScopeImage2, 6);
}
function G17SniperRifleImage::onUnmount(%this,%obj,%slot) {
Parent::onUnmount(%this, %obj, %slot);
%obj.unmountImage(5);
%obj.unmountImage(6);
Parent::onUnmount(%this, %obj, %slot);
%obj.unmountImage(5);
%obj.unmountImage(6);
}
function G17SniperRifleImage::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);
if(%obj.client.UpgradeOn("Silencer", %data.getName())) {
//zero sound :p
}
else {
ServerPlay3d(G17FireSound, %obj.getPosition());
}
}
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);
if(%obj.client.UpgradeOn("Silencer", %data.getName())) {
//zero sound :p
}
else {
ServerPlay3d(G17FireSound, %obj.getPosition());
}
}

View file

@ -1,183 +1,178 @@
datablock TracerProjectileData(G41Bullet)
{
doDynamicClientHits = true;
datablock TracerProjectileData(G41Bullet) {
doDynamicClientHits = true;
directDamage = 0.3;
directDamageType = $DamageType::G41;
explosion = "ChaingunExplosion";
splash = ChaingunSplash;
HeadMultiplier = 1.1;
LegsMultiplier = 0.35;
directDamage = 0.44;
directDamageType = $DamageType::G41;
explosion = "ChaingunExplosion";
splash = ChaingunSplash;
HeadMultiplier = 1.1;
LegsMultiplier = 0.35;
ImageSource = "G41RifleImage";
ImageSource = "G41RifleImage";
kickBackStrength = 15.0;
sound = ChaingunProjectile;
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;
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";
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;
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;
decalData[0] = ChaingunDecal1;
decalData[1] = ChaingunDecal2;
decalData[2] = ChaingunDecal3;
decalData[3] = ChaingunDecal4;
decalData[4] = ChaingunDecal5;
decalData[5] = ChaingunDecal6;
};
datablock ItemData(G41RifleAmmo)
{
className = Ammo;
catagory = "Ammo";
shapeFile = "ammo_chaingun.dts";
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
datablock ItemData(G41RifleAmmo) {
className = Ammo;
catagory = "Ammo";
shapeFile = "ammo_chaingun.dts";
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "Some G41 Rifle Bullets";
computeCRC = true;
computeCRC = true;
};
datablock ShapeBaseImageData(G41RifleImage)
{
className = WeaponImage;
shapeFile = "weapon_sniper.dts";
mass = 10;
item = G41Rifle;
ammo = G41RifleAmmo;
projectile = G41Bullet;
projectileType = TracerProjectile;
emap = true;
datablock ShapeBaseImageData(G41RifleImage) {
className = WeaponImage;
shapeFile = "weapon_sniper.dts";
mass = 10;
item = G41Rifle;
ammo = G41RifleAmmo;
projectile = G41Bullet;
projectileType = TracerProjectile;
emap = true;
//ClipStuff
ClipName = "G41RifleClip";
ClipPickupName["G41RifleClip"] = "some G41 Clip Cartons";
ShowsClipInHud = 1;
ClipReloadTime = 5;
ClipReturn = 20;
InitialClips = 7;
//
//Challenges
HasChallenges = 1;
ChallengeCt = 8;
Challenge[1] = "G41 Hunter\t75\t150\tNone";
Challenge[2] = "G41 Expert\t150\t250\tGrip";
Challenge[3] = "G41 Master\t350\t500\tLaser";
Challenge[4] = "G41 God\t600\t1000\tSilencer";
Challenge[5] = "G41 Bronze Commendation\t2500\t10000\tNone";
Challenge[6] = "G41 Silver Commendation\t5000\t25000\tNone";
Challenge[7] = "G41 Gold Commendation\t10000\t50000\tNone";
Challenge[8] = "G41 Titan Commendation\t25000\t75000\tNone";
Upgrade[1] = "Grip";
Upgrade[2] = "Laser";
Upgrade[3] = "Silencer";
GunName = "G41 Semi-Automatic Rifle";
//
RankRequire = $TWM2::RankRequire["G41"];
//ClipStuff
ClipName = "G41RifleClip";
ClipPickupName["G41RifleClip"] = "some G41 Clip Cartons";
ShowsClipInHud = 1;
ClipReloadTime = 5;
ClipReturn = 20;
InitialClips = 7;
//
//Challenges
HasChallenges = 1;
ChallengeCt = 8;
Challenge[1] = "G41 Hunter\t75\t150\tNone";
Challenge[2] = "G41 Expert\t150\t250\tGrip";
Challenge[3] = "G41 Master\t350\t500\tLaser";
Challenge[4] = "G41 God\t600\t1000\tSilencer";
Challenge[5] = "G41 Bronze Commendation\t2500\t10000\tNone";
Challenge[6] = "G41 Silver Commendation\t5000\t25000\tNone";
Challenge[7] = "G41 Gold Commendation\t10000\t50000\tNone";
Challenge[8] = "G41 Titan Commendation\t25000\t75000\tNone";
Upgrade[1] = "Grip";
Upgrade[2] = "Laser";
Upgrade[3] = "Silencer";
GunName = "G41 Semi-Automatic Rifle";
//
casing = ShellDebris;
shellExitDir = "1.0 0.3 1.0";
shellExitOffset = "0.15 -0.56 -0.1";
shellExitVariance = 15.0;
shellVelocity = 3.0;
RankRequire = $TWM2::RankRequire["G41"];
projectileSpread = 3.0 / 1000.0;
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;
projectileSpread = 2.0 / 1000.0;
stateName[1] = "ActivateReady";
stateTransitionOnLoaded[1] = "Ready";
stateTransitionOnNoAmmo[1] = "NoAmmo";
stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "ActivateReady";
stateTimeoutValue[0] = 0.5;
stateSequence[0] = "Activate";
stateSound[0] = ChaingunSwitchSound;
stateName[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTransitionOnTriggerDown[2] = "CheckWet";
stateName[1] = "ActivateReady";
stateTransitionOnLoaded[1] = "Ready";
stateTransitionOnNoAmmo[1] = "NoAmmo";
stateName[3] = "Fire";
stateTransitionOnTimeout[3] = "Reload";
stateTimeoutValue[3] = 0.01;
stateFire[3] = true;
stateRecoil[3] = LightRecoil;
stateAllowImageChange[3] = false;
stateScript[3] = "onFire";
stateEmitterTime[3] = 0.2;
//stateSound[3] = S3FireSound;
stateName[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTransitionOnTriggerDown[2] = "CheckWet";
stateName[4] = "Reload";
stateTransitionOnNoAmmo[4] = "NoAmmo";
stateTransitionOnTimeout[4] = "Ready";
stateTimeoutValue[4] = 0.3;
stateAllowImageChange[4] = false;
stateSequence[4] = "Reload";
stateName[3] = "Fire";
stateTransitionOnTimeout[3] = "Reload";
stateTimeoutValue[3] = 0.01;
stateFire[3] = true;
stateRecoil[3] = LightRecoil;
stateAllowImageChange[3] = false;
stateScript[3] = "onFire";
stateEmitterTime[3] = 0.2;
//stateSound[3] = S3FireSound;
stateName[5] = "NoAmmo";
stateTransitionOnAmmo[5] = "Reload";
stateSequence[5] = "NoAmmo";
stateTransitionOnTriggerDown[5] = "DryFire";
stateName[4] = "Reload";
stateTransitionOnNoAmmo[4] = "NoAmmo";
stateTransitionOnTimeout[4] = "Ready";
stateTimeoutValue[4] = 0.15;
stateAllowImageChange[4] = false;
stateSequence[4] = "Reload";
stateName[6] = "DryFire";
stateSound[6] = ChaingunDryFireSound;
stateTimeoutValue[6] = 1.0;
stateTransitionOnTimeout[6] = "NoAmmo";
stateName[5] = "NoAmmo";
stateTransitionOnAmmo[5] = "Reload";
stateSequence[5] = "NoAmmo";
stateTransitionOnTriggerDown[5] = "DryFire";
stateName[7] = "WetFire";
stateSound[7] = PlasmaFireWetSound;
stateTimeoutValue[7] = 1.0;
stateTransitionOnTimeout[7] = "Ready";
stateName[6] = "DryFire";
stateSound[6] = ChaingunDryFireSound;
stateTimeoutValue[6] = 1.0;
stateTransitionOnTimeout[6] = "NoAmmo";
stateName[8] = "CheckWet";
stateTransitionOnWet[8] = "WetFire";
stateTransitionOnNotWet[8] = "Fire";
stateName[7] = "WetFire";
stateSound[7] = PlasmaFireWetSound;
stateTimeoutValue[7] = 1.0;
stateTransitionOnTimeout[7] = "Ready";
stateName[8] = "CheckWet";
stateTransitionOnWet[8] = "WetFire";
stateTransitionOnNotWet[8] = "Fire";
};
datablock ItemData(G41Rifle)
{
className = Weapon;
catagory = "Spawn Items";
shapeFile = "weapon_sniper.dts";
image = G41RifleImage;
mass = 1.0;
elasticity = 0.0;
friction = 0.6;
pickupRadius = 2;
pickUpName = "an G41 Semi-Automatic Rifle";
datablock ItemData(G41Rifle) {
className = Weapon;
catagory = "Spawn Items";
shapeFile = "weapon_sniper.dts";
image = G41RifleImage;
mass = 1.0;
elasticity = 0.0;
friction = 0.6;
pickupRadius = 2;
pickUpName = "an G41 Semi-Automatic Rifle";
computeCRC = true;
emap = true;
computeCRC = true;
emap = true;
};
function G41RifleImage::onFire(%data, %obj, %slot) {
%p = Parent::onFire(%data, %obj, %slot);
if(%obj.client.UpgradeOn("Silencer", %data.getName())) {
//zero sound :p
}
else {
ServerPlay3d(S3FireSound, %obj.getPosition());
}
}
%p = Parent::onFire(%data, %obj, %slot);
if(%obj.client.UpgradeOn("Silencer", %data.getName())) {
//zero sound :p
}
else {
ServerPlay3d(S3FireSound, %obj.getPosition());
}
}

View file

@ -1,227 +1,223 @@
datablock AudioProfile(M1FireSound) {
filename = "fx/weapons/cg_metal2.wav";
description = AudioDefault3d;
preload = true;
filename = "fx/weapons/cg_metal2.wav";
description = AudioDefault3d;
preload = true;
};
datablock TracerProjectileData(M1Bullet){
doDynamicClientHits = true;
datablock TracerProjectileData(M1Bullet) {
doDynamicClientHits = true;
directDamage = 0.3;
directDamageType = $DamageType::M1;
explosion = "ChaingunExplosion";
splash = ChaingunSplash;
HeadMultiplier = 1.5;
LegsMultiplier = 0.35;
directDamage = 0.65;
directDamageType = $DamageType::M1;
explosion = "ChaingunExplosion";
splash = ChaingunSplash;
HeadMultiplier = 1.5;
LegsMultiplier = 0.35;
HeadShotKill = 1;
ImageSource = "M1SniperRifleImage";
HeadShotKill = 1;
kickBackStrength = 15.0;
sound = ChaingunProjectile;
ImageSource = "M1SniperRifleImage";
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;
kickBackStrength = 15.0;
sound = ChaingunProjectile;
tracerLength = 20.0;
tracerAlpha = false;
tracerMinPixels = 6;
tracerColor = 211.0/255.0 @ " " @ 215.0/255.0 @ " " @ 120.0/255.0 @ " 0.75";
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;
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;
decalData[0] = ChaingunDecal1;
decalData[1] = ChaingunDecal2;
decalData[2] = ChaingunDecal3;
decalData[3] = ChaingunDecal4;
decalData[4] = ChaingunDecal5;
decalData[5] = ChaingunDecal6;
};
datablock ItemData(M1SniperRifleAmmo)
{
className = Ammo;
catagory = "Ammo";
shapeFile = "ammo_chaingun.dts";
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
datablock ItemData(M1SniperRifleAmmo) {
className = Ammo;
catagory = "Ammo";
shapeFile = "ammo_chaingun.dts";
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "Some M1 Sniper Rifle Ammo";
computeCRC = true;
computeCRC = true;
};
//--------------------------------------------------------------------------
// Weapon
//--------------------------------------
datablock ShapeBaseImageData(M1SniperRifleImage) {
className = WeaponImage;
shapeFile = "weapon_sniper.dts";
mass = 10;
item = M1SniperRifle;
ammo = M1SniperRifleAmmo;
projectile = M1Bullet;
projectileType = TracerProjectile;
emap = true;
className = WeaponImage;
shapeFile = "weapon_sniper.dts";
mass = 10;
item = M1SniperRifle;
ammo = M1SniperRifleAmmo;
projectile = M1Bullet;
projectileType = TracerProjectile;
emap = true;
armThread = looksn;
armThread = looksn;
//ClipStuff
ClipName = "M1Clip";
ClipPickupName["M1Clip"] = "A Few Boxes Of M1 Sniper Bullets";
ShowsClipInHud = 1;
ClipReloadTime = 4;
ClipReturn = 5;
InitialClips = 5;
//
//Challenges
HasChallenges = 1;
ChallengeCt = 8;
Challenge[1] = "M1 Hunter\t100\t150\tNone";
Challenge[2] = "M1 Expert\t200\t250\tNone";
Challenge[3] = "M1 Master\t500\t500\tLaser";
Challenge[4] = "M1 God\t1000\t1000\tSilencer";
Challenge[5] = "M1 Bronze Commendation\t2500\t10000\tNone";
Challenge[6] = "M1 Silver Commendation\t5000\t25000\tNone";
Challenge[7] = "M1 Gold Commendation\t10000\t50000\tNone";
Challenge[8] = "M1 Titan Commendation\t25000\t75000\tNone";
Upgrade[1] = "Laser";
Upgrade[2] = "Silencer";
GunName = "M1 Sniper Rifle";
//
//ClipStuff
ClipName = "M1Clip";
ClipPickupName["M1Clip"] = "A Few Boxes Of M1 Sniper Bullets";
ShowsClipInHud = 1;
ClipReloadTime = 5;
ClipReturn = 5;
InitialClips = 5;
//
//Challenges
HasChallenges = 1;
ChallengeCt = 8;
Challenge[1] = "M1 Hunter\t100\t150\tNone";
Challenge[2] = "M1 Expert\t200\t250\tNone";
Challenge[3] = "M1 Master\t500\t500\tLaser";
Challenge[4] = "M1 God\t1000\t1000\tSilencer";
Challenge[5] = "M1 Bronze Commendation\t2500\t10000\tNone";
Challenge[6] = "M1 Silver Commendation\t5000\t25000\tNone";
Challenge[7] = "M1 Gold Commendation\t10000\t50000\tNone";
Challenge[8] = "M1 Titan Commendation\t25000\t75000\tNone";
Upgrade[1] = "Laser";
Upgrade[2] = "Silencer";
GunName = "M1 Sniper Rifle";
//
RankRequire = $TWM2::RankRequire["M1"];
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;
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[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[1] = "ActivateReady";
stateTransitionOnLoaded[1] = "Ready";
stateTransitionOnNoAmmo[1] = "NoAmmo";
stateName[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTransitionOnTriggerDown[2] = "CheckWet";
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[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] = 1.1;
stateAllowImageChange[4] = false;
stateSequence[4] = "Reload";
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[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[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[7] = "WetFire";
stateSound[7] = PlasmaFireWetSound;
stateTimeoutValue[7] = 1.0;
stateTransitionOnTimeout[7] = "Ready";
stateName[8] = "CheckWet";
stateTransitionOnWet[8] = "WetFire";
stateTransitionOnNotWet[8] = "Fire";
stateName[8] = "CheckWet";
stateTransitionOnWet[8] = "WetFire";
stateTransitionOnNotWet[8] = "Fire";
};
datablock ItemData(M1SniperRifle)
{
className = Weapon;
catagory = "Spawn Items";
shapeFile = "weapon_sniper.dts";
image = M1SniperRifleImage;
mass = 1.0;
elasticity = 0.0;
friction = 0.6;
pickupRadius = 2;
pickUpName = "a M1 Sniper Rifle";
datablock ItemData(M1SniperRifle) {
className = Weapon;
catagory = "Spawn Items";
shapeFile = "weapon_sniper.dts";
image = M1SniperRifleImage;
mass = 1.0;
elasticity = 0.0;
friction = 0.6;
pickupRadius = 2;
pickUpName = "a M1 Sniper Rifle";
computeCRC = true;
emap = true;
computeCRC = true;
emap = true;
};
//Two images make the scope
datablock ShapeBaseImageData(M1ScopeImage) : M1SniperRifleImage {
shapeFile = "turret_belly_barrell.dts";
offset = "0 0.25 0.25";
rotation = "1 0 0 180";
shapeFile = "turret_belly_barrell.dts";
offset = "0 0.25 0.25";
rotation = "1 0 0 180";
};
datablock ShapeBaseImageData(M1ScopeImage2) : M1SniperRifleImage {
shapeFile = "turret_belly_barrell.dts";
offset = "0 0.3 0.25";
rotation = "1 0 0 0";
shapeFile = "turret_belly_barrell.dts";
offset = "0 0.3 0.25";
rotation = "1 0 0 0";
};
function M1SniperRifleImage::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(M1ScopeImage, 5);
%obj.mountImage(M1ScopeImage2, 6);
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(M1ScopeImage, 5);
%obj.mountImage(M1ScopeImage2, 6);
}
function M1SniperRifleImage::onUnmount(%this,%obj,%slot) {
Parent::onUnmount(%this, %obj, %slot);
%obj.unmountImage(5);
%obj.unmountImage(6);
Parent::onUnmount(%this, %obj, %slot);
%obj.unmountImage(5);
%obj.unmountImage(6);
}
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);
if(%obj.client.UpgradeOn("Silencer", %data.getName())) {
//zero sound :p
}
else {
ServerPlay3d(M1FireSound, %obj.getPosition());
}
}
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);
if(%obj.client.UpgradeOn("Silencer", %data.getName())) {
//zero sound :p
}
else {
ServerPlay3d(M1FireSound, %obj.getPosition());
}
}

View file

@ -1,267 +1,264 @@
datablock TracerProjectileData(M4A1Bullet) {
doDynamicClientHits = true;
doDynamicClientHits = true;
directDamage = 0.09;
directDamageType = $DamageType::M4A1;
explosion = "ChaingunExplosion";
splash = ChaingunSplash;
HeadMultiplier = 1.25;
LegsMultiplier = 0.75;
directDamage = 0.085;
directDamageType = $DamageType::M4A1;
explosion = "ChaingunExplosion";
splash = ChaingunSplash;
HeadMultiplier = 1.25;
LegsMultiplier = 0.75;
kickBackStrength = 15.0;
sound = ChaingunProjectile;
ImageSource = "M4A1Image";
kickBackStrength = 15.0;
sound = ChaingunProjectile;
dryVelocity = 1750.0;
wetVelocity = 1500.0;
velInheritFactor = 0.0;
fizzleTimeMS = 3000;
lifetimeMS = 3000;
explodeOnDeath = false;
reflectOnWaterImpactAngle = 0.0;
explodeOnWaterImpact = false;
deflectionOnWaterImpact = 0.0;
fizzleUnderwaterMS = 3000;
ImageSource = "M4A1Image";
tracerLength = 9.0;
tracerAlpha = false;
tracerMinPixels = 6;
tracerColor = 211.0/255.0 @ " " @ 215.0/255.0 @ " " @ 120.0/255.0 @ " 0.75";
dryVelocity = 1750.0;
wetVelocity = 1500.0;
velInheritFactor = 0.0;
fizzleTimeMS = 3000;
lifetimeMS = 3000;
explodeOnDeath = false;
reflectOnWaterImpactAngle = 0.0;
explodeOnWaterImpact = false;
deflectionOnWaterImpact = 0.0;
fizzleUnderwaterMS = 3000;
tracerLength = 9.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;
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;
decalData[0] = ChaingunDecal1;
decalData[1] = ChaingunDecal2;
decalData[2] = ChaingunDecal3;
decalData[3] = ChaingunDecal4;
decalData[4] = ChaingunDecal5;
decalData[5] = ChaingunDecal6;
};
//--------------------------------------------------------------------------
// Ammo
//--------------------------------------
datablock ItemData(M4A1Ammo)
{
className = Ammo;
catagory = "Ammo";
shapeFile = "ammo_chaingun.dts";
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
datablock ItemData(M4A1Ammo) {
className = Ammo;
catagory = "Ammo";
shapeFile = "ammo_chaingun.dts";
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "some M4A1 ammo";
computeCRC = true;
computeCRC = true;
};
//--------------------------------------------------------------------------
// Weapon
//--------------------------------------
datablock ShapeBaseImageData(M4A1Image)
{
className = WeaponImage;
shapeFile = "weapon_energy_vehicle.dts";
item = M4A1;
ammo = M4A1Ammo;
projectile = M4A1Bullet;
projectileType = TracerProjectile;
emap = true;
offset = "0 0.5 0"; // L/R - F/B - T/B
rotation = "0 1 0 180";
mass = 11;
//ClipStuff
ClipName = "M4A1Clip";
ClipPickupName["M4A1Clip"] = "some M4A1 Magazines";
ShowsClipInHud = 1;
ClipReloadTime = 4;
ClipReturn = 30;
InitialClips = 7;
//
HasChallenges = 1;
ChallengeCt = 11;
Challenge[1] = "M4A1 Killer\t50\t100\tGrip";
Challenge[2] = "M4A1 Hunter\t100\t250\tLaser";
Challenge[3] = "M4A1 Expert\t250\t500\tShotgun Attachment";
Challenge[4] = "M4A1 Master\t500\t1000\tGrenade Launcher Attachment";
Challenge[5] = "M4A1 Legend\t750\t1500\tMini-Launcher Attachment";
Challenge[6] = "M4A1 God\t1000\t2000\tSilencer";
Challenge[7] = "M4A1 Supremacy\t2500\t5000\tUnlimited Attachment Ammo";
Challenge[8] = "M4A1 Bronze Commendation\t5000\t10000\tNone";
Challenge[9] = "M4A1 Silver Commendation\t12500\t25000\tNone";
Challenge[10] = "M4A1 Gold Commendation\t25000\t50000\tNone";
Challenge[11] = "M4A1 Titan Commendation\t50000\t75000\tNone";
Upgrade[1] = "Grip";
Upgrade[2] = "Laser";
Upgrade[3] = "Shotgun Attachment";
Upgrade[4] = "Grenade Launcher Attachment";
Upgrade[5] = "Mini-Launcher Attachment";
Upgrade[6] = "Silencer";
GunName = "M4A1 Assault Rifle";
RankRequire = $TWM2::RankRequire["M4A1"];
datablock ShapeBaseImageData(M4A1Image) {
className = WeaponImage;
shapeFile = "weapon_energy_vehicle.dts";
item = M4A1;
ammo = M4A1Ammo;
projectile = M4A1Bullet;
projectileType = TracerProjectile;
emap = true;
offset = "0 0.5 0"; // L/R - F/B - T/B
rotation = "0 1 0 180";
mass = 11;
//ClipStuff
ClipName = "M4A1Clip";
ClipPickupName["M4A1Clip"] = "some M4A1 Magazines";
ShowsClipInHud = 1;
ClipReloadTime = 6;
ClipReturn = 30;
InitialClips = 7;
//
HasChallenges = 1;
ChallengeCt = 11;
Challenge[1] = "M4A1 Killer\t50\t100\tGrip";
Challenge[2] = "M4A1 Hunter\t100\t250\tLaser";
Challenge[3] = "M4A1 Expert\t250\t500\tShotgun Attachment";
Challenge[4] = "M4A1 Master\t500\t1000\tGrenade Launcher Attachment";
Challenge[5] = "M4A1 Legend\t750\t1500\tMini-Launcher Attachment";
Challenge[6] = "M4A1 God\t1000\t2000\tSilencer";
Challenge[7] = "M4A1 Supremacy\t2500\t5000\tUnlimited Attachment Ammo";
Challenge[8] = "M4A1 Bronze Commendation\t5000\t10000\tNone";
Challenge[9] = "M4A1 Silver Commendation\t12500\t25000\tNone";
Challenge[10] = "M4A1 Gold Commendation\t25000\t50000\tNone";
Challenge[11] = "M4A1 Titan Commendation\t50000\t75000\tNone";
Upgrade[1] = "Grip";
Upgrade[2] = "Laser";
Upgrade[3] = "Shotgun Attachment";
Upgrade[4] = "Grenade Launcher Attachment";
Upgrade[5] = "Mini-Launcher Attachment";
Upgrade[6] = "Silencer";
GunName = "M4A1 Assault Rifle";
RankRequire = $TWM2::RankRequire["M4A1"];
casing = ShellDebris;
shellExitDir = "1.0 0.3 1.0";
shellExitOffset = "0.15 -0.56 -0.1";
shellExitVariance = 15.0;
shellVelocity = 3.0;
casing = ShellDebris;
shellExitDir = "1.0 0.3 1.0";
shellExitOffset = "0.15 -0.56 -0.1";
shellExitVariance = 15.0;
shellVelocity = 3.0;
projectileSpread = 8.0 / 1000.0;
projectileSpread = 8.0 / 1000.0;
//--------------------------------------
stateName[0] = "Activate";
stateSequence[0] = "Activate";
stateSound[0] = ChaingunSwitchSound;
stateAllowImageChange[0] = false;
//
stateTimeoutValue[0] = 0.5;
stateTransitionOnTimeout[0] = "Ready";
stateTransitionOnNoAmmo[0] = "NoAmmo";
//--------------------------------------
stateName[0] = "Activate";
stateSequence[0] = "Activate";
stateSound[0] = ChaingunSwitchSound;
stateAllowImageChange[0] = false;
//
stateTimeoutValue[0] = 0.5;
stateTransitionOnTimeout[0] = "Ready";
stateTransitionOnNoAmmo[0] = "NoAmmo";
//--------------------------------------
stateName[1] = "Ready";
stateSpinThread[1] = Stop;
//
stateTransitionOnTriggerDown[1] = "Spinup";
stateTransitionOnNoAmmo[1] = "NoAmmo";
//--------------------------------------
stateName[1] = "Ready";
stateSpinThread[1] = Stop;
//
stateTransitionOnTriggerDown[1] = "Spinup";
stateTransitionOnNoAmmo[1] = "NoAmmo";
//--------------------------------------
stateName[2] = "NoAmmo";
stateTransitionOnAmmo[2] = "Ready";
stateSpinThread[2] = Stop;
stateTransitionOnTriggerDown[2] = "DryFire";
//--------------------------------------
stateName[2] = "NoAmmo";
stateTransitionOnAmmo[2] = "Ready";
stateSpinThread[2] = Stop;
stateTransitionOnTriggerDown[2] = "DryFire";
//--------------------------------------
stateName[3] = "Spinup";
stateSpinThread[3] = SpinUp;
stateSound[3] = ChaingunSpinupSound;
//
stateTimeoutValue[3] = 0.01;
stateWaitForTimeout[3] = false;
stateTransitionOnTimeout[3] = "Fire";
stateTransitionOnTriggerUp[3] = "Spindown";
//--------------------------------------
stateName[3] = "Spinup";
stateSpinThread[3] = SpinUp;
stateSound[3] = ChaingunSpinupSound;
//
stateTimeoutValue[3] = 0.01;
stateWaitForTimeout[3] = false;
stateTransitionOnTimeout[3] = "Fire";
stateTransitionOnTriggerUp[3] = "Spindown";
//--------------------------------------
stateName[4] = "Fire";
stateSequence[4] = "Fire";
stateSequenceRandomFlash[4] = true;
stateSpinThread[4] = FullSpeed;
//stateSound[4] = ChaingunFireSound;
stateRecoil[4] = LightRecoil;
stateAllowImageChange[4] = false;
stateScript[4] = "onFire";
stateFire[4] = true;
stateEjectShell[4] = true;
//
stateTimeoutValue[4] = 0.08;
stateTransitionOnTimeout[4] = "Fire";
stateTransitionOnTriggerUp[4] = "Spindown";
stateTransitionOnNoAmmo[4] = "EmptySpindown";
//--------------------------------------
stateName[4] = "Fire";
stateSequence[4] = "Fire";
stateSequenceRandomFlash[4] = true;
stateSpinThread[4] = FullSpeed;
//stateSound[4] = ChaingunFireSound;
stateRecoil[4] = LightRecoil;
stateAllowImageChange[4] = false;
stateScript[4] = "onFire";
stateFire[4] = true;
stateEjectShell[4] = true;
//
stateTimeoutValue[4] = 0.08;
stateTransitionOnTimeout[4] = "Fire";
stateTransitionOnTriggerUp[4] = "Spindown";
stateTransitionOnNoAmmo[4] = "EmptySpindown";
//--------------------------------------
stateName[5] = "Spindown";
stateSound[5] = ChaingunSpinDownSound;
stateSpinThread[5] = SpinDown;
//
stateTimeoutValue[5] = 0.05;
stateWaitForTimeout[5] = true;
stateTransitionOnTimeout[5] = "Ready";
stateTransitionOnTriggerDown[5] = "Spinup";
//--------------------------------------
stateName[5] = "Spindown";
stateSound[5] = ChaingunSpinDownSound;
stateSpinThread[5] = SpinDown;
//
stateTimeoutValue[5] = 0.05;
stateWaitForTimeout[5] = true;
stateTransitionOnTimeout[5] = "Ready";
stateTransitionOnTriggerDown[5] = "Spinup";
//--------------------------------------
stateName[6] = "EmptySpindown";
stateSound[6] = ChaingunSpinDownSound;
stateSpinThread[6] = SpinDown;
//
stateTimeoutValue[6] = 0.5;
stateTransitionOnTimeout[6] = "NoAmmo";
//--------------------------------------
stateName[6] = "EmptySpindown";
stateSound[6] = ChaingunSpinDownSound;
stateSpinThread[6] = SpinDown;
//
stateTimeoutValue[6] = 0.5;
stateTransitionOnTimeout[6] = "NoAmmo";
//--------------------------------------
stateName[7] = "DryFire";
stateSound[7] = ChaingunDryFireSound;
stateTimeoutValue[7] = 0.5;
stateTransitionOnTimeout[7] = "NoAmmo";
//--------------------------------------
stateName[7] = "DryFire";
stateSound[7] = ChaingunDryFireSound;
stateTimeoutValue[7] = 0.5;
stateTransitionOnTimeout[7] = "NoAmmo";
};
datablock ItemData(M4A1)
{
className = Weapon;
catagory = "Spawn Items";
shapeFile = "weapon_energy_vehicle.dts";
image = M4A1Image;
mass = 1.0;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "an M4A1";
datablock ItemData(M4A1) {
className = Weapon;
catagory = "Spawn Items";
shapeFile = "weapon_energy_vehicle.dts";
image = M4A1Image;
mass = 1.0;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "an M4A1";
computeCRC = true;
emap = true;
computeCRC = true;
emap = true;
};
function M4A1::onInventory(%this,%obj,%amount) {
Parent::onInventory(%this, %obj, %amount);
%obj.canUseM4A1Attachment = 1;
if(%obj.client.UpgradeOn("Shotgun Attachment", M4A1Image)) {
%obj.M4A1ShotgunClip = 5;
}
if(%obj.client.UpgradeOn("Grenade Launcher Attachment", M4A1Image)) {
%obj.M4A1GLClip = 3;
}
if(%obj.client.UpgradeOn("Mini-Launcher Attachment", M4A1Image)) {
%obj.M4A1MLClip = 3;
}
Parent::onInventory(%this, %obj, %amount);
%obj.canUseM4A1Attachment = 1;
if(%obj.client.UpgradeOn("Shotgun Attachment", M4A1Image)) {
%obj.M4A1ShotgunClip = 5;
}
if(%obj.client.UpgradeOn("Grenade Launcher Attachment", M4A1Image)) {
%obj.M4A1GLClip = 3;
}
if(%obj.client.UpgradeOn("Mini-Launcher Attachment", M4A1Image)) {
%obj.M4A1MLClip = 3;
}
}
datablock ShapeBaseImageData(M4A1BarrelImage) {
ammo = M4A1Ammo;
shapeFile = "weapon_targeting.dts";
offset = "0.0 0.0 0.0";
emap = true;
ammo = M4A1Ammo;
shapeFile = "weapon_targeting.dts";
offset = "0.0 0.0 0.0";
emap = true;
};
datablock ShapeBaseImageData(M4A1ScopeImage) {
className = WeaponImage;
shapeFile = "weapon_targeting.dts";
offset = "0.0 1.4 0.4";
rotation = "180 0 0 90";
className = WeaponImage;
shapeFile = "weapon_targeting.dts";
offset = "0.0 1.4 0.4";
rotation = "180 0 0 90";
ammo = M4A1Ammo;
ammo = M4A1Ammo;
emap = true;
emap = true;
};
function M4A1Image::onMount(%this,%obj,%slot) {
Parent::onMount(%this, %obj, %slot);
%obj.mountImage(M4A1BarrelImage, 3);
%obj.mountImage(M4A1ScopeImage, 4);
Parent::onMount(%this, %obj, %slot);
%obj.mountImage(M4A1BarrelImage, 3);
%obj.mountImage(M4A1ScopeImage, 4);
}
function M4A1Image::onUnmount(%this,%obj,%slot) {
Parent::onUnmount(%this, %obj, %slot);
%obj.unmountImage(3);
%obj.unmountImage(4);
Parent::onUnmount(%this, %obj, %slot);
%obj.unmountImage(3);
%obj.unmountImage(4);
}
function M4A1Image::onFire(%data, %obj, %slot) {
%p = Parent::onFire(%data, %obj, %slot);
if(%obj.client.UpgradeOn("Silencer", %data.getName())) {
//zero sound :p
}
else {
ServerPlay3d(ChaingunFireSound, %obj.getPosition());
}
%p = Parent::onFire(%data, %obj, %slot);
if(%obj.client.UpgradeOn("Silencer", %data.getName())) {
//zero sound :p
}
else {
ServerPlay3d(ChaingunFireSound, %obj.getPosition());
}
}
function M4A1RefreshAttachment(%obj) {
%obj.canUseM4A1Attachment = 1;
}
%obj.canUseM4A1Attachment = 1;
}

View file

@ -1,176 +1,171 @@
datablock TracerProjectileData(PulseRifleBullet) {
doDynamicClientHits = true;
doDynamicClientHits = true;
directDamage = 0.2;
explosion = "BlasterExplosion";
splash = ChaingunSplash;
directDamage = 0.38;
explosion = "BlasterExplosion";
splash = ChaingunSplash;
directDamageType = $DamageType::ShrikeBlaster;
kickBackStrength = 0.0;
directDamageType = $DamageType::ShrikeBlaster;
kickBackStrength = 0.0;
sound = ShrikeBlasterProjectileSound;
ImageSource = "PulseRifleImage";
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;
ImageSource = "PulseRifleImage";
tracerLength = 45.0;
tracerAlpha = false;
tracerMinPixels = 6;
tracerColor = "1.0 0.0 0.0 0.0";
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;
crossSize = 0.99;
crossViewAng = 0.990;
renderCross = true;
};
datablock ItemData(PulseRifleAmmo)
{
className = Ammo;
catagory = "Ammo";
shapeFile = "ammo_chaingun.dts";
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
datablock ItemData(PulseRifleAmmo) {
className = Ammo;
catagory = "Ammo";
shapeFile = "ammo_chaingun.dts";
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "Some Pulse Rifle Bullets";
computeCRC = true;
computeCRC = true;
};
datablock ShapeBaseImageData(PulseRifleImage)
{
className = WeaponImage;
shapeFile = "weapon_sniper.dts";
mass = 10;
item = PulseRifle;
ammo = PulseRifleAmmo;
projectile = PulseRifleBullet;
projectileType = TracerProjectile;
emap = true;
datablock ShapeBaseImageData(PulseRifleImage) {
className = WeaponImage;
shapeFile = "weapon_sniper.dts";
mass = 10;
item = PulseRifle;
ammo = PulseRifleAmmo;
projectile = PulseRifleBullet;
projectileType = TracerProjectile;
emap = true;
//ClipStuff
ClipName = "PulseRifleClip";
ClipPickupName["PulseRifleClip"] = "some Pulse Clip Cartons";
ShowsClipInHud = 1;
ClipReloadTime = 5;
ClipReturn = 20;
InitialClips = 7;
//
//Challenges
HasChallenges = 1;
ChallengeCt = 8;
Challenge[1] = "Pulse Hunter\t75\t150\tNone";
Challenge[2] = "Pulse Expert\t150\t250\tGrip";
Challenge[3] = "Pulse Master\t350\t500\tLaser";
Challenge[4] = "Pulse God\t600\t1000\tSilencer";
Challenge[5] = "Pulse Bronze Commendation\t2500\t10000\tNone";
Challenge[6] = "Pulse Silver Commendation\t5000\t25000\tNone";
Challenge[7] = "Pulse Gold Commendation\t10000\t50000\tNone";
Challenge[8] = "Pulse Titan Commendation\t25000\t75000\tNone";
Upgrade[1] = "Grip";
Upgrade[2] = "Laser";
Upgrade[3] = "Silencer";
GunName = "Pulse Semi-Automatic Rifle";
//
//ClipStuff
ClipName = "PulseRifleClip";
ClipPickupName["PulseRifleClip"] = "some Pulse Clip Cartons";
ShowsClipInHud = 1;
ClipReloadTime = 5;
ClipReturn = 20;
InitialClips = 7;
//
//Challenges
HasChallenges = 1;
ChallengeCt = 8;
Challenge[1] = "Pulse Hunter\t75\t150\tNone";
Challenge[2] = "Pulse Expert\t150\t250\tGrip";
Challenge[3] = "Pulse Master\t350\t500\tLaser";
Challenge[4] = "Pulse God\t600\t1000\tSilencer";
Challenge[5] = "Pulse Bronze Commendation\t2500\t10000\tNone";
Challenge[6] = "Pulse Silver Commendation\t5000\t25000\tNone";
Challenge[7] = "Pulse Gold Commendation\t10000\t50000\tNone";
Challenge[8] = "Pulse Titan Commendation\t25000\t75000\tNone";
Upgrade[1] = "Grip";
Upgrade[2] = "Laser";
Upgrade[3] = "Silencer";
GunName = "Pulse Semi-Automatic Rifle";
//
//RankRequire = $TWM2::RankRequire["G41"];
PrestigeRequire = 2;
//RankRequire = $TWM2::RankRequire["G41"];
PrestigeRequire = 2;
casing = ShellDebris;
shellExitDir = "1.0 0.3 1.0";
shellExitOffset = "0.15 -0.56 -0.1";
shellExitVariance = 15.0;
shellVelocity = 3.0;
casing = ShellDebris;
shellExitDir = "1.0 0.3 1.0";
shellExitOffset = "0.15 -0.56 -0.1";
shellExitVariance = 15.0;
shellVelocity = 3.0;
projectileSpread = 2.0 / 1000.0;
projectileSpread = 2.0 / 1000.0;
stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "ActivateReady";
stateTimeoutValue[0] = 0.5;
stateSequence[0] = "Activate";
stateSound[0] = ChaingunSwitchSound;
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[1] = "ActivateReady";
stateTransitionOnLoaded[1] = "Ready";
stateTransitionOnNoAmmo[1] = "NoAmmo";
stateName[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTransitionOnTriggerDown[2] = "CheckWet";
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";
stateEmitterTime[3] = 0.2;
//stateSound[3] = S3FireSound;
stateName[3] = "Fire";
stateTransitionOnTimeout[3] = "Reload";
stateTimeoutValue[3] = 0.01;
stateFire[3] = true;
stateRecoil[3] = LightRecoil;
stateAllowImageChange[3] = false;
stateScript[3] = "onFire";
stateEmitterTime[3] = 0.2;
//stateSound[3] = S3FireSound;
stateName[4] = "Reload";
stateTransitionOnNoAmmo[4] = "NoAmmo";
stateTransitionOnTimeout[4] = "Ready";
stateTimeoutValue[4] = 0.3;
stateAllowImageChange[4] = false;
stateSequence[4] = "Reload";
stateName[4] = "Reload";
stateTransitionOnNoAmmo[4] = "NoAmmo";
stateTransitionOnTimeout[4] = "Ready";
stateTimeoutValue[4] = 0.1;
stateAllowImageChange[4] = false;
stateSequence[4] = "Reload";
stateName[5] = "NoAmmo";
stateTransitionOnAmmo[5] = "Reload";
stateSequence[5] = "NoAmmo";
stateTransitionOnTriggerDown[5] = "DryFire";
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[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[7] = "WetFire";
stateSound[7] = PlasmaFireWetSound;
stateTimeoutValue[7] = 1.0;
stateTransitionOnTimeout[7] = "Ready";
stateName[8] = "CheckWet";
stateTransitionOnWet[8] = "WetFire";
stateTransitionOnNotWet[8] = "Fire";
stateName[8] = "CheckWet";
stateTransitionOnWet[8] = "WetFire";
stateTransitionOnNotWet[8] = "Fire";
};
datablock ItemData(PulseRifle)
{
className = Weapon;
catagory = "Spawn Items";
shapeFile = "weapon_sniper.dts";
image = PulseRifleImage;
mass = 1.0;
elasticity = 0.0;
friction = 0.6;
pickupRadius = 2;
pickUpName = "an Pulse Semi-Automatic Rifle";
datablock ItemData(PulseRifle) {
className = Weapon;
catagory = "Spawn Items";
shapeFile = "weapon_sniper.dts";
image = PulseRifleImage;
mass = 1.0;
elasticity = 0.0;
friction = 0.6;
pickupRadius = 2;
pickUpName = "an Pulse Semi-Automatic Rifle";
computeCRC = true;
emap = true;
computeCRC = true;
emap = true;
};
function PulseRifleImage::onFire(%data, %obj, %slot) {
%p = Parent::onFire(%data, %obj, %slot);
if(%obj.client.UpgradeOn("Silencer", %data.getName())) {
//zero sound :p
}
else {
ServerPlay3d(S3FireSound, %obj.getPosition());
}
}
%p = Parent::onFire(%data, %obj, %slot);
if(%obj.client.UpgradeOn("Silencer", %data.getName())) {
//zero sound :p
}
else {
ServerPlay3d(S3FireSound, %obj.getPosition());
}
}

View file

@ -1,111 +1,90 @@
datablock AudioProfile(R700FireSound) {
filename = "fx/weapons/cg_metal3.wav";
description = AudioDefault3d;
preload = true;
filename = "fx/weapons/cg_metal3.wav";
description = AudioDefault3d;
preload = true;
};
datablock ParticleData(R700SmokeParticle)
{
dragCoeffiecient = 0.0;
gravityCoefficient = -0.02;
inheritedVelFactor = 0.1;
datablock ParticleData(R700SmokeParticle) {
dragCoeffiecient = 0.0;
gravityCoefficient = -0.02;
inheritedVelFactor = 0.1;
lifetimeMS = 1200;
lifetimeVarianceMS = 100;
lifetimeMS = 1200;
lifetimeVarianceMS = 100;
textureName = "particleTest";
textureName = "particleTest";
useInvAlpha = false;
spinRandomMin = -90.0;
spinRandomMax = 90.0;
colors[0] = "1 1 1";
colors[1] = "1 1 1";
colors[2] = "1 1 1";
sizes[0] = 1;
sizes[1] = 1.2;
sizes[2] = 1.4;
times[0] = 0.0;
times[1] = 0.1;
times[2] = 1.0;
useInvAlpha = false;
spinRandomMin = -90.0;
spinRandomMax = 90.0;
colors[0] = "1 1 1";
colors[1] = "1 1 1";
colors[2] = "1 1 1";
sizes[0] = 1;
sizes[1] = 1.2;
sizes[2] = 1.4;
times[0] = 0.0;
times[1] = 0.1;
times[2] = 1.0;
};
datablock ParticleEmitterData(R700SmokeEmitter)
{
ejectionPeriodMS = 10;
periodVarianceMS = 0;
datablock ParticleEmitterData(R700SmokeEmitter) {
ejectionPeriodMS = 10;
periodVarianceMS = 0;
ejectionVelocity = 1.5;
velocityVariance = 0.3;
ejectionVelocity = 1.5;
velocityVariance = 0.3;
thetaMin = 0.0;
thetaMax = 50.0;
thetaMin = 0.0;
thetaMax = 50.0;
particles = "R700SmokeParticle";
particles = "R700SmokeParticle";
};
datablock LinearFlareProjectileData(R700Bullet)
{
projectileShapeName = "weapon_missile_projectile.dts";
scale = "1.0 1.0 1.0";
faceViewer = true;
directDamage = 0.62;
kickBackStrength = 6400;
radiusDamageType = $DamageType::R700;
HeadMultiplier = 1.5;
LegsMultiplier = 0.35;
datablock GrenadeProjectileData(R700Bullet) {
projectileShapeName = "weapon_missile_projectile.dts";
emitterDelay = -1;
directDamage = 0.62;
hasDamageRadius = false;
directDamageType = $DamageType::R700;
kickBackStrength = 6400;
bubbleEmitTime = 1.0;
HeadShotKill = 1;
HeadMultiplier = 1.5;
LegsMultiplier = 0.35;
ImageSource = "R700SniperRifleImage";
HeadShotKill = 1;
explosion = "ChaingunExplosion";
splash = ChaingunSplash;
ImageSource = "R700SniperRifleImage";
baseEmitter = R700SmokeEmitter;
sound = ChaingunProjectile;
explosion = "ChaingunExplosion";
underwaterExplosion = "ChaingunExplosion";
velInheritFactor = 0.5;
splash = ChaingunSplash;
dryVelocity = 2000.0;
wetVelocity = 2000.0;
velInheritFactor = 1.0;
fizzleTimeMS = 1000;
lifetimeMS = 1000;
explodeOnDeath = false;
reflectOnWaterImpactAngle = 0.0;
explodeOnWaterImpact = false;
deflectionOnWaterImpact = 0.0;
fizzleUnderwaterMS = 3000;
baseEmitter = R700SmokeEmitter;
bubbleEmitter = R700SmokeEmitter;
//activateDelayMS = 100;
activateDelayMS = -1;
size[0] = 0.2;
size[1] = 0.5;
size[2] = 0.1;
numFlares = 5; //less flares = less lag
flareColor = "1 0.18 0.03";
flareModTexture = "flaremod";
flareBaseTexture = "flarebase";
hasLight = true;
lightRadius = 10.0;
lightColor = "0.94 0.03 0.12";
grenadeElasticity = 0.35;
grenadeFriction = 0.2;
armingDelayMS = 1;
muzzleVelocity = 2000.00;
drag = 0.1;
};
datablock ItemData(R700SniperRifleAmmo)
{
className = Ammo;
catagory = "Ammo";
shapeFile = "ammo_chaingun.dts";
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
datablock ItemData(R700SniperRifleAmmo) {
className = Ammo;
catagory = "Ammo";
shapeFile = "ammo_chaingun.dts";
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "Some R700 Sniper Rifle Ammo";
computeCRC = true;
computeCRC = true;
};
@ -113,156 +92,154 @@ datablock ItemData(R700SniperRifleAmmo)
// Weapon
//--------------------------------------
datablock ShapeBaseImageData(R700SniperRifleImage) {
className = WeaponImage;
shapeFile = "weapon_sniper.dts";
mass = 10;
item = R700SniperRifle;
ammo = R700SniperRifleAmmo;
projectile = R700Bullet;
projectileType = GrenadeProjectile;
emap = true;
className = WeaponImage;
shapeFile = "weapon_sniper.dts";
mass = 10;
item = R700SniperRifle;
ammo = R700SniperRifleAmmo;
projectile = R700Bullet;
projectileType = LinearFlareProjectile;
emap = true;
armThread = looksn;
armThread = looksn;
//ClipStuff
ClipName = "R700Clip";
ClipPickupName["R700Clip"] = "A Few Boxes Of R700 Sniper Bullets";
ShowsClipInHud = 1;
ClipReloadTime = 7;
ClipReturn = 4;
InitialClips = 6;
//
//Challenges
HasChallenges = 1;
ChallengeCt = 8;
Challenge[1] = "R700 Hunter\t100\t150\tNone";
Challenge[2] = "R700 Expert\t200\t250\tNone";
Challenge[3] = "R700 Master\t500\t500\tLaser";
Challenge[4] = "R700 God\t1000\t1000\tSilencer";
Challenge[5] = "R700 Bronze Commendation\t2500\t10000\tNone";
Challenge[6] = "R700 Silver Commendation\t5000\t25000\tNone";
Challenge[7] = "R700 Gold Commendation\t10000\t50000\tNone";
Challenge[8] = "R700 Titan Commendation\t25000\t75000\tNone";
Upgrade[1] = "Laser";
Upgrade[2] = "Silencer";
GunName = "R700 Sniper Rifle";
//
//ClipStuff
ClipName = "R700Clip";
ClipPickupName["R700Clip"] = "A Few Boxes Of R700 Sniper Bullets";
ShowsClipInHud = 1;
ClipReloadTime = 7;
ClipReturn = 4;
InitialClips = 6;
//
//Challenges
HasChallenges = 1;
ChallengeCt = 8;
Challenge[1] = "R700 Hunter\t100\t150\tNone";
Challenge[2] = "R700 Expert\t200\t250\tNone";
Challenge[3] = "R700 Master\t500\t500\tLaser";
Challenge[4] = "R700 God\t1000\t1000\tSilencer";
Challenge[5] = "R700 Bronze Commendation\t2500\t10000\tNone";
Challenge[6] = "R700 Silver Commendation\t5000\t25000\tNone";
Challenge[7] = "R700 Gold Commendation\t10000\t50000\tNone";
Challenge[8] = "R700 Titan Commendation\t25000\t75000\tNone";
Upgrade[1] = "Laser";
Upgrade[2] = "Silencer";
GunName = "R700 Sniper Rifle";
//
RankRequire = $TWM2::RankRequire["R700"];
RankRequire = $TWM2::RankRequire["R700"];
casing = ShellDebris;
shellExitDir = "1.0 0.3 1.0";
shellExitOffset = "0.15 -0.56 -0.1";
shellExitVariance = 15.0;
shellVelocity = 3.0;
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[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[1] = "ActivateReady";
stateTransitionOnLoaded[1] = "Ready";
stateTransitionOnNoAmmo[1] = "NoAmmo";
stateName[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTransitionOnTriggerDown[2] = "CheckWet";
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] = "R700FireSound";
stateName[3] = "Fire";
stateTransitionOnTimeout[3] = "Reload";
stateTimeoutValue[3] = 0.01;
stateFire[3] = true;
stateRecoil[3] = LightRecoil;
stateAllowImageChange[3] = false;
stateScript[3] = "onFire";
//stateSound[3] = "R700FireSound";
stateName[4] = "Reload";
stateTransitionOnNoAmmo[4] = "NoAmmo";
stateTransitionOnTimeout[4] = "Ready";
stateTimeoutValue[4] = 1.2;
stateAllowImageChange[4] = false;
stateSequence[4] = "Reload";
stateName[4] = "Reload";
stateTransitionOnNoAmmo[4] = "NoAmmo";
stateTransitionOnTimeout[4] = "Ready";
stateTimeoutValue[4] = 1.2;
stateAllowImageChange[4] = false;
stateSequence[4] = "Reload";
stateName[5] = "NoAmmo";
stateTransitionOnAmmo[5] = "Reload";
stateSequence[5] = "NoAmmo";
stateTransitionOnTriggerDown[5] = "DryFire";
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[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[7] = "WetFire";
stateSound[7] = PlasmaFireWetSound;
stateTimeoutValue[7] = 1.0;
stateTransitionOnTimeout[7] = "Ready";
stateName[8] = "CheckWet";
stateTransitionOnWet[8] = "WetFire";
stateTransitionOnNotWet[8] = "Fire";
stateName[8] = "CheckWet";
stateTransitionOnWet[8] = "WetFire";
stateTransitionOnNotWet[8] = "Fire";
};
datablock ItemData(R700SniperRifle)
{
className = Weapon;
catagory = "Spawn Items";
shapeFile = "weapon_sniper.dts";
image = R700SniperRifleImage;
mass = 1.0;
elasticity = 0.0;
friction = 0.6;
pickupRadius = 2;
pickUpName = "a R700 Sniper Rifle";
datablock ItemData(R700SniperRifle) {
className = Weapon;
catagory = "Spawn Items";
shapeFile = "weapon_sniper.dts";
image = R700SniperRifleImage;
mass = 1.0;
elasticity = 0.0;
friction = 0.6;
pickupRadius = 2;
pickUpName = "a R700 Sniper Rifle";
computeCRC = true;
emap = true;
computeCRC = true;
emap = true;
};
datablock ShapeBaseImageData(R700ScopeImage) {
className = WeaponImage;
shapeFile = "weapon_targeting.dts";
offset = "0.0 1.0 0.4";
rotation = "180 0 0 90";
ammo = R700SniperRifleAmmo;
armThread = looksn;
emap = true;
className = WeaponImage;
shapeFile = "weapon_targeting.dts";
offset = "0.0 1.0 0.4";
rotation = "180 0 0 90";
ammo = R700SniperRifleAmmo;
armThread = looksn;
emap = true;
};
function R700SniperRifleImage::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(R700ScopeImage, 5);
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(R700ScopeImage, 5);
}
function R700SniperRifleImage::onUnmount(%this,%obj,%slot) {
Parent::onUnmount(%this, %obj, %slot);
%obj.unmountImage(5);
Parent::onUnmount(%this, %obj, %slot);
%obj.unmountImage(5);
}
function R700SniperRifleImage::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);
if(%obj.client.UpgradeOn("Silencer", %data.getName())) {
//zero sound :p
}
else {
ServerPlay3d(R700FireSound, %obj.getPosition());
}
}
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);
if(%obj.client.UpgradeOn("Silencer", %data.getName())) {
//zero sound :p
}
else {
ServerPlay3d(R700FireSound, %obj.getPosition());
}
}

View file

@ -1,248 +1,238 @@
datablock AudioProfile(LaserRifleFireSound)
{
filename = "fx/weapons/sniper_fire.wav";
description = AudioClose3d;
preload = true;
datablock AudioProfile(LaserRifleFireSound) {
filename = "fx/weapons/sniper_fire.wav";
description = AudioClose3d;
preload = true;
};
datablock ParticleData(RedFlareParticle)
{
dragCoeffiecient = 0.0;
gravityCoefficient = 0.15;
inheritedVelFactor = 0.5;
datablock ParticleData(RedFlareParticle) {
dragCoeffiecient = 0.0;
gravityCoefficient = 0.15;
inheritedVelFactor = 0.5;
lifetimeMS = 1800;
lifetimeVarianceMS = 200;
lifetimeMS = 1800;
lifetimeVarianceMS = 200;
textureName = "special/flareSpark";
textureName = "special/flareSpark";
colors[0] = "1.0 1.0 1.0 1.0";
colors[1] = "1.0 1.0 1.0 1.0";
colors[2] = "1.0 1.0 1.0 0.0";
colors[0] = "1.0 1.0 1.0 1.0";
colors[1] = "1.0 1.0 1.0 1.0";
colors[2] = "1.0 1.0 1.0 0.0";
sizes[0] = 0.6;
sizes[1] = 0.3;
sizes[2] = 0.1;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
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(RedFlareemmiter)
{
ejectionPeriodMS = 10;
periodVarianceMS = 0;
datablock ParticleEmitterData(RedFlareemmiter){
ejectionPeriodMS = 10;
periodVarianceMS = 0;
ejectionVelocity = 1.0;
velocityVariance = 0.0;
ejectionVelocity = 1.0;
velocityVariance = 0.0;
thetaMin = 0.0;
thetaMax = 90.0;
thetaMin = 0.0;
thetaMax = 90.0;
orientParticles = true;
orientOnVelocity = false;
orientParticles = true;
orientOnVelocity = false;
particles = "RedFlareParticle";
particles = "RedFlareParticle";
};
datablock LinearFlareProjectileData(LaserShot)
{
scale = "1.0 1.0 1.0";
faceViewer = false;
directDamage = 0.6;
kickBackStrength = 100.0;
directDamageType = $DamageType::LaserRifle;
datablock LinearFlareProjectileData(LaserShot) {
scale = "1.0 1.0 1.0";
faceViewer = false;
directDamage = 0.6;
kickBackStrength = 100.0;
directDamageType = $DamageType::LaserRifle;
explosion = "BlasterExplosion";
splash = PlasmaSplash;
explosion = "BlasterExplosion";
splash = PlasmaSplash;
ImageSource = "lasergunImage";
ImageSource = "lasergunImage";
dryVelocity = 200.0;
wetVelocity = 10;
velInheritFactor = 0.5;
fizzleTimeMS = 30000;
lifetimeMS = 30000;
explodeOnDeath = false;
reflectOnWaterImpactAngle = 0.0;
explodeOnWaterImpact = true;
deflectionOnWaterImpact = 0.0;
fizzleUnderwaterMS = -1;
dryVelocity = 200.0;
wetVelocity = 10;
velInheritFactor = 0.5;
fizzleTimeMS = 30000;
lifetimeMS = 30000;
explodeOnDeath = false;
reflectOnWaterImpactAngle = 0.0;
explodeOnWaterImpact = true;
deflectionOnWaterImpact = 0.0;
fizzleUnderwaterMS = -1;
baseEmitter = RedFlareemmiter;
delayEmitter = RedFlareemmiter;
bubbleEmitter = RedFlareemmiter;
baseEmitter = RedFlareemmiter;
delayEmitter = RedFlareemmiter;
bubbleEmitter = RedFlareemmiter;
//activateDelayMS = 100;
activateDelayMS = -1;
//activateDelayMS = 100;
activateDelayMS = -1;
size[0] = 0.2;
size[1] = 0.2;
size[2] = 0.2;
size[0] = 0.2;
size[1] = 0.2;
size[2] = 0.2;
numFlares = 15;
flareColor = "1 0 0";
flareModTexture = "flaremod";
flareBaseTexture = "flarebase";
numFlares = 15;
flareColor = "1 0 0";
flareModTexture = "flaremod";
flareBaseTexture = "flarebase";
sound = MissileProjectileSound;
fireSound = PlasmaFireSound;
wetFireSound = PlasmaFireWetSound;
hasLight = true;
lightRadius = 3.0;
lightColor = "1 0 0";
sound = MissileProjectileSound;
fireSound = PlasmaFireSound;
wetFireSound = PlasmaFireWetSound;
hasLight = true;
lightRadius = 3.0;
lightColor = "1 0 0";
};
//--------------------------------------------------------------------------
// Ammo
//--------------------------------------
datablock ItemData(lasergunAmmo)
{
className = Ammo;
catagory = "Ammo";
shapeFile = "ammo_chaingun.dts";
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
datablock ItemData(lasergunAmmo){
className = Ammo;
catagory = "Ammo";
shapeFile = "ammo_chaingun.dts";
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "some laser rifle ammo";
computeCRC = true;
computeCRC = true;
};
//--------------------------------------------------------------------------
// Weapon
//--------------------------------------
datablock ShapeBaseImageData(lasergunImage)
{
className = WeaponImage;
shapeFile = "weapon_sniper.dts";
item = lasergun;
ammo = lasergunAmmo;
projectile = LaserShot;
projectileType = LinearFlareProjectile;
emap = true;
datablock ShapeBaseImageData(lasergunImage) {
className = WeaponImage;
shapeFile = "weapon_sniper.dts";
item = lasergun;
ammo = lasergunAmmo;
projectile = LaserShot;
projectileType = LinearFlareProjectile;
emap = true;
armThread = looksn;
mass = 10;
mass = 10;
casing = ShellDebris;
shellExitDir = "1.0 0.3 1.0";
shellExitOffset = "0.15 -0.56 -0.1";
shellExitVariance = 15.0;
shellVelocity = 3.0;
casing = ShellDebris;
shellExitDir = "1.0 0.3 1.0";
shellExitOffset = "0.15 -0.56 -0.1";
shellExitVariance = 15.0;
shellVelocity = 3.0;
//ClipStuff
ClipName = "lasergunClip";
ClipPickupName["lasergunClip"] = "A Photonic Laser Battery";
ShowsClipInHud = 1;
ClipReloadTime = 6;
ClipReturn = 10;
InitialClips = 5;
//
//Challenges
HasChallenges = 1;
ChallengeCt = 8;
Challenge[1] = "Laser Rifle Blaster\t100\t250\tNone";
Challenge[2] = "Laser Rifle Expert\t250\t500\tGrip";
Challenge[3] = "Laser Rifle Master\t750\t1000\tLaser";
Challenge[4] = "Laser Rifle God\t1500\t2000\tSilencer";
Challenge[5] = "Laser Rifle Bronze Commendation\t5000\t10000\tNone";
Challenge[6] = "Laser Rifle Silver Commendation\t10000\t25000\tNone";
Challenge[7] = "Laser Rifle Gold Commendation\t25000\t50000\tNone";
Challenge[8] = "Laser Rifle Titan Commendation\t50000\t75000\tNone";
Upgrade[1] = "Grip";
Upgrade[2] = "Laser";
Upgrade[3] = "Silencer";
GunName = "RSA Laser Rifle";
//
//ClipStuff
ClipName = "lasergunClip";
ClipPickupName["lasergunClip"] = "A Photonic Laser Battery";
ShowsClipInHud = 1;
ClipReloadTime = 6;
ClipReturn = 10;
InitialClips = 5;
//
//Challenges
HasChallenges = 1;
ChallengeCt = 8;
Challenge[1] = "Laser Rifle Blaster\t100\t250\tNone";
Challenge[2] = "Laser Rifle Expert\t250\t500\tGrip";
Challenge[3] = "Laser Rifle Master\t750\t1000\tLaser";
Challenge[4] = "Laser Rifle God\t1500\t2000\tSilencer";
Challenge[5] = "Laser Rifle Bronze Commendation\t5000\t10000\tNone";
Challenge[6] = "Laser Rifle Silver Commendation\t10000\t25000\tNone";
Challenge[7] = "Laser Rifle Gold Commendation\t25000\t50000\tNone";
Challenge[8] = "Laser Rifle Titan Commendation\t50000\t75000\tNone";
Upgrade[1] = "Grip";
Upgrade[2] = "Laser";
Upgrade[3] = "Silencer";
GunName = "UR-22 Laser Rifle";
//
RankRequire = $TWM2::RankRequire["RSALaserRifle"];
RankRequire = $TWM2::RankRequire["RSALaserRifle"];
maxSpread = 10.0 / 1000.0;
maxSpread = 10.0 / 1000.0;
stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "ActivateReady";
stateTimeoutValue[0] = 0.5;
stateSequence[0] = "Activate";
stateSound[0] = ChaingunSwitchSound;
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[1] = "ActivateReady";
stateTransitionOnLoaded[1] = "Ready";
stateTransitionOnNoAmmo[1] = "NoAmmo";
stateName[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTransitionOnTriggerDown[2] = "CheckWet";
stateName[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTransitionOnTriggerDown[2] = "CheckWet";
stateName[3] = "Fire";
stateTransitionOnTimeout[3] = "Reload";
stateTimeoutValue[3] = 0.0001;
stateFire[3] = true;
stateEmitter[3] = "GunFireEffectEmitter";
stateEmitterNode[3] = "muzzlepoint1";
stateEmitterTime[3] = 1;
stateRecoil[3] = LightRecoil;
stateAllowImageChange[3] = false;
stateScript[3] = "onFire";
stateEmitterTime[3] = 0.1;
//stateSound[3] = LaserRifleFireSound;
stateName[3] = "Fire";
stateTransitionOnTimeout[3] = "Reload";
stateTimeoutValue[3] = 0.0001;
stateFire[3] = true;
stateEmitter[3] = "GunFireEffectEmitter";
stateEmitterNode[3] = "muzzlepoint1";
stateEmitterTime[3] = 1;
stateRecoil[3] = LightRecoil;
stateAllowImageChange[3] = false;
stateScript[3] = "onFire";
stateEmitterTime[3] = 0.1;
//stateSound[3] = LaserRifleFireSound;
stateName[4] = "Reload";
stateTransitionOnNoAmmo[4] = "NoAmmo";
stateTransitionOnTimeout[4] = "Ready";
stateTimeoutValue[4] = 0.7;
stateAllowImageChange[4] = false;
stateSequence[4] = "Reload";
stateName[4] = "Reload";
stateTransitionOnNoAmmo[4] = "NoAmmo";
stateTransitionOnTimeout[4] = "Ready";
stateTimeoutValue[4] = 0.7;
stateAllowImageChange[4] = false;
stateSequence[4] = "Reload";
stateName[5] = "NoAmmo";
stateTransitionOnAmmo[5] = "Reload";
stateSequence[5] = "NoAmmo";
stateTransitionOnTriggerDown[5] = "DryFire";
stateName[5] = "NoAmmo";
stateTransitionOnAmmo[5] = "Reload";
stateSequence[5] = "NoAmmo";
stateTransitionOnTriggerDown[5] = "DryFire";
stateName[6] = "DryFire";
stateSound[6] = ChaingunDryFireSound;
stateTimeoutValue[6] = 0.2;
stateTransitionOnTimeout[6] = "NoAmmo";
stateName[6] = "DryFire";
stateSound[6] = ChaingunDryFireSound;
stateTimeoutValue[6] = 0.2;
stateTransitionOnTimeout[6] = "NoAmmo";
stateName[7] = "WetFire";
stateSound[7] = ChaingunDryFireSound;
stateTimeoutValue[7] = 0.2;
stateTransitionOnTimeout[7] = "Ready";
stateName[7] = "WetFire";
stateSound[7] = ChaingunDryFireSound;
stateTimeoutValue[7] = 0.2;
stateTransitionOnTimeout[7] = "Ready";
stateName[8] = "CheckWet";
stateTransitionOnWet[8] = "WetFire";
stateTransitionOnNotWet[8] = "Fire";
stateName[8] = "CheckWet";
stateTransitionOnWet[8] = "WetFire";
stateTransitionOnNotWet[8] = "Fire";
};
datablock ItemData(lasergun)
{
className = Weapon;
catagory = "Spawn Items";
shapeFile = "weapon_chaingun.dts";
image = lasergunImage;
mass = 1.0;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "a Laser Rifle";
datablock ItemData(lasergun) {
className = Weapon;
catagory = "Spawn Items";
shapeFile = "weapon_chaingun.dts";
image = lasergunImage;
mass = 1.0;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "a UR-22 Laser Rifle";
computeCRC = true;
emap = true;
computeCRC = true;
emap = true;
};
function lasergunImage::onFire(%data, %obj, %slot) {
%p = Parent::onFire(%data, %obj, %slot);
if(%obj.client.UpgradeOn("Silencer", %data.getName())) {
//zero sound :p
}
else {
ServerPlay3d(LaserRifleFireSound, %obj.getPosition());
}
}
%p = Parent::onFire(%data, %obj, %slot);
if(%obj.client.UpgradeOn("Silencer", %data.getName())) {
//zero sound :p
}
else {
ServerPlay3d(LaserRifleFireSound, %obj.getPosition());
}
}

View file

@ -1,225 +1,217 @@
datablock AudioProfile(S3FireSound)
{
filename = "fx/vehicles/tank_chaingun.wav";
description = AudioDefault3d;
preload = true;
datablock AudioProfile(S3FireSound) {
filename = "fx/vehicles/tank_chaingun.wav";
description = AudioDefault3d;
preload = true;
};
datablock TracerProjectileData(S3Bullet)
{
doDynamicClientHits = true;
datablock TracerProjectileData(S3Bullet) {
doDynamicClientHits = true;
directDamage = 0.7;
directDamageType = $DamageType::S3;
explosion = "ChaingunExplosion";
splash = ChaingunSplash;
HeadMultiplier = 1.5;
LegsMultiplier = 0.35;
directDamage = 0.5;
directDamageType = $DamageType::S3;
explosion = "ChaingunExplosion";
splash = ChaingunSplash;
HeadMultiplier = 1.5;
LegsMultiplier = 0.35;
HeadShotKill = 1;
HeadShotKill = 1;
kickBackStrength = 15.0;
sound = ChaingunProjectile;
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;
ImageSource = "S3RifleImage";
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";
ImageSource = "S3RifleImage";
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;
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;
decalData[0] = ChaingunDecal1;
decalData[1] = ChaingunDecal2;
decalData[2] = ChaingunDecal3;
decalData[3] = ChaingunDecal4;
decalData[4] = ChaingunDecal5;
decalData[5] = ChaingunDecal6;
};
datablock ItemData(S3RifleAmmo)
{
className = Ammo;
catagory = "Ammo";
shapeFile = "ammo_chaingun.dts";
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
datablock ItemData(S3RifleAmmo) {
className = Ammo;
catagory = "Ammo";
shapeFile = "ammo_chaingun.dts";
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "Some S3 Rifle Bullets";
computeCRC = true;
computeCRC = true;
};
datablock ShapeBaseImageData(S3RifleImage)
{
className = WeaponImage;
shapeFile = "weapon_sniper.dts";
mass = 10;
item = S3Rifle;
ammo = S3RifleAmmo;
projectile = S3Bullet;
projectileType = TracerProjectile;
emap = true;
//ClipStuff
ClipName = "S3RifleClip";
ClipPickupName["S3RifleClip"] = "some S3 Clip Cartridges";
ShowsClipInHud = 1;
ClipReloadTime = 4;
ClipReturn = 10;
InitialClips = 6;
//
//Challenges
HasChallenges = 1;
ChallengeCt = 9;
Challenge[1] = "S3 Killer\t50\t100\tNone";
Challenge[2] = "S3 Extremist\t100\t150\tGrip";
Challenge[3] = "S3 Expert\t250\t250\tLaser";
Challenge[4] = "S3 Master\t500\t500\tSilencer";
Challenge[5] = "S3 God\t1500\t1000\tBurst Clip";
Challenge[6] = "S3 Bronze Commendation\t5000\t10000\tNone";
Challenge[7] = "S3 Silver Commendation\t10000\t25000\tNone";
Challenge[8] = "S3 Gold Commendation\t25000\t50000\tNone";
Challenge[9] = "S3 Titan Commendation\t50000\t75000\tNone";
Upgrade[1] = "Grip";
Upgrade[2] = "Laser";
Upgrade[3] = "Silencer";
Upgrade[4] = "Burst Clip";
GunName = "S3 Combat Rifle";
//
datablock ShapeBaseImageData(S3RifleImage) {
className = WeaponImage;
shapeFile = "weapon_sniper.dts";
mass = 10;
item = S3Rifle;
ammo = S3RifleAmmo;
projectile = S3Bullet;
projectileType = TracerProjectile;
emap = true;
casing = ShellDebris;
shellExitDir = "1.0 0.3 1.0";
shellExitOffset = "0.15 -0.56 -0.1";
shellExitVariance = 15.0;
shellVelocity = 3.0;
//ClipStuff
ClipName = "S3RifleClip";
ClipPickupName["S3RifleClip"] = "some S3 Clip Cartridges";
ShowsClipInHud = 1;
ClipReloadTime = 4;
ClipReturn = 10;
InitialClips = 6;
//
//Challenges
HasChallenges = 1;
ChallengeCt = 9;
Challenge[1] = "S3 Killer\t50\t100\tNone";
Challenge[2] = "S3 Extremist\t100\t150\tGrip";
Challenge[3] = "S3 Expert\t250\t250\tLaser";
Challenge[4] = "S3 Master\t500\t500\tSilencer";
Challenge[5] = "S3 God\t1500\t1000\tBurst Clip";
Challenge[6] = "S3 Bronze Commendation\t5000\t10000\tNone";
Challenge[7] = "S3 Silver Commendation\t10000\t25000\tNone";
Challenge[8] = "S3 Gold Commendation\t25000\t50000\tNone";
Challenge[9] = "S3 Titan Commendation\t50000\t75000\tNone";
Upgrade[1] = "Grip";
Upgrade[2] = "Laser";
Upgrade[3] = "Silencer";
Upgrade[4] = "Burst Clip";
GunName = "S3 Combat Rifle";
//
projectileSpread = 3.0 / 1000.0;
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;
projectileSpread = 2.5 / 1000.0;
stateName[1] = "ActivateReady";
stateTransitionOnLoaded[1] = "Ready";
stateTransitionOnNoAmmo[1] = "NoAmmo";
stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "ActivateReady";
stateTimeoutValue[0] = 0.5;
stateSequence[0] = "Activate";
stateSound[0] = ChaingunSwitchSound;
stateName[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTransitionOnTriggerDown[2] = "CheckWet";
stateName[1] = "ActivateReady";
stateTransitionOnLoaded[1] = "Ready";
stateTransitionOnNoAmmo[1] = "NoAmmo";
stateName[3] = "Fire";
stateTransitionOnTimeout[3] = "Reload";
stateTimeoutValue[3] = 0.01;
stateFire[3] = true;
stateRecoil[3] = LightRecoil;
stateAllowImageChange[3] = false;
stateScript[3] = "onFire";
stateEmitterTime[3] = 0.2;
//stateSound[3] = S3FireSound;
stateName[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTransitionOnTriggerDown[2] = "CheckWet";
stateName[4] = "Reload";
stateTransitionOnNoAmmo[4] = "NoAmmo";
stateTransitionOnTimeout[4] = "Ready";
stateTimeoutValue[4] = 0.9;
stateAllowImageChange[4] = false;
stateSequence[4] = "Reload";
stateName[3] = "Fire";
stateTransitionOnTimeout[3] = "Reload";
stateTimeoutValue[3] = 0.01;
stateFire[3] = true;
stateRecoil[3] = LightRecoil;
stateAllowImageChange[3] = false;
stateScript[3] = "onFire";
stateEmitterTime[3] = 0.01;
//stateSound[3] = S3FireSound;
stateName[5] = "NoAmmo";
stateTransitionOnAmmo[5] = "Reload";
stateSequence[5] = "NoAmmo";
stateTransitionOnTriggerDown[5] = "DryFire";
stateName[4] = "Reload";
stateTransitionOnNoAmmo[4] = "NoAmmo";
stateTransitionOnTimeout[4] = "Ready";
stateTimeoutValue[4] = 0.4;
stateAllowImageChange[4] = false;
stateSequence[4] = "Reload";
stateName[6] = "DryFire";
stateSound[6] = ChaingunDryFireSound;
stateTimeoutValue[6] = 1.0;
stateTransitionOnTimeout[6] = "NoAmmo";
stateName[5] = "NoAmmo";
stateTransitionOnAmmo[5] = "Reload";
stateSequence[5] = "NoAmmo";
stateTransitionOnTriggerDown[5] = "DryFire";
stateName[7] = "WetFire";
stateSound[7] = PlasmaFireWetSound;
stateTimeoutValue[7] = 1.0;
stateTransitionOnTimeout[7] = "Ready";
stateName[6] = "DryFire";
stateSound[6] = ChaingunDryFireSound;
stateTimeoutValue[6] = 1.0;
stateTransitionOnTimeout[6] = "NoAmmo";
stateName[8] = "CheckWet";
stateTransitionOnWet[8] = "WetFire";
stateTransitionOnNotWet[8] = "Fire";
stateName[7] = "WetFire";
stateSound[7] = PlasmaFireWetSound;
stateTimeoutValue[7] = 1.0;
stateTransitionOnTimeout[7] = "Ready";
stateName[8] = "CheckWet";
stateTransitionOnWet[8] = "WetFire";
stateTransitionOnNotWet[8] = "Fire";
};
datablock ItemData(S3Rifle)
{
className = Weapon;
catagory = "Spawn Items";
shapeFile = "weapon_sniper.dts";
image = S3RifleImage;
mass = 1.0;
elasticity = 0.0;
friction = 0.6;
pickupRadius = 2;
pickUpName = "an S3 Combat Rifle";
datablock ItemData(S3Rifle) {
className = Weapon;
catagory = "Spawn Items";
shapeFile = "weapon_sniper.dts";
image = S3RifleImage;
mass = 1.0;
elasticity = 0.0;
friction = 0.6;
pickupRadius = 2;
pickUpName = "an S3 Combat Rifle";
computeCRC = true;
emap = true;
computeCRC = true;
emap = true;
};
function S3RifleImage::OnFire(%data, %obj, %slot) {
if(%obj.client.UpgradeOn("Burst Clip", %data.getName())) {
%spread = %data.projectileSpread;
if(%obj.client !$= "") {
if(%obj.client.IsActivePerk("Advanced Grip")) {
%spread = %spread / 2.5;
}
}
%vec2 = %obj.getMuzzleVector(%slot);
%x = (getRandom() - 0.5) * 2 * 3.1415926 * %spread;
%y = (getRandom() - 0.5) * 2 * 3.1415926 * %spread;
%z = (getRandom() - 0.5) * 2 * 3.1415926 * %spread;
%mat = MatrixCreateFromEuler(%x @ " " @ %y @ " " @ %z);
%vector2 = MatrixMulVector(%mat, %vec2);
%vec3 = %obj.getMuzzleVector(%slot);
%x = (getRandom() - 0.5) * 2 * 3.1415926 * %spread;
%y = (getRandom() - 0.5) * 2 * 3.1415926 * %spread;
%z = (getRandom() - 0.5) * 2 * 3.1415926 * %spread;
%mat = MatrixCreateFromEuler(%x @ " " @ %y @ " " @ %z);
%vector3 = MatrixMulVector(%mat, %vec3);
%p1 = Parent::OnFire(%data, %obj, %slot);
if(%obj.client.UpgradeOn("Burst Clip", %data.getName())) {
%spread = %data.projectileSpread;
if(%obj.client !$= "") {
if(%obj.client.IsActivePerk("Advanced Grip")) {
%spread = %spread / 2.5;
}
}
%vec2 = %obj.getMuzzleVector(%slot);
%x = (getRandom() - 0.5) * 2 * 3.1415926 * %spread;
%y = (getRandom() - 0.5) * 2 * 3.1415926 * %spread;
%z = (getRandom() - 0.5) * 2 * 3.1415926 * %spread;
%mat = MatrixCreateFromEuler(%x @ " " @ %y @ " " @ %z);
%vector2 = MatrixMulVector(%mat, %vec2);
%p2 = Schedule(100, 0, "spawnprojectile", %data.Projectile, %data.ProjectileType, vectorAdd(%obj.getPosition(), "-.45 0 1.4"), %vector2, %obj);
%p2.WeaponImageSource = "S3RifleImage";
schedule(100, 0, "ServerPlay3D", "S3FireSound", %obj.getPosition());
%vec3 = %obj.getMuzzleVector(%slot);
%x = (getRandom() - 0.5) * 2 * 3.1415926 * %spread;
%y = (getRandom() - 0.5) * 2 * 3.1415926 * %spread;
%z = (getRandom() - 0.5) * 2 * 3.1415926 * %spread;
%mat = MatrixCreateFromEuler(%x @ " " @ %y @ " " @ %z);
%vector3 = MatrixMulVector(%mat, %vec3);
%p3 = Schedule(250, 0, "spawnprojectile", %data.Projectile, %data.ProjectileType, vectorAdd(%obj.getPosition(), "-.45 0 1.4"), %vector3, %obj);
%p3.WeaponImageSource = "S3RifleImage";
schedule(250, 0, "ServerPlay3D", "S3FireSound", %obj.getPosition());
}
else if(%obj.client.UpgradeOn("Silencer", %data.getName())) {
%p = Parent::OnFire(%data, %obj, %slot);
}
else {
%p = Parent::OnFire(%data, %obj, %slot);
serverPlay3d(S3FireSound, %obj.getPosition());
}
%p1 = Parent::OnFire(%data, %obj, %slot);
%p2 = Schedule(100, 0, "spawnprojectile", %data.Projectile, %data.ProjectileType, vectorAdd(%obj.getPosition(), "-.45 0 1.4"), %vector2, %obj);
%p2.WeaponImageSource = "S3RifleImage";
schedule(100, 0, "ServerPlay3D", "S3FireSound", %obj.getPosition());
%p3 = Schedule(250, 0, "spawnprojectile", %data.Projectile, %data.ProjectileType, vectorAdd(%obj.getPosition(), "-.45 0 1.4"), %vector3, %obj);
%p3.WeaponImageSource = "S3RifleImage";
schedule(250, 0, "ServerPlay3D", "S3FireSound", %obj.getPosition());
}
else if(%obj.client.UpgradeOn("Silencer", %data.getName())) {
%p = Parent::OnFire(%data, %obj, %slot);
}
else {
%p = Parent::OnFire(%data, %obj, %slot);
serverPlay3d(S3FireSound, %obj.getPosition());
}
}

View file

@ -1,176 +1,172 @@
datablock TracerProjectileData(S3SBullet) {
doDynamicClientHits = true;
doDynamicClientHits = true;
directDamage = 0.45;
directDamageType = $DamageType::S3;
explosion = "ChaingunExplosion";
splash = ChaingunSplash;
HeadMultiplier = 1.5;
LegsMultiplier = 0.35;
directDamage = 0.45;
directDamageType = $DamageType::S3;
explosion = "ChaingunExplosion";
splash = ChaingunSplash;
HeadMultiplier = 1.5;
LegsMultiplier = 0.35;
HeadShotKill = 1;
HeadShotKill = 1;
kickBackStrength = 15.0;
sound = ChaingunProjectile;
ImageSource = "S3SRifleImage";
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;
ImageSource = "S3SRifleImage";
tracerLength = 20.0;
tracerAlpha = false;
tracerMinPixels = 6;
tracerColor = 211.0/255.0 @ " " @ 215.0/255.0 @ " " @ 120.0/255.0 @ " 0.75";
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;
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;
decalData[0] = ChaingunDecal1;
decalData[1] = ChaingunDecal2;
decalData[2] = ChaingunDecal3;
decalData[3] = ChaingunDecal4;
decalData[4] = ChaingunDecal5;
decalData[5] = ChaingunDecal6;
};
datablock ItemData(S3SRifleAmmo)
{
className = Ammo;
catagory = "Ammo";
shapeFile = "ammo_chaingun.dts";
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
datablock ItemData(S3SRifleAmmo) {
className = Ammo;
catagory = "Ammo";
shapeFile = "ammo_chaingun.dts";
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "Some S3S Rifle Bullets";
computeCRC = true;
computeCRC = true;
};
datablock ShapeBaseImageData(S3SRifleImage)
{
className = WeaponImage;
shapeFile = "weapon_sniper.dts";
mass = 10;
item = S3SRifle;
ammo = S3SRifleAmmo;
projectile = S3SBullet;
projectileType = TracerProjectile;
emap = true;
//ClipStuff
ClipName = "S3SRifleClip";
ClipPickupName["S3SRifleClip"] = "some S3S Clip Cartridges";
ShowsClipInHud = 1;
ClipReloadTime = 4;
ClipReturn = 30;
InitialClips = 6;
//
datablock ShapeBaseImageData(S3SRifleImage) {
className = WeaponImage;
shapeFile = "weapon_sniper.dts";
mass = 10;
item = S3SRifle;
ammo = S3SRifleAmmo;
projectile = S3SBullet;
projectileType = TracerProjectile;
emap = true;
casing = ShellDebris;
shellExitDir = "1.0 0.3 1.0";
shellExitOffset = "0.15 -0.56 -0.1";
shellExitVariance = 15.0;
shellVelocity = 3.0;
//ClipStuff
ClipName = "S3SRifleClip";
ClipPickupName["S3SRifleClip"] = "some S3S Clip Cartridges";
ShowsClipInHud = 1;
ClipReloadTime = 4;
ClipReturn = 30;
InitialClips = 6;
//
projectileSpread = 2.0 / 1000.0;
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;
projectileSpread = 2.0 / 1000.0;
stateName[1] = "ActivateReady";
stateTransitionOnLoaded[1] = "Ready";
stateTransitionOnNoAmmo[1] = "NoAmmo";
stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "ActivateReady";
stateTimeoutValue[0] = 0.5;
stateSequence[0] = "Activate";
stateSound[0] = ChaingunSwitchSound;
stateName[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTransitionOnTriggerDown[2] = "CheckWet";
stateName[1] = "ActivateReady";
stateTransitionOnLoaded[1] = "Ready";
stateTransitionOnNoAmmo[1] = "NoAmmo";
stateName[3] = "Fire";
stateTransitionOnTimeout[3] = "Fire2";
stateTimeoutValue[3] = 0.04;
stateFire[3] = true;
stateRecoil[3] = LightRecoil;
stateAllowImageChange[3] = false;
stateScript[3] = "onFire";
stateEmitterTime[3] = 0.2;
stateSound[3] = S3FireSound;
stateName[4] = "Fire2";
stateTransitionOnTimeout[4] = "Fire3";
stateTimeoutValue[4] = 0.04;
stateFire[4] = true;
stateRecoil[4] = LightRecoil;
stateAllowImageChange[4] = false;
stateScript[4] = "onFire";
stateEmitterTime[4] = 0.2;
stateSound[4] = S3FireSound;
stateName[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTransitionOnTriggerDown[2] = "CheckWet";
stateName[5] = "Fire3";
stateTransitionOnTimeout[5] = "Reload";
stateTimeoutValue[5] = 0.04;
stateFire[5] = true;
stateRecoil[5] = LightRecoil;
stateAllowImageChange[5] = false;
stateScript[5] = "onFire";
stateEmitterTime[5] = 0.2;
stateSound[5] = S3FireSound;
stateName[3] = "Fire";
stateTransitionOnTimeout[3] = "Fire2";
stateTimeoutValue[3] = 0.04;
stateFire[3] = true;
stateRecoil[3] = LightRecoil;
stateAllowImageChange[3] = false;
stateScript[3] = "onFire";
stateEmitterTime[3] = 0.2;
stateSound[3] = S3FireSound;
stateName[6] = "Reload";
stateTransitionOnNoAmmo[6] = "NoAmmo";
stateTransitionOnTimeout[6] = "Ready";
stateTimeoutValue[6] = 0.9;
stateAllowImageChange[6] = false;
stateSequence[6] = "Reload";
stateName[4] = "Fire2";
stateTransitionOnTimeout[4] = "Fire3";
stateTimeoutValue[4] = 0.04;
stateFire[4] = true;
stateRecoil[4] = LightRecoil;
stateAllowImageChange[4] = false;
stateScript[4] = "onFire";
stateEmitterTime[4] = 0.2;
stateSound[4] = S3FireSound;
stateName[7] = "NoAmmo";
stateTransitionOnAmmo[7] = "Reload";
stateSequence[7] = "NoAmmo";
stateTransitionOnTriggerDown[7] = "DryFire";
stateName[5] = "Fire3";
stateTransitionOnTimeout[5] = "Reload";
stateTimeoutValue[5] = 0.04;
stateFire[5] = true;
stateRecoil[5] = LightRecoil;
stateAllowImageChange[5] = false;
stateScript[5] = "onFire";
stateEmitterTime[5] = 0.2;
stateSound[5] = S3FireSound;
stateName[8] = "DryFire";
stateSound[8] = ChaingunDryFireSound;
stateTimeoutValue[8] = 1.0;
stateTransitionOnTimeout[8] = "NoAmmo";
stateName[6] = "Reload";
stateTransitionOnNoAmmo[6] = "NoAmmo";
stateTransitionOnTimeout[6] = "Ready";
stateTimeoutValue[6] = 0.9;
stateAllowImageChange[6] = false;
stateSequence[6] = "Reload";
stateName[9] = "WetFire";
stateSound[9] = PlasmaFireWetSound;
stateTimeoutValue[9] = 1.0;
stateTransitionOnTimeout[9] = "Ready";
stateName[7] = "NoAmmo";
stateTransitionOnAmmo[7] = "Reload";
stateSequence[7] = "NoAmmo";
stateTransitionOnTriggerDown[7] = "DryFire";
stateName[10] = "CheckWet";
stateTransitionOnWet[10] = "WetFire";
stateTransitionOnNotWet[10] = "Fire";
stateName[8] = "DryFire";
stateSound[8] = ChaingunDryFireSound;
stateTimeoutValue[8] = 1.0;
stateTransitionOnTimeout[8] = "NoAmmo";
stateName[9] = "WetFire";
stateSound[9] = PlasmaFireWetSound;
stateTimeoutValue[9] = 1.0;
stateTransitionOnTimeout[9] = "Ready";
stateName[10] = "CheckWet";
stateTransitionOnWet[10] = "WetFire";
stateTransitionOnNotWet[10] = "Fire";
};
datablock ItemData(S3SRifle)
{
className = Weapon;
catagory = "Spawn Items";
shapeFile = "weapon_sniper.dts";
image = S3SRifleImage;
mass = 1.0;
elasticity = 0.0;
friction = 0.6;
pickupRadius = 2;
pickUpName = "an S3S Combat Rifle";
datablock ItemData(S3SRifle) {
className = Weapon;
catagory = "Spawn Items";
shapeFile = "weapon_sniper.dts";
image = S3SRifleImage;
mass = 1.0;
elasticity = 0.0;
friction = 0.6;
pickupRadius = 2;
pickUpName = "an S3S Combat Rifle";
computeCRC = true;
emap = true;
};
computeCRC = true;
emap = true;
};

View file

@ -1,224 +1,219 @@
datablock AudioProfile(ShotgunFireSound) {
filename = "fx/weapons/TR2spinfusor_fire.wav";
description = AudioClosest3d;
preload = true;
filename = "fx/weapons/TR2spinfusor_fire.wav";
description = AudioClosest3d;
preload = true;
};
datablock TracerProjectileData(M1700Pellet)
{
doDynamicClientHits = true;
datablock TracerProjectileData(M1700Pellet) {
doDynamicClientHits = true;
directDamage = (0.075 * 1.5);
directDamageType = $DamageType::M1700;
explosion = "ChaingunExplosion";
splash = ChaingunSplash;
HeadMultiplier = 1.2;
LegsMultiplier = 0.75;
ImageSource = "M1700Image";
directDamage = 0.13;
directDamageType = $DamageType::M1700;
explosion = "ChaingunExplosion";
splash = ChaingunSplash;
HeadMultiplier = 1.2;
LegsMultiplier = 0.75;
longRangeMultiplier = 0.75;
kickBackStrength = 0.0;
sound = ChaingunProjectile;
ImageSource = "M1700Image";
dryVelocity = 1500.0;
wetVelocity = 1000.0;
velInheritFactor = 0.0;
fizzleTimeMS = 1000;
lifetimeMS = 1000;
explodeOnDeath = false;
reflectOnWaterImpactAngle = 0.0;
explodeOnWaterImpact = false;
deflectionOnWaterImpact = 0.0;
fizzleUnderwaterMS = 3000;
longRangeMultiplier = 0.75;
kickBackStrength = 0.0;
sound = ChaingunProjectile;
tracerLength = 5.0;
tracerAlpha = false;
tracerMinPixels = 6;
tracerColor = 211.0/255.0 @ " " @ 215.0/255.0 @ " " @ 120.0/255.0 @ " 0.75";
dryVelocity = 1500.0;
wetVelocity = 1000.0;
velInheritFactor = 0.0;
fizzleTimeMS = 100;
lifetimeMS = 150;
explodeOnDeath = false;
reflectOnWaterImpactAngle = 0.0;
explodeOnWaterImpact = false;
deflectionOnWaterImpact = 0.0;
fizzleUnderwaterMS = 3000;
tracerLength = 5.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;
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;
decalData[0] = ChaingunDecal1;
decalData[1] = ChaingunDecal2;
decalData[2] = ChaingunDecal3;
decalData[3] = ChaingunDecal4;
decalData[4] = ChaingunDecal5;
decalData[5] = ChaingunDecal6;
};
//--------------------------------------------------------------------------
// Ammo
//--------------------------------------
datablock ItemData(M1700Ammo)
{
className = Ammo;
catagory = "Ammo";
shapeFile = "ammo_chaingun.dts";
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
datablock ItemData(M1700Ammo) {
className = Ammo;
catagory = "Ammo";
shapeFile = "ammo_chaingun.dts";
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "some M1700 rounds";
computeCRC = true;
computeCRC = true;
};
//--------------------------------------------------------------------------
// Weapon
//--------------------------------------
datablock ShapeBaseImageData(M1700Image)
{
className = WeaponImage;
shapeFile = "weapon_plasma.dts";
item = M1700;
ammo = M1700Ammo;
projectile = M1700Pellet;
projectileType = TracerProjectile;
emap = true;
mass = 20;
datablock ShapeBaseImageData(M1700Image) {
className = WeaponImage;
shapeFile = "weapon_plasma.dts";
item = M1700;
ammo = M1700Ammo;
projectile = M1700Pellet;
projectileType = TracerProjectile;
emap = true;
mass = 20;
casing = ShellDebris;
shellExitDir = "0.5 0.0 1.0"; // L/R - F/B - T/B
shellExitOffset = "0.15 -0.51 -0.1"; // L/R - F/B - T/B
shellExitVariance = 10.0;
shellVelocity = 4.0;
casing = ShellDebris;
shellExitDir = "0.5 0.0 1.0"; // L/R - F/B - T/B
shellExitOffset = "0.15 -0.51 -0.1"; // L/R - F/B - T/B
shellExitVariance = 10.0;
shellVelocity = 4.0;
//ClipStuff
ClipName = "M1700Clip";
ClipPickupName["M1700Clip"] = "some M1700 Clip Boxes";
ShowsClipInHud = 1;
ClipReloadTime = 2;
ClipReturn = 1;
InitialClips = 15;
//
//Challenges
HasChallenges = 1;
ChallengeCt = 9;
Challenge[1] = "M1700 Killer\t50\t100\tNone";
Challenge[2] = "M1700 Extremist\t100\t150\tNone";
Challenge[3] = "M1700 Expert\t250\t250\tNone";
Challenge[4] = "M1700 Master\t500\t500\tNone";
Challenge[5] = "M1700 God\t1000\t1000\tNone";
Challenge[6] = "M1700 Bronze Commendation\t2500\t10000\tNone";
Challenge[7] = "M1700 Silver Commendation\t5000\t25000\tNone";
Challenge[8] = "M1700 Gold Commendation\t10000\t50000\tNone";
Challenge[9] = "M1700 Titan Commendation\t25000\t75000\tNone";
GunName = "M1700 Shotgun";
//
//ClipStuff
ClipName = "M1700Clip";
ClipPickupName["M1700Clip"] = "some M1700 Clip Boxes";
ShowsClipInHud = 1;
ClipReloadTime = 3;
ClipReturn = 1;
InitialClips = 15;
//
projectileSpread = 11.0 / 1000.0;
//Challenges
HasChallenges = 1;
ChallengeCt = 9;
Challenge[1] = "M1700 Killer\t50\t100\tNone";
Challenge[2] = "M1700 Extremist\t100\t150\tNone";
Challenge[3] = "M1700 Expert\t250\t250\tNone";
Challenge[4] = "M1700 Master\t500\t500\tNone";
Challenge[5] = "M1700 God\t1000\t1000\tNone";
Challenge[6] = "M1700 Bronze Commendation\t2500\t10000\tNone";
Challenge[7] = "M1700 Silver Commendation\t5000\t25000\tNone";
Challenge[8] = "M1700 Gold Commendation\t10000\t50000\tNone";
Challenge[9] = "M1700 Titan Commendation\t25000\t75000\tNone";
GunName = "M1700 Shotgun";
//
stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "ActivateReady";
stateTimeoutValue[0] = 0.5;
stateSequence[0] = "Activate";
stateSound[0] = ChaingunSwitchSound;
projectileSpread = 11.0 / 1000.0;
stateName[1] = "ActivateReady";
stateTransitionOnLoaded[1] = "Ready";
stateTransitionOnNoAmmo[1] = "NoAmmo";
stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "ActivateReady";
stateTimeoutValue[0] = 0.5;
stateSequence[0] = "Activate";
stateSound[0] = ChaingunSwitchSound;
stateName[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTransitionOnTriggerDown[2] = "CheckWet";
stateName[1] = "ActivateReady";
stateTransitionOnLoaded[1] = "Ready";
stateTransitionOnNoAmmo[1] = "NoAmmo";
stateName[3] = "Fire";
stateTransitionOnTimeout[3] = "Reload";
stateTimeoutValue[3] = 0.0001;
stateFire[3] = true;
stateEjectShell[3] = true;
stateEmitter[3] = "GunFireEffectEmitter";
stateEmitterNode[3] = "muzzlepoint1";
stateEmitterTime[3] = 1;
stateRecoil[3] = LightRecoil;
stateAllowImageChange[3] = false;
stateScript[3] = "onFire";
stateEmitterTime[3] = 0.2;
stateSound[3] = SniperFireSound;
stateName[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTransitionOnTriggerDown[2] = "CheckWet";
stateName[4] = "Reload";
stateTransitionOnNoAmmo[4] = "NoAmmo";
stateTransitionOnTimeout[4] = "Ready";
stateTimeoutValue[4] = 0.5;
stateAllowImageChange[4] = false;
stateSequence[4] = "Reload";
stateName[3] = "Fire";
stateTransitionOnTimeout[3] = "Reload";
stateTimeoutValue[3] = 0.0001;
stateFire[3] = true;
stateEjectShell[3] = true;
stateEmitter[3] = "GunFireEffectEmitter";
stateEmitterNode[3] = "muzzlepoint1";
stateEmitterTime[3] = 1;
stateRecoil[3] = LightRecoil;
stateAllowImageChange[3] = false;
stateScript[3] = "onFire";
stateEmitterTime[3] = 0.2;
stateSound[3] = SniperFireSound;
stateName[5] = "NoAmmo";
stateTransitionOnAmmo[5] = "Reload";
stateSequence[5] = "NoAmmo";
stateTransitionOnTriggerDown[5] = "DryFire";
stateName[4] = "Reload";
stateTransitionOnNoAmmo[4] = "NoAmmo";
stateTransitionOnTimeout[4] = "Ready";
stateTimeoutValue[4] = 0.5;
stateAllowImageChange[4] = false;
stateSequence[4] = "Reload";
stateName[6] = "DryFire";
stateSound[6] = ChaingunDryFireSound;
stateTimeoutValue[6] = 1.0;
stateTransitionOnTimeout[6] = "NoAmmo";
stateName[5] = "NoAmmo";
stateTransitionOnAmmo[5] = "Reload";
stateSequence[5] = "NoAmmo";
stateTransitionOnTriggerDown[5] = "DryFire";
stateName[7] = "WetFire";
stateSound[7] = ChaingunDryFireSound;
stateTimeoutValue[7] = 1.0;
stateTransitionOnTimeout[7] = "Ready";
stateName[6] = "DryFire";
stateSound[6] = ChaingunDryFireSound;
stateTimeoutValue[6] = 1.0;
stateTransitionOnTimeout[6] = "NoAmmo";
stateName[8] = "CheckWet";
stateTransitionOnWet[8] = "WetFire";
stateTransitionOnNotWet[8] = "Fire";
stateName[7] = "WetFire";
stateSound[7] = ChaingunDryFireSound;
stateTimeoutValue[7] = 1.0;
stateTransitionOnTimeout[7] = "Ready";
stateName[8] = "CheckWet";
stateTransitionOnWet[8] = "WetFire";
stateTransitionOnNotWet[8] = "Fire";
};
datablock ItemData(M1700)
{
className = Weapon;
catagory = "Spawn Items";
shapeFile = "weapon_plasma.dts";
image = M1700Image;
mass = 1.0;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "a M1700";
datablock ItemData(M1700) {
className = Weapon;
catagory = "Spawn Items";
shapeFile = "weapon_plasma.dts";
image = M1700Image;
mass = 1.0;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "a M1700";
computeCRC = true;
emap = true;
computeCRC = true;
emap = true;
};
function M1700Image::onMount(%this,%obj,%slot) {
Parent::onMount(%this, %obj, %slot);
Parent::onMount(%this, %obj, %slot);
}
function M1700Image::onFire(%data,%obj,%slot) {
serverPlay3D(ShotgunFireSound, %obj.getPosition());
serverPlay3D(ShotgunFireSound, %obj.getPosition());
%obj.applyKick(-250);
%obj.decInventory(%data.ammo,1);
%obj.applyKick(-250);
%obj.decInventory(%data.ammo,1);
%vector = %obj.getMuzzleVector(%slot);
%mp = %obj.getMuzzlePoint(%slot);
%vector = %obj.getMuzzleVector(%slot);
%mp = %obj.getMuzzlePoint(%slot);
for (%i=0; %i < 12; %i++) {
%x = (getRandom() - 0.5) * 2 * 3.1415926 * %data.projectileSpread;
%y = (getRandom() - 0.5) * 2 * 3.1415926 * %data.projectileSpread;
%z = (getRandom() - 0.5) * 2 * 3.1415926 * %data.projectileSpread;
%mat = MatrixCreateFromEuler(%x @ " " @ %y @ " " @ %z);
%newvector = MatrixMulVector(%mat, %vector);
%x = (getRandom() - 0.5) * 2 * 3.1415926 * %data.projectileSpread;
%y = (getRandom() - 0.5) * 2 * 3.1415926 * %data.projectileSpread;
%z = (getRandom() - 0.5) * 2 * 3.1415926 * %data.projectileSpread;
%mat = MatrixCreateFromEuler(%x @ " " @ %y @ " " @ %z);
%newvector = MatrixMulVector(%mat, %vector);
%p = new (%data.projectileType)() {
dataBlock = %data.projectile;
initialDirection = %newvector;
initialPosition = %mp;
sourceObject = %obj;
damageFactor = 1;
sourceSlot = %slot;
};
%p.WeaponImageSource = %data.getName();
}
if(%obj.inv[M1700Ammo] == 0) { //Added Phantom139, TWM2
AttemptReload(%data, %obj, %slot);
}
%p = new (%data.projectileType)() {
dataBlock = %data.projectile;
initialDirection = %newvector;
initialPosition = %mp;
sourceObject = %obj;
damageFactor = 1;
sourceSlot = %slot;
};
%p.WeaponImageSource = %data.getName();
}
if(%obj.inv[M1700Ammo] == 0) { //Added Phantom139, TWM2
AttemptReload(%data, %obj, %slot);
}
}

View file

@ -1,218 +1,213 @@
datablock TracerProjectileData(Model1887Pellet)
{
doDynamicClientHits = true;
datablock TracerProjectileData(Model1887Pellet) {
doDynamicClientHits = true;
directDamage = (0.064 * 1.5);
directDamageType = $DamageType::Model1887;
explosion = "ChaingunExplosion";
splash = ChaingunSplash;
HeadMultiplier = 1.2;
LegsMultiplier = 0.75;
directDamage = 0.11;
directDamageType = $DamageType::Model1887;
explosion = "ChaingunExplosion";
splash = ChaingunSplash;
HeadMultiplier = 1.2;
LegsMultiplier = 0.75;
longRangeMultiplier = 0.75;
kickBackStrength = 0.0;
sound = ChaingunProjectile;
ImageSource = "Model1887Image";
longRangeMultiplier = 0.75;
kickBackStrength = 0.0;
sound = ChaingunProjectile;
dryVelocity = 1500.0;
wetVelocity = 1000.0;
velInheritFactor = 0.0;
fizzleTimeMS = 500;
lifetimeMS = 500;
explodeOnDeath = false;
reflectOnWaterImpactAngle = 0.0;
explodeOnWaterImpact = false;
deflectionOnWaterImpact = 0.0;
fizzleUnderwaterMS = 3000;
ImageSource = "Model1887Image";
tracerLength = 5.0;
tracerAlpha = false;
tracerMinPixels = 6;
tracerColor = 211.0/255.0 @ " " @ 215.0/255.0 @ " " @ 120.0/255.0 @ " 0.75";
dryVelocity = 1500.0;
wetVelocity = 1000.0;
velInheritFactor = 0.0;
fizzleTimeMS = 100;
lifetimeMS = 125;
explodeOnDeath = false;
reflectOnWaterImpactAngle = 0.0;
explodeOnWaterImpact = false;
deflectionOnWaterImpact = 0.0;
fizzleUnderwaterMS = 3000;
tracerLength = 5.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;
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;
decalData[0] = ChaingunDecal1;
decalData[1] = ChaingunDecal2;
decalData[2] = ChaingunDecal3;
decalData[3] = ChaingunDecal4;
decalData[4] = ChaingunDecal5;
decalData[5] = ChaingunDecal6;
};
//--------------------------------------------------------------------------
// Ammo
//--------------------------------------
datablock ItemData(Model1887Ammo)
{
className = Ammo;
catagory = "Ammo";
shapeFile = "ammo_chaingun.dts";
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
datablock ItemData(Model1887Ammo) {
className = Ammo;
catagory = "Ammo";
shapeFile = "ammo_chaingun.dts";
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "some Model 1887 rounds";
computeCRC = true;
computeCRC = true;
};
//--------------------------------------------------------------------------
// Weapon
//--------------------------------------
datablock ShapeBaseImageData(Model1887Image)
{
className = WeaponImage;
shapeFile = "weapon_disc.dts";
item = Model1887;
ammo = Model1887Ammo;
projectile = Model1887Pellet;
projectileType = TracerProjectile;
emap = true;
mass = 20;
datablock ShapeBaseImageData(Model1887Image) {
className = WeaponImage;
shapeFile = "weapon_disc.dts";
item = Model1887;
ammo = Model1887Ammo;
projectile = Model1887Pellet;
projectileType = TracerProjectile;
emap = true;
mass = 20;
casing = ShellDebris;
shellExitDir = "0.5 0.0 1.0"; // L/R - F/B - T/B
shellExitOffset = "0.15 -0.51 -0.1"; // L/R - F/B - T/B
shellExitVariance = 10.0;
shellVelocity = 4.0;
casing = ShellDebris;
shellExitDir = "0.5 0.0 1.0"; // L/R - F/B - T/B
shellExitOffset = "0.15 -0.51 -0.1"; // L/R - F/B - T/B
shellExitVariance = 10.0;
shellVelocity = 4.0;
//ClipStuff
ClipName = "Model1887Clip";
ClipPickupName["Model1887Clip"] = "some Model 1887 Clip Boxes";
ShowsClipInHud = 1;
ClipReloadTime = 9;
ClipReturn = 7;
InitialClips = 3;
ReloadSingle = 1;
SingleShotAdd = 1;
//
RankRequire = $TWM2::RankRequire["RSALaserRifle"];
PrestigeRequire = 1;
//ClipStuff
ClipName = "Model1887Clip";
ClipPickupName["Model1887Clip"] = "some Model 1887 Clip Boxes";
ShowsClipInHud = 1;
ClipReloadTime = 9;
ClipReturn = 7;
InitialClips = 3;
//Challenges
HasChallenges = 1;
ChallengeCt = 9;
Challenge[1] = "Model 1887 Killer\t50\t100\tNone";
Challenge[2] = "Model 1887 Extremist\t100\t150\tNone";
Challenge[3] = "Model 1887 Expert\t250\t250\tNone";
Challenge[4] = "Model 1887 Master\t500\t500\tNone";
Challenge[5] = "Model 1887 God\t1000\t1000\tNone";
Challenge[6] = "Model 1887 Bronze Commendation\t2500\t10000\tNone";
Challenge[7] = "Model 1887 Silver Commendation\t5000\t25000\tNone";
Challenge[8] = "Model 1887 Gold Commendation\t10000\t50000\tNone";
Challenge[9] = "Model 1887 Titan Commendation\t25000\t75000\tNone";
GunName = "Model 1887 Shotgun";
//
ReloadSingle = 1;
SingleShotAdd = 1;
//
RankRequire = $TWM2::RankRequire["RSALaserRifle"];
PrestigeRequire = 1;
projectileSpread = 7.0 / 1000.0;
//Challenges
HasChallenges = 1;
ChallengeCt = 9;
Challenge[1] = "Model 1887 Killer\t50\t100\tNone";
Challenge[2] = "Model 1887 Extremist\t100\t150\tNone";
Challenge[3] = "Model 1887 Expert\t250\t250\tNone";
Challenge[4] = "Model 1887 Master\t500\t500\tNone";
Challenge[5] = "Model 1887 God\t1000\t1000\tNone";
Challenge[6] = "Model 1887 Bronze Commendation\t2500\t10000\tNone";
Challenge[7] = "Model 1887 Silver Commendation\t5000\t25000\tNone";
Challenge[8] = "Model 1887 Gold Commendation\t10000\t50000\tNone";
Challenge[9] = "Model 1887 Titan Commendation\t25000\t75000\tNone";
GunName = "Model 1887 Shotgun";
//
stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "ActivateReady";
stateTimeoutValue[0] = 0.5;
stateSequence[0] = "Activate";
stateSound[0] = ChaingunSwitchSound;
projectileSpread = 7.0 / 1000.0;
stateName[1] = "ActivateReady";
stateTransitionOnLoaded[1] = "Ready";
stateTransitionOnNoAmmo[1] = "NoAmmo";
stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "ActivateReady";
stateTimeoutValue[0] = 0.5;
stateSequence[0] = "Activate";
stateSound[0] = ChaingunSwitchSound;
stateName[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTransitionOnTriggerDown[2] = "CheckWet";
stateName[1] = "ActivateReady";
stateTransitionOnLoaded[1] = "Ready";
stateTransitionOnNoAmmo[1] = "NoAmmo";
stateName[3] = "Fire";
stateTransitionOnTimeout[3] = "Reload";
stateTimeoutValue[3] = 0.0001;
stateFire[3] = true;
stateEjectShell[3] = true;
stateRecoil[3] = LightRecoil;
stateAllowImageChange[3] = false;
stateScript[3] = "onFire";
stateName[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTransitionOnTriggerDown[2] = "CheckWet";
stateName[4] = "Reload";
stateTransitionOnNoAmmo[4] = "NoAmmo";
stateTransitionOnTimeout[4] = "Ready";
stateTimeoutValue[4] = 1.0;
stateAllowImageChange[4] = false;
stateSequence[4] = "Reload";
stateName[3] = "Fire";
stateTransitionOnTimeout[3] = "Reload";
stateTimeoutValue[3] = 0.0001;
stateFire[3] = true;
stateEjectShell[3] = true;
stateRecoil[3] = LightRecoil;
stateAllowImageChange[3] = false;
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] = 1.0;
stateAllowImageChange[4] = false;
stateSequence[4] = "Reload";
stateName[6] = "DryFire";
stateSound[6] = ChaingunDryFireSound;
stateTimeoutValue[6] = 1.0;
stateTransitionOnTimeout[6] = "NoAmmo";
stateName[5] = "NoAmmo";
stateTransitionOnAmmo[5] = "Reload";
stateSequence[5] = "NoAmmo";
stateTransitionOnTriggerDown[5] = "DryFire";
stateName[7] = "WetFire";
stateSound[7] = ChaingunDryFireSound;
stateTimeoutValue[7] = 1.0;
stateTransitionOnTimeout[7] = "Ready";
stateName[6] = "DryFire";
stateSound[6] = ChaingunDryFireSound;
stateTimeoutValue[6] = 1.0;
stateTransitionOnTimeout[6] = "NoAmmo";
stateName[8] = "CheckWet";
stateTransitionOnWet[8] = "WetFire";
stateTransitionOnNotWet[8] = "Fire";
stateName[7] = "WetFire";
stateSound[7] = ChaingunDryFireSound;
stateTimeoutValue[7] = 1.0;
stateTransitionOnTimeout[7] = "Ready";
stateName[8] = "CheckWet";
stateTransitionOnWet[8] = "WetFire";
stateTransitionOnNotWet[8] = "Fire";
};
datablock ItemData(Model1887)
{
className = Weapon;
catagory = "Spawn Items";
shapeFile = "weapon_plasma.dts";
image = Model1887Image;
mass = 1.0;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "a Model 1887";
datablock ItemData(Model1887 {
className = Weapon;
catagory = "Spawn Items";
shapeFile = "weapon_plasma.dts";
image = Model1887Image;
mass = 1.0;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "a Model 1887";
computeCRC = true;
emap = true;
computeCRC = true;
emap = true;
};
function Model1887Image::onMount(%this,%obj,%slot) {
Parent::onMount(%this, %obj, %slot);
Parent::onMount(%this, %obj, %slot);
}
function Model1887Image::onFire(%data,%obj,%slot) {
serverPlay3D(ShotgunFireSound, %obj.getPosition());
serverPlay3D(ShotgunFireSound, %obj.getPosition());
%obj.applyKick(-250);
%obj.decInventory(%data.ammo,1);
%obj.applyKick(-250);
%obj.decInventory(%data.ammo,1);
%vector = %obj.getMuzzleVector(%slot);
%mp = %obj.getMuzzlePoint(%slot);
%vector = %obj.getMuzzleVector(%slot);
%mp = %obj.getMuzzlePoint(%slot);
for (%i = 0; %i < 14; %i++) {
%x = (getRandom() - 0.5) * 2 * 3.1415926 * %data.projectileSpread;
%y = (getRandom() - 0.5) * 2 * 3.1415926 * %data.projectileSpread;
%z = (getRandom() - 0.5) * 2 * 3.1415926 * %data.projectileSpread;
%mat = MatrixCreateFromEuler(%x @ " " @ %y @ " " @ %z);
%newvector = MatrixMulVector(%mat, %vector);
for (%i = 0; %i < 18; %i++) {
%x = (getRandom() - 0.5) * 2 * 3.1415926 * %data.projectileSpread;
%y = (getRandom() - 0.5) * 2 * 3.1415926 * %data.projectileSpread;
%z = (getRandom() - 0.5) * 2 * 3.1415926 * %data.projectileSpread;
%mat = MatrixCreateFromEuler(%x @ " " @ %y @ " " @ %z);
%newvector = MatrixMulVector(%mat, %vector);
%p = new (%data.projectileType)() {
dataBlock = %data.projectile;
initialDirection = %newvector;
initialPosition = %mp;
sourceObject = %obj;
damageFactor = 1;
sourceSlot = %slot;
};
%p = new (%data.projectileType)() {
dataBlock = %data.projectile;
initialDirection = %newvector;
initialPosition = %mp;
sourceObject = %obj;
damageFactor = 1;
sourceSlot = %slot;
};
%p.WeaponImageSource = %data.getName();
}
if(%obj.inv[Model1887Ammo] == 0) { //Added Phantom139, TWM2
AttemptReload(%data, %obj, %slot);
}
}
%p.WeaponImageSource = %data.getName();
}
if(%obj.inv[Model1887Ammo] == 0) { //Added Phantom139, TWM2
AttemptReload(%data, %obj, %slot);
}
}

View file

@ -8,23 +8,22 @@
//--------------------------------------
datablock DebrisData( SemiAutoShellDebris )
{
shapeName = "weapon_chaingun_ammocasing.dts";
datablock DebrisData( SemiAutoShellDebris ) {
shapeName = "weapon_chaingun_ammocasing.dts";
lifetime = 7.0;
lifetime = 7.0;
minSpinSpeed = 600.0;
maxSpinSpeed = 800.0;
minSpinSpeed = 600.0;
maxSpinSpeed = 800.0;
elasticity = 0.8;
friction = 0.3;
elasticity = 0.8;
friction = 0.3;
numBounces = 5;
numBounces = 5;
fade = true;
staticOnMaxBounce = true;
snapOnMaxBounce = true;
fade = true;
staticOnMaxBounce = true;
snapOnMaxBounce = true;
};
@ -32,295 +31,288 @@ datablock DebrisData( SemiAutoShellDebris )
// Projectile
//--------------------------------------
datablock TracerProjectileData( SA2400Slug )
{
doDynamicClientHits = true;
datablock TracerProjectileData( SA2400Slug ) {
doDynamicClientHits = true;
directDamage = 0.3;
directDamageType = $DamageType::SA2400;
explosion = "ChaingunExplosion";
splash = ChaingunSplash;
HeadMultiplier = 1.9;
directDamage = 0.3;
directDamageType = $DamageType::SA2400;
explosion = "ChaingunExplosion";
splash = ChaingunSplash;
kickBackStrength = 428.0;
sound = ChaingunProjectile;
HeadMultiplier = 1.9;
ImageSource = "SA2400Image";
kickBackStrength = 428.0;
sound = ChaingunProjectile;
dryVelocity = 2561.0;
wetVelocity = 586.0;
velInheritFactor = 1.0;
fizzleTimeMS = 3000;
lifetimeMS = 3000;
explodeOnDeath = false;
reflectOnWaterImpactAngle = 40.0;
explodeOnWaterImpact = false;
deflectionOnWaterImpact = 40.0;
fizzleUnderwaterMS = 3000;
ImageSource = "SA2400Image";
tracerLength = 37.0;
tracerAlpha = false;
tracerMinPixels = 6;
tracerColor = 211.0/255.0 @ " " @ 215.0/255.0 @ " " @ 120.0/255.0 @ " 0.75";
dryVelocity = 2561.0;
wetVelocity = 586.0;
velInheritFactor = 1.0;
fizzleTimeMS = 150;
lifetimeMS = 200;
explodeOnDeath = false;
reflectOnWaterImpactAngle = 40.0;
explodeOnWaterImpact = false;
deflectionOnWaterImpact = 40.0;
fizzleUnderwaterMS = 3000;
tracerLength = 37.0;
tracerAlpha = false;
tracerMinPixels = 6;
tracerColor = 211.0/255.0 @ " " @ 215.0/255.0 @ " " @ 120.0/255.0 @ " 0.75";
tracerTex[0] = "special/tracer00";
tracerTex[1] = "special/tracercross";
tracerWidth = 0.10;
crossSize = 0.20;
crossViewAng = 0.990;
renderCross = true;
crossSize = 0.20;
crossViewAng = 0.990;
renderCross = true;
decalData[0] = ChaingunDecal1;
decalData[1] = ChaingunDecal1;
decalData[2] = ChaingunDecal1;
decalData[3] = ChaingunDecal1;
decalData[4] = ChaingunDecal1;
decalData[5] = ChaingunDecal1;
decalData[0] = ChaingunDecal1;
decalData[1] = ChaingunDecal1;
decalData[2] = ChaingunDecal1;
decalData[3] = ChaingunDecal1;
decalData[4] = ChaingunDecal1;
decalData[5] = ChaingunDecal1;
};
//--------------------------------------------------------------------------
// Ammo
//--------------------------------------
datablock ItemData( SA2400Ammo )
{
className = Ammo;
catagory = "Ammo";
shapeFile = "ammo_chaingun.dts";
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
datablock ItemData( SA2400Ammo ) {
className = Ammo;
catagory = "Ammo";
shapeFile = "ammo_chaingun.dts";
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "some chaingun ammo";
computeCRC = true;
computeCRC = true;
};
//--------------------------------------------------------------------------
// Weapon
//--------------------------------------
datablock ShapeBaseImageData( SA2400Image )
{
className = WeaponImage;
shapeFile = "weapon_grenade_launcher.dts";
item = SA2400;
ammo = SA2400Ammo;
offset = "0 0 0";
emap = true;
datablock ShapeBaseImageData( SA2400Image ) {
className = WeaponImage;
shapeFile = "weapon_grenade_launcher.dts";
item = SA2400;
ammo = SA2400Ammo;
casing = SemiAutoShellDebris;
shellExitDir = "1.0 0.3 1.0";
shellExitOffset = "0.15 -0.56 -0.1";
shellExitVariance = 15.0;
shellVelocity = 30.0;
offset = "0 0 0";
emap = true;
projectile = SA2400Slug;
projectileType = TracerProjectile;
//ClipStuff
ClipName = "SA2400Clip";
ClipPickupName["SA2400Clip"] = "some SA2400 Slugs";
ShowsClipInHud = 1;
ClipReloadTime = 6;
ClipReturn = 21;
InitialClips = 8;
ReloadSingle = 1;
SingleShotAdd = 7;
//
RankRequire = $TWM2::RankRequire["SA2400"];
//Challenges
HasChallenges = 1;
ChallengeCt = 9;
Challenge[1] = "SA2400 Killer\t50\t100\tNone";
Challenge[2] = "SA2400 Extremist\t100\t150\tNone";
Challenge[3] = "SA2400 Expert\t250\t250\tNone";
Challenge[4] = "SA2400 Master\t500\t500\tNone";
Challenge[5] = "SA2400 God\t1000\t1000\tNone";
Challenge[6] = "SA2400 Bronze Commendation\t2500\t10000\tNone";
Challenge[7] = "SA2400 Silver Commendation\t5000\t25000\tNone";
Challenge[8] = "SA2400 Gold Commendation\t10000\t50000\tNone";
Challenge[9] = "SA2400 Titan Commendation\t25000\t75000\tNone";
GunName = "SA2400 Shotgun";
//
projectileSpread = 3.0 / 1000.0;
//----------------------------------------------------------------------------\\
//State Data\\
//----------------------------------------------------------------------------\\
stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "ActivateReady";
stateSequence[0] = "Activate";
stateTimeoutValue[0] = 0.2;
stateSound[0] = ChaingunSwitchSound;
//----------------------------------------------------\\
stateName[1] = "Ready";
stateSequence[1] = "Ready";
stateTimeoutValue[1] = 0.2;
stateTransitionOnTriggerDown[1] = "FireFirstRound";
stateTransitionOnNoAmmo[1] = "NoAmmo";
//----------------------------------------------------\\
stateName[2] = "Reload";
stateSequence[2] = "Reload";
stateTransitionOnTimeout[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTimeoutValue[2] = 4.0;
stateAllowImageChange[2] = false;
stateSound[2] = DiscDryFireSound;
//----------------------------------------------------\\
stateName[3] = "NoAmmo";
stateSequence[3] = "NoAmmo";
stateTimeoutValue[3] = 0.2;
stateTransitionOnTriggerDown[3] = "DryFire";
stateTransitionOnAmmo[3] = "Reload";
//----------------------------------------------------\\
stateName[4] = "DryFire";
stateSequence[4] = "DryFire";
stateTransitionOnTimeout[4] = "NoAmmo";
stateTimeoutValue[4] = 0.5;
stateSound[4] = DiscSwitchSound;
//----------------------------------------------------\\
stateName[5] = "FireFirstRound";
stateSequence[5] = "Fire";
stateRecoil[5] = LightRecoil;
stateTransitionOnTimeout[5] = "FireSecondRound";
stateTransitionOnTriggerUp[5] = "ReadySecondRound";
stateTransitionOnNoAmmo[5] = "NoAmmo";
stateTimeoutValue[5] = 0.2;
stateFire[5] = true;
stateEjectShell[5] = true;
stateAllowImageChange[5] = false;
stateSound[5] = ShotgunFireSound;
stateScript[5] = "onFire";
//----------------------------------------------------\\
stateName[6] = "FireSecondRound";
stateSequence[6] = "Fire";
stateRecoil[6] = LightRecoil;
stateTransitionOnTimeout[6] = "FireThirdRound";
stateTransitionOnTriggerUp[6] = "ReadyThirdRound";
stateTransitionOnNoAmmo[6] = "NoAmmo";
stateTimeoutValue[6] = 0.2;
stateFire[6] = true;
stateEjectShell[6] = true;
stateAllowImageChange[6] = false;
stateSound[6] = ShotgunFireSound;
stateScript[6] = "onFire";
//----------------------------------------------------\\
stateName[7] = "FireThirdRound";
stateSequence[7] = "Fire";
stateRecoil[7] = LightRecoil;
stateTransitionOnTimeout[7] = "FireFourthRound";
stateTransitionOnTriggerUp[7] = "ReadyFourthRound";
stateTransitionOnNoAmmo[7] = "NoAmmo";
stateTimeoutValue[7] = 0.2;
stateFire[7] = true;
stateEjectShell[7] = true;
stateAllowImageChange[7] = false;
stateSound[7] = ShotgunFireSound;
stateScript[7] = "onFire";
//----------------------------------------------------\\
stateName[8] = "FireFourthRound";
stateSequence[8] = "Fire";
stateRecoil[8] = LightRecoil;
stateTransitionOnTimeout[8] = "FireFifthRound";
stateTransitionOnTriggerUp[8] = "ReadyFifthRound";
stateTransitionOnNoAmmo[8] = "NoAmmo";
stateTimeoutValue[8] = 0.2;
stateFire[8] = true;
stateEjectShell[8] = true;
stateAllowImageChange[8] = false;
stateSound[8] = ShotgunFireSound;
stateScript[8] = "onFire";
//----------------------------------------------------\\
stateName[9] = "FireFifthRound";
stateSequence[9] = "Fire";
stateRecoil[9] = LightRecoil;
stateTransitionOnTimeout[9] = "FireSixthRound";
stateTransitionOnTriggerUp[9] = "ReadySixthRound";
stateTransitionOnNoAmmo[9] = "NoAmmo";
stateTimeoutValue[9] = 0.2;
stateFire[9] = true;
stateEjectShell[9] = true;
stateAllowImageChange[9] = false;
stateSound[9] = ShotgunFireSound;
stateScript[9] = "onFire";
//----------------------------------------------------\\
stateName[10] = "FireSixthRound";
stateSequence[10] = "Fire";
stateRecoil[10] = LightRecoil;
stateTransitionOnTimeout[10] = "FireSeventhRound";
stateTransitionOnTriggerUp[10] = "ReadySeventhRound";
stateTransitionOnNoAmmo[10] = "NoAmmo";
stateTimeoutValue[10] = 0.2;
stateFire[10] = true;
stateEjectShell[10] = true;
stateAllowImageChange[10] = false;
stateSound[10] = ShotgunFireSound;
stateScript[10] = "onFire";
//----------------------------------------------------\\
stateName[11] = "FireSeventhRound";
stateSequence[11] = "Fire";
stateRecoil[11] = LightRecoil;
stateTransitionOnTimeout[11] = "Reload";
stateTransitionOnTriggerUp[11] = "Reload";
stateTransitionOnNoAmmo[11] = "NoAmmo";
stateTimeoutValue[11] = 0.2;
stateFire[11] = true;
stateEjectShell[11] = true;
stateAllowImageChange[11] = false;
stateSound[11] = ShotgunFireSound;
stateScript[11] = "onFire";
//----------------------------------------------------\\
stateName[12] = "ReadySecondRound";
stateSequence[12] = "ReadySecondRound";
stateTransitionOnTriggerDown[12] = "FireSecondRound";
stateTransitionOnNoAmmo[12] = "NoAmmo";
//----------------------------------------------------\\
stateName[13] = "ReadyThirdRound";
stateSequence[13] = "ReadyThirdRound";
stateTransitionOnTriggerDown[13] = "FireThirdRound";
stateTransitionOnNoAmmo[13] = "NoAmmo";
//----------------------------------------------------\\
stateName[14] = "ReadyFourthRound";
stateSequence[14] = "ReadyFourthRound";
stateTransitionOnTriggerDown[14] = "FireFourthRound";
stateTransitionOnNoAmmo[14] = "NoAmmo";
//----------------------------------------------------\\
stateName[15] = "ReadyFifthRound";
stateSequence[15] = "ReadyFifthRound";
stateTransitionOnTriggerDown[15] = "FireFifthRound";
stateTransitionOnNoAmmo[15] = "NoAmmo";
//----------------------------------------------------\\
stateName[16] = "ReadySixthRound";
stateSequence[16] = "ReadySixthRound";
stateTransitionOnTriggerDown[16] = "FireSixthRound";
stateTransitionOnNoAmmo[16] = "NoAmmo";
//----------------------------------------------------\\
stateName[17] = "ReadySeventhRound";
stateSequence[17] = "ReadySeventhRound";
stateTransitionOnTriggerDown[17] = "FireSeventhRound";
stateTransitionOnNoAmmo[17] = "NoAmmo";
//----------------------------------------------------\\
stateName[18] = "ActivateReady";
stateTransitionOnLoaded[18] = "Ready";
stateTransitionOnNoAmmo[18] = "NoAmmo";
//----------------------------------------------------------------------------\\
//----------------------------------------------------------------------------\\
casing = SemiAutoShellDebris;
shellExitDir = "1.0 0.3 1.0";
shellExitOffset = "0.15 -0.56 -0.1";
shellExitVariance = 15.0;
shellVelocity = 30.0;
projectile = SA2400Slug;
projectileType = TracerProjectile;
//ClipStuff
ClipName = "SA2400Clip";
ClipPickupName["SA2400Clip"] = "some SA2400 Slugs";
ShowsClipInHud = 1;
ClipReloadTime = 6;
ClipReturn = 21;
InitialClips = 8;
ReloadSingle = 1;
SingleShotAdd = 7;
//
RankRequire = $TWM2::RankRequire["SA2400"];
//Challenges
HasChallenges = 1;
ChallengeCt = 9;
Challenge[1] = "SA2400 Killer\t50\t100\tNone";
Challenge[2] = "SA2400 Extremist\t100\t150\tNone";
Challenge[3] = "SA2400 Expert\t250\t250\tNone";
Challenge[4] = "SA2400 Master\t500\t500\tNone";
Challenge[5] = "SA2400 God\t1000\t1000\tNone";
Challenge[6] = "SA2400 Bronze Commendation\t2500\t10000\tNone";
Challenge[7] = "SA2400 Silver Commendation\t5000\t25000\tNone";
Challenge[8] = "SA2400 Gold Commendation\t10000\t50000\tNone";
Challenge[9] = "SA2400 Titan Commendation\t25000\t75000\tNone";
GunName = "SA2400 Shotgun";
//
projectileSpread = 3.0 / 1000.0;
//----------------------------------------------------------------------------\\
//State Data\\
//----------------------------------------------------------------------------\\
stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "ActivateReady";
stateSequence[0] = "Activate";
stateTimeoutValue[0] = 0.2;
stateSound[0] = ChaingunSwitchSound;
//----------------------------------------------------\\
stateName[1] = "Ready";
stateSequence[1] = "Ready";
stateTimeoutValue[1] = 0.2;
stateTransitionOnTriggerDown[1] = "FireFirstRound";
stateTransitionOnNoAmmo[1] = "NoAmmo";
//----------------------------------------------------\\
stateName[2] = "Reload";
stateSequence[2] = "Reload";
stateTransitionOnTimeout[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTimeoutValue[2] = 4.0;
stateAllowImageChange[2] = false;
stateSound[2] = DiscDryFireSound;
//----------------------------------------------------\\
stateName[3] = "NoAmmo";
stateSequence[3] = "NoAmmo";
stateTimeoutValue[3] = 0.2;
stateTransitionOnTriggerDown[3] = "DryFire";
stateTransitionOnAmmo[3] = "Reload";
//----------------------------------------------------\\
stateName[4] = "DryFire";
stateSequence[4] = "DryFire";
stateTransitionOnTimeout[4] = "NoAmmo";
stateTimeoutValue[4] = 0.5;
stateSound[4] = DiscSwitchSound;
//----------------------------------------------------\\
stateName[5] = "FireFirstRound";
stateSequence[5] = "Fire";
stateRecoil[5] = LightRecoil;
stateTransitionOnTimeout[5] = "FireSecondRound";
stateTransitionOnTriggerUp[5] = "ReadySecondRound";
stateTransitionOnNoAmmo[5] = "NoAmmo";
stateTimeoutValue[5] = 0.14;
stateFire[5] = true;
stateEjectShell[5] = true;
stateAllowImageChange[5] = false;
stateSound[5] = ShotgunFireSound;
stateScript[5] = "onFire";
//----------------------------------------------------\\
stateName[6] = "FireSecondRound";
stateSequence[6] = "Fire";
stateRecoil[6] = LightRecoil;
stateTransitionOnTimeout[6] = "FireThirdRound";
stateTransitionOnTriggerUp[6] = "ReadyThirdRound";
stateTransitionOnNoAmmo[6] = "NoAmmo";
stateTimeoutValue[6] = 0.14;
stateFire[6] = true;
stateEjectShell[6] = true;
stateAllowImageChange[6] = false;
stateSound[6] = ShotgunFireSound;
stateScript[6] = "onFire";
//----------------------------------------------------\\
stateName[7] = "FireThirdRound";
stateSequence[7] = "Fire";
stateRecoil[7] = LightRecoil;
stateTransitionOnTimeout[7] = "FireFourthRound";
stateTransitionOnTriggerUp[7] = "ReadyFourthRound";
stateTransitionOnNoAmmo[7] = "NoAmmo";
stateTimeoutValue[7] = 0.14;
stateFire[7] = true;
stateEjectShell[7] = true;
stateAllowImageChange[7] = false;
stateSound[7] = ShotgunFireSound;
stateScript[7] = "onFire";
//----------------------------------------------------\\
stateName[8] = "FireFourthRound";
stateSequence[8] = "Fire";
stateRecoil[8] = LightRecoil;
stateTransitionOnTimeout[8] = "FireFifthRound";
stateTransitionOnTriggerUp[8] = "ReadyFifthRound";
stateTransitionOnNoAmmo[8] = "NoAmmo";
stateTimeoutValue[8] = 0.14;
stateFire[8] = true;
stateEjectShell[8] = true;
stateAllowImageChange[8] = false;
stateSound[8] = ShotgunFireSound;
stateScript[8] = "onFire";
//----------------------------------------------------\\
stateName[9] = "FireFifthRound";
stateSequence[9] = "Fire";
stateRecoil[9] = LightRecoil;
stateTransitionOnTimeout[9] = "FireSixthRound";
stateTransitionOnTriggerUp[9] = "ReadySixthRound";
stateTransitionOnNoAmmo[9] = "NoAmmo";
stateTimeoutValue[9] = 0.14;
stateFire[9] = true;
stateEjectShell[9] = true;
stateAllowImageChange[9] = false;
stateSound[9] = ShotgunFireSound;
stateScript[9] = "onFire";
//----------------------------------------------------\\
stateName[10] = "FireSixthRound";
stateSequence[10] = "Fire";
stateRecoil[10] = LightRecoil;
stateTransitionOnTimeout[10] = "FireSeventhRound";
stateTransitionOnTriggerUp[10] = "ReadySeventhRound";
stateTransitionOnNoAmmo[10] = "NoAmmo";
stateTimeoutValue[10] = 0.14;
stateFire[10] = true;
stateEjectShell[10] = true;
stateAllowImageChange[10] = false;
stateSound[10] = ShotgunFireSound;
stateScript[10] = "onFire";
//----------------------------------------------------\\
stateName[11] = "FireSeventhRound";
stateSequence[11] = "Fire";
stateRecoil[11] = LightRecoil;
stateTransitionOnTimeout[11] = "Reload";
stateTransitionOnTriggerUp[11] = "Reload";
stateTransitionOnNoAmmo[11] = "NoAmmo";
stateTimeoutValue[11] = 0.14;
stateFire[11] = true;
stateEjectShell[11] = true;
stateAllowImageChange[11] = false;
stateSound[11] = ShotgunFireSound;
stateScript[11] = "onFire";
//----------------------------------------------------\\
stateName[12] = "ReadySecondRound";
stateSequence[12] = "ReadySecondRound";
stateTransitionOnTriggerDown[12] = "FireSecondRound";
stateTransitionOnNoAmmo[12] = "NoAmmo";
//----------------------------------------------------\\
stateName[13] = "ReadyThirdRound";
stateSequence[13] = "ReadyThirdRound";
stateTransitionOnTriggerDown[13] = "FireThirdRound";
stateTransitionOnNoAmmo[13] = "NoAmmo";
//----------------------------------------------------\\
stateName[14] = "ReadyFourthRound";
stateSequence[14] = "ReadyFourthRound";
stateTransitionOnTriggerDown[14] = "FireFourthRound";
stateTransitionOnNoAmmo[14] = "NoAmmo";
//----------------------------------------------------\\
stateName[15] = "ReadyFifthRound";
stateSequence[15] = "ReadyFifthRound";
stateTransitionOnTriggerDown[15] = "FireFifthRound";
stateTransitionOnNoAmmo[15] = "NoAmmo";
//----------------------------------------------------\\
stateName[16] = "ReadySixthRound";
stateSequence[16] = "ReadySixthRound";
stateTransitionOnTriggerDown[16] = "FireSixthRound";
stateTransitionOnNoAmmo[16] = "NoAmmo";
//----------------------------------------------------\\
stateName[17] = "ReadySeventhRound";
stateSequence[17] = "ReadySeventhRound";
stateTransitionOnTriggerDown[17] = "FireSeventhRound";
stateTransitionOnNoAmmo[17] = "NoAmmo";
//----------------------------------------------------\\
stateName[18] = "ActivateReady";
stateTransitionOnLoaded[18] = "Ready";
stateTransitionOnNoAmmo[18] = "NoAmmo";
};
datablock ItemData( SA2400 )
{
className = Weapon;
catagory = "Spawn Items";
shapeFile = "weapon_grenade_launcher.dts";
image = SA2400Image;
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "a Semi-Automatic Shotgun";
datablock ItemData( SA2400 ) {
className = Weapon;
catagory = "Spawn Items";
shapeFile = "weapon_grenade_launcher.dts";
image = SA2400Image;
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "a Semi-Automatic Shotgun";
computeCRC = true;
emap = true;
};
computeCRC = true;
emap = true;
};

View file

@ -1,219 +1,214 @@
datablock TracerProjectileData(SCD343Pellet)
{
doDynamicClientHits = true;
datablock TracerProjectileData(SCD343Pellet) {
doDynamicClientHits = true;
directDamage = (0.075 * 1.4);
directDamageType = $DamageType::SCD343;
explosion = "ChaingunExplosion";
splash = ChaingunSplash;
HeadMultiplier = 1.2;
LegsMultiplier = 0.75;
ImageSource = "SCD343Image";
directDamage = 0.17;
directDamageType = $DamageType::SCD343;
explosion = "ChaingunExplosion";
splash = ChaingunSplash;
HeadMultiplier = 1.2;
LegsMultiplier = 0.75;
longRangeMultiplier = 0.75;
kickBackStrength = 0.0;
sound = ChaingunProjectile;
ImageSource = "SCD343Image";
dryVelocity = 1500.0;
wetVelocity = 1000.0;
velInheritFactor = 0.0;
fizzleTimeMS = 1000;
lifetimeMS = 1000;
explodeOnDeath = false;
reflectOnWaterImpactAngle = 0.0;
explodeOnWaterImpact = false;
deflectionOnWaterImpact = 0.0;
fizzleUnderwaterMS = 3000;
longRangeMultiplier = 0.75;
kickBackStrength = 0.0;
sound = ChaingunProjectile;
tracerLength = 5.0;
tracerAlpha = false;
tracerMinPixels = 6;
tracerColor = 211.0/255.0 @ " " @ 215.0/255.0 @ " " @ 120.0/255.0 @ " 0.75";
dryVelocity = 1500.0;
wetVelocity = 1000.0;
velInheritFactor = 0.0;
fizzleTimeMS = 75;
lifetimeMS = 100;
explodeOnDeath = false;
reflectOnWaterImpactAngle = 0.0;
explodeOnWaterImpact = false;
deflectionOnWaterImpact = 0.0;
fizzleUnderwaterMS = 3000;
tracerLength = 5.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;
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;
decalData[0] = ChaingunDecal1;
decalData[1] = ChaingunDecal2;
decalData[2] = ChaingunDecal3;
decalData[3] = ChaingunDecal4;
decalData[4] = ChaingunDecal5;
decalData[5] = ChaingunDecal6;
};
//--------------------------------------------------------------------------
// Ammo
//--------------------------------------
datablock ItemData(SCD343Ammo)
{
className = Ammo;
catagory = "Ammo";
shapeFile = "ammo_chaingun.dts";
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
datablock ItemData(SCD343Ammo) {
className = Ammo;
catagory = "Ammo";
shapeFile = "ammo_chaingun.dts";
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "some SCD343 rounds";
computeCRC = true;
computeCRC = true;
};
//--------------------------------------------------------------------------
// Weapon
//--------------------------------------
datablock ShapeBaseImageData(SCD343Image)
{
className = WeaponImage;
shapeFile = "weapon_plasma.dts";
item = SCD343;
ammo = SCD343Ammo;
projectile = SCD343Pellet;
projectileType = TracerProjectile;
emap = true;
mass = 20;
datablock ShapeBaseImageData(SCD343Image) {
className = WeaponImage;
shapeFile = "weapon_plasma.dts";
item = SCD343;
ammo = SCD343Ammo;
projectile = SCD343Pellet;
projectileType = TracerProjectile;
emap = true;
mass = 20;
casing = ShellDebris;
shellExitDir = "0.5 0.0 1.0"; // L/R - F/B - T/B
shellExitOffset = "0.15 -0.51 -0.1"; // L/R - F/B - T/B
shellExitVariance = 10.0;
shellVelocity = 4.0;
casing = ShellDebris;
shellExitDir = "0.5 0.0 1.0"; // L/R - F/B - T/B
shellExitOffset = "0.15 -0.51 -0.1"; // L/R - F/B - T/B
shellExitVariance = 10.0;
shellVelocity = 4.0;
//ClipStuff
ClipName = "SCD343Clip";
ClipPickupName["SCD343Clip"] = "some SCD343 Clip Boxes";
ShowsClipInHud = 1;
ClipReloadTime = 4;
ClipReturn = 1;
InitialClips = 8;
//
RankRequire = $TWM2::RankRequire["SCD343"];
//ClipStuff
ClipName = "SCD343Clip";
ClipPickupName["SCD343Clip"] = "some SCD343 Clip Boxes";
ShowsClipInHud = 1;
ClipReloadTime = 4;
ClipReturn = 1;
InitialClips = 8;
//
RankRequire = $TWM2::RankRequire["SCD343"];
//Challenges
HasChallenges = 1;
ChallengeCt = 9;
Challenge[1] = "SCD343 Killer\t50\t100\tNone";
Challenge[2] = "SCD343 Extremist\t100\t150\tNone";
Challenge[3] = "SCD343 Expert\t250\t250\tNone";
Challenge[4] = "SCD343 Master\t500\t500\tNone";
Challenge[5] = "SCD343 God\t1000\t1000\tNone";
Challenge[6] = "SCD343 Bronze Commendation\t2500\t10000\tNone";
Challenge[7] = "SCD343 Silver Commendation\t5000\t25000\tNone";
Challenge[8] = "SCD343 Gold Commendation\t10000\t50000\tNone";
Challenge[9] = "SCD343 Titan Commendation\t25000\t75000\tNone";
GunName = "SCD343 Shotgun";
//
//Challenges
HasChallenges = 1;
ChallengeCt = 9;
Challenge[1] = "SCD343 Killer\t50\t100\tNone";
Challenge[2] = "SCD343 Extremist\t100\t150\tNone";
Challenge[3] = "SCD343 Expert\t250\t250\tNone";
Challenge[4] = "SCD343 Master\t500\t500\tNone";
Challenge[5] = "SCD343 God\t1000\t1000\tNone";
Challenge[6] = "SCD343 Bronze Commendation\t2500\t10000\tNone";
Challenge[7] = "SCD343 Silver Commendation\t5000\t25000\tNone";
Challenge[8] = "SCD343 Gold Commendation\t10000\t50000\tNone";
Challenge[9] = "SCD343 Titan Commendation\t25000\t75000\tNone";
GunName = "SCD343 Shotgun";
//
projectileSpread = 6.0 / 1000.0;
projectileSpread = 10.0 / 1000.0;
stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "ActivateReady";
stateTimeoutValue[0] = 0.5;
stateSequence[0] = "Activate";
stateSound[0] = ChaingunSwitchSound;
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[1] = "ActivateReady";
stateTransitionOnLoaded[1] = "Ready";
stateTransitionOnNoAmmo[1] = "NoAmmo";
stateName[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTransitionOnTriggerDown[2] = "CheckWet";
stateName[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTransitionOnTriggerDown[2] = "CheckWet";
stateName[3] = "Fire";
stateTransitionOnTimeout[3] = "Reload";
stateTimeoutValue[3] = 0.0001;
stateFire[3] = true;
stateEjectShell[3] = true;
stateEmitter[3] = "GunFireEffectEmitter";
stateEmitterNode[3] = "muzzlepoint1";
stateEmitterTime[3] = 1;
stateRecoil[3] = LightRecoil;
stateAllowImageChange[3] = false;
stateScript[3] = "onFire";
stateEmitterTime[3] = 0.2;
stateSound[3] = SniperFireSound;
stateName[3] = "Fire";
stateTransitionOnTimeout[3] = "Reload";
stateTimeoutValue[3] = 0.0001;
stateFire[3] = true;
stateEjectShell[3] = true;
stateEmitter[3] = "GunFireEffectEmitter";
stateEmitterNode[3] = "muzzlepoint1";
stateEmitterTime[3] = 1;
stateRecoil[3] = LightRecoil;
stateAllowImageChange[3] = false;
stateScript[3] = "onFire";
stateEmitterTime[3] = 0.2;
stateSound[3] = SniperFireSound;
stateName[4] = "Reload";
stateTransitionOnNoAmmo[4] = "NoAmmo";
stateTransitionOnTimeout[4] = "Ready";
stateTimeoutValue[4] = 0.5;
stateAllowImageChange[4] = false;
stateSequence[4] = "Reload";
stateName[4] = "Reload";
stateTransitionOnNoAmmo[4] = "NoAmmo";
stateTransitionOnTimeout[4] = "Ready";
stateTimeoutValue[4] = 0.5;
stateAllowImageChange[4] = false;
stateSequence[4] = "Reload";
stateName[5] = "NoAmmo";
stateTransitionOnAmmo[5] = "Reload";
stateSequence[5] = "NoAmmo";
stateTransitionOnTriggerDown[5] = "DryFire";
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[6] = "DryFire";
stateSound[6] = ChaingunDryFireSound;
stateTimeoutValue[6] = 1.0;
stateTransitionOnTimeout[6] = "NoAmmo";
stateName[7] = "WetFire";
stateSound[7] = ChaingunDryFireSound;
stateTimeoutValue[7] = 1.0;
stateTransitionOnTimeout[7] = "Ready";
stateName[7] = "WetFire";
stateSound[7] = ChaingunDryFireSound;
stateTimeoutValue[7] = 1.0;
stateTransitionOnTimeout[7] = "Ready";
stateName[8] = "CheckWet";
stateTransitionOnWet[8] = "WetFire";
stateTransitionOnNotWet[8] = "Fire";
stateName[8] = "CheckWet";
stateTransitionOnWet[8] = "WetFire";
stateTransitionOnNotWet[8] = "Fire";
};
datablock ItemData(SCD343)
{
className = Weapon;
catagory = "Spawn Items";
shapeFile = "weapon_plasma.dts";
image = SCD343Image;
mass = 1.0;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "a SCD343";
datablock ItemData(SCD343) {
className = Weapon;
catagory = "Spawn Items";
shapeFile = "weapon_plasma.dts";
image = SCD343Image;
mass = 1.0;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "a SCD343";
computeCRC = true;
emap = true;
computeCRC = true;
emap = true;
};
function SCD343Image::onMount(%this,%obj,%slot) {
Parent::onMount(%this, %obj, %slot);
Parent::onMount(%this, %obj, %slot);
}
function SCD343Image::onFire(%data,%obj,%slot) {
serverPlay3D(ShotgunFireSound, %obj.getPosition());
serverPlay3D(ShotgunFireSound, %obj.getPosition());
%obj.applyKick(-250);
%obj.decInventory(%data.ammo,1);
%obj.applyKick(-250);
%obj.decInventory(%data.ammo,1);
%vector = %obj.getMuzzleVector(%slot);
%mp = %obj.getMuzzlePoint(%slot);
%vector = %obj.getMuzzleVector(%slot);
%mp = %obj.getMuzzlePoint(%slot);
for (%i=0; %i < 16; %i++) {
%x = (getRandom() - 0.5) * 2 * 3.1415926 * %data.projectileSpread;
%y = (getRandom() - 0.5) * 2 * 3.1415926 * %data.projectileSpread;
%z = (getRandom() - 0.5) * 2 * 3.1415926 * %data.projectileSpread;
%mat = MatrixCreateFromEuler(%x @ " " @ %y @ " " @ %z);
%newvector = MatrixMulVector(%mat, %vector);
%x = (getRandom() - 0.5) * 2 * 3.1415926 * %data.projectileSpread;
%y = (getRandom() - 0.5) * 2 * 3.1415926 * %data.projectileSpread;
%z = (getRandom() - 0.5) * 2 * 3.1415926 * %data.projectileSpread;
%mat = MatrixCreateFromEuler(%x @ " " @ %y @ " " @ %z);
%newvector = MatrixMulVector(%mat, %vector);
%p = new (%data.projectileType)() {
dataBlock = %data.projectile;
initialDirection = %newvector;
initialPosition = %mp;
sourceObject = %obj;
damageFactor = 1;
sourceSlot = %slot;
};
%p = new (%data.projectileType)() {
dataBlock = %data.projectile;
initialDirection = %newvector;
initialPosition = %mp;
sourceObject = %obj;
damageFactor = 1;
sourceSlot = %slot;
};
%p.WeaponImageSource = %data.getName();
}
if(%obj.inv[SCD343Ammo] == 0) { //Added Phantom139, TWM2
AttemptReload(%data, %obj, %slot);
}
}
%p.WeaponImageSource = %data.getName();
}
if(%obj.inv[SCD343Ammo] == 0) { //Added Phantom139, TWM2
AttemptReload(%data, %obj, %slot);
}
}

View file

@ -1,165 +1,161 @@
datablock TracerProjectileData(Wp400Pellet)
{
doDynamicClientHits = true;
datablock TracerProjectileData(Wp400Pellet) {
doDynamicClientHits = true;
directDamage = (0.075 * 1.5);
directDamageType = $DamageType::Wp400;
explosion = "ChaingunExplosion";
splash = ChaingunSplash;
HeadMultiplier = 1.2;
LegsMultiplier = 0.75;
directDamage = 0.1125;
directDamageType = $DamageType::Wp400;
explosion = "ChaingunExplosion";
splash = ChaingunSplash;
HeadMultiplier = 1.2;
LegsMultiplier = 0.75;
longRangeMultiplier = 0.75;
kickBackStrength = 0.0;
sound = ChaingunProjectile;
ImageSource = "Wp400Image";
longRangeMultiplier = 0.75;
kickBackStrength = 0.0;
sound = ChaingunProjectile;
dryVelocity = 1500.0;
wetVelocity = 1000.0;
velInheritFactor = 0.0;
fizzleTimeMS = 1000;
lifetimeMS = 1000;
explodeOnDeath = false;
reflectOnWaterImpactAngle = 0.0;
explodeOnWaterImpact = false;
deflectionOnWaterImpact = 0.0;
fizzleUnderwaterMS = 3000;
ImageSource = "Wp400Image";
tracerLength = 5.0;
tracerAlpha = false;
tracerMinPixels = 6;
tracerColor = 211.0/255.0 @ " " @ 215.0/255.0 @ " " @ 120.0/255.0 @ " 0.75";
dryVelocity = 1500.0;
wetVelocity = 1000.0;
velInheritFactor = 0.0;
fizzleTimeMS = 75;
lifetimeMS = 100;
explodeOnDeath = false;
reflectOnWaterImpactAngle = 0.0;
explodeOnWaterImpact = false;
deflectionOnWaterImpact = 0.0;
fizzleUnderwaterMS = 3000;
tracerLength = 5.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;
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;
decalData[0] = ChaingunDecal1;
decalData[1] = ChaingunDecal2;
decalData[2] = ChaingunDecal3;
decalData[3] = ChaingunDecal4;
decalData[4] = ChaingunDecal5;
decalData[5] = ChaingunDecal6;
};
//--------------------------------------------------------------------------
// Ammo
//--------------------------------------
datablock ItemData(Wp400Ammo)
{
className = Ammo;
catagory = "Ammo";
shapeFile = "ammo_chaingun.dts";
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
datablock ItemData(Wp400Ammo) {
className = Ammo;
catagory = "Ammo";
shapeFile = "ammo_chaingun.dts";
mass = 1;
elasticity = 0.2;
friction = 0.6;
pickupRadius = 2;
pickUpName = "some Wp400 rounds";
computeCRC = true;
computeCRC = true;
};
//--------------------------------------------------------------------------
// Weapon
//--------------------------------------
datablock ShapeBaseImageData(Wp400Image)
{
className = WeaponImage;
shapeFile = "weapon_plasma.dts";
item = Wp400;
ammo = Wp400Ammo;
projectile = Wp400Pellet;
projectileType = TracerProjectile;
emap = true;
mass = 20;
datablock ShapeBaseImageData(Wp400Image) {
className = WeaponImage;
shapeFile = "weapon_plasma.dts";
item = Wp400;
ammo = Wp400Ammo;
projectile = Wp400Pellet;
projectileType = TracerProjectile;
emap = true;
mass = 20;
casing = ShellDebris;
shellExitDir = "0.5 0.0 1.0"; // L/R - F/B - T/B
shellExitOffset = "0.15 -0.51 -0.1"; // L/R - F/B - T/B
shellExitVariance = 10.0;
shellVelocity = 4.0;
casing = ShellDebris;
shellExitDir = "0.5 0.0 1.0"; // L/R - F/B - T/B
shellExitOffset = "0.15 -0.51 -0.1"; // L/R - F/B - T/B
shellExitVariance = 10.0;
shellVelocity = 4.0;
//ClipStuff
ClipName = "Wp400Clip";
ClipPickupName["Wp400Clip"] = "some Wp400 Clip Boxes";
ShowsClipInHud = 1;
ClipReloadTime = 4;
ClipReturn = 5;
InitialClips = 6;
//
RankRequire = $TWM2::RankRequire["Wp400"];
//Challenges
HasChallenges = 1;
ChallengeCt = 9;
Challenge[1] = "Wp400 Killer\t50\t100\tNone";
Challenge[2] = "Wp400 Extremist\t100\t150\tNone";
Challenge[3] = "Wp400 Expert\t250\t250\tNone";
Challenge[4] = "Wp400 Master\t500\t500\tNone";
Challenge[5] = "Wp400 God\t1000\t1000\tNone";
Challenge[6] = "Wp400 Bronze Commendation\t2500\t10000\tNone";
Challenge[7] = "Wp400 Silver Commendation\t5000\t25000\tNone";
Challenge[8] = "Wp400 Gold Commendation\t10000\t50000\tNone";
Challenge[9] = "Wp400 Titan Commendation\t25000\t75000\tNone";
GunName = "Wp400 Shotgun";
//
//ClipStuff
ClipName = "Wp400Clip";
ClipPickupName["Wp400Clip"] = "some Wp400 Clip Boxes";
ShowsClipInHud = 1;
ClipReloadTime = 7;
ClipReturn = 5;
InitialClips = 6;
//
RankRequire = $TWM2::RankRequire["Wp400"];
projectileSpread = 10.0 / 1000.0;
//Challenges
HasChallenges = 1;
ChallengeCt = 9;
Challenge[1] = "Wp400 Killer\t50\t100\tNone";
Challenge[2] = "Wp400 Extremist\t100\t150\tNone";
Challenge[3] = "Wp400 Expert\t250\t250\tNone";
Challenge[4] = "Wp400 Master\t500\t500\tNone";
Challenge[5] = "Wp400 God\t1000\t1000\tNone";
Challenge[6] = "Wp400 Bronze Commendation\t2500\t10000\tNone";
Challenge[7] = "Wp400 Silver Commendation\t5000\t25000\tNone";
Challenge[8] = "Wp400 Gold Commendation\t10000\t50000\tNone";
Challenge[9] = "Wp400 Titan Commendation\t25000\t75000\tNone";
GunName = "Wp400 Shotgun";
//
stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "ActivateReady";
stateTimeoutValue[0] = 0.3;
stateSequence[0] = "Activate";
stateSound[0] = ChaingunSwitchSound;
projectileSpread = 15.0 / 1000.0;
stateName[1] = "ActivateReady";
stateTransitionOnLoaded[1] = "Ready";
stateTransitionOnNoAmmo[1] = "NoAmmo";
stateName[0] = "Activate";
stateTransitionOnTimeout[0] = "ActivateReady";
stateTimeoutValue[0] = 0.3;
stateSequence[0] = "Activate";
stateSound[0] = ChaingunSwitchSound;
stateName[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTransitionOnTriggerDown[2] = "CheckWet";
stateName[1] = "ActivateReady";
stateTransitionOnLoaded[1] = "Ready";
stateTransitionOnNoAmmo[1] = "NoAmmo";
stateName[3] = "Fire";
stateTransitionOnTimeout[3] = "Reload";
stateTimeoutValue[3] = 0.0001;
stateFire[3] = true;
stateEjectShell[3] = true;
stateRecoil[3] = LightRecoil;
stateAllowImageChange[3] = false;
stateScript[3] = "onFire";
stateSound[3] = SniperFireSound;
stateName[2] = "Ready";
stateTransitionOnNoAmmo[2] = "NoAmmo";
stateTransitionOnTriggerDown[2] = "CheckWet";
stateName[4] = "Reload";
stateTransitionOnNoAmmo[4] = "NoAmmo";
stateTransitionOnTimeout[4] = "Ready";
stateTimeoutValue[4] = 0.9;
stateAllowImageChange[4] = false;
stateSequence[4] = "Reload";
stateName[3] = "Fire";
stateTransitionOnTimeout[3] = "Reload";
stateTimeoutValue[3] = 0.0001;
stateFire[3] = true;
stateEjectShell[3] = true;
stateRecoil[3] = LightRecoil;
stateAllowImageChange[3] = false;
stateScript[3] = "onFire";
stateSound[3] = SniperFireSound;
stateName[5] = "NoAmmo";
stateTransitionOnAmmo[5] = "Reload";
stateSequence[5] = "NoAmmo";
stateTransitionOnTriggerDown[5] = "DryFire";
stateName[4] = "Reload";
stateTransitionOnNoAmmo[4] = "NoAmmo";
stateTransitionOnTimeout[4] = "Ready";
stateTimeoutValue[4] = 0.5;
stateAllowImageChange[4] = false;
stateSequence[4] = "Reload";
stateName[6] = "DryFire";
stateSound[6] = ChaingunDryFireSound;
stateTimeoutValue[6] = 1.0;
stateTransitionOnTimeout[6] = "NoAmmo";
stateName[5] = "NoAmmo";
stateTransitionOnAmmo[5] = "Reload";
stateSequence[5] = "NoAmmo";
stateTransitionOnTriggerDown[5] = "DryFire";
stateName[7] = "WetFire";
stateSound[7] = ChaingunDryFireSound;
stateTimeoutValue[7] = 1.0;
stateTransitionOnTimeout[7] = "Ready";
stateName[6] = "DryFire";
stateSound[6] = ChaingunDryFireSound;
stateTimeoutValue[6] = 1.0;
stateTransitionOnTimeout[6] = "NoAmmo";
stateName[8] = "CheckWet";
stateTransitionOnWet[8] = "WetFire";
stateTransitionOnNotWet[8] = "Fire";
stateName[7] = "WetFire";
stateSound[7] = ChaingunDryFireSound;
stateTimeoutValue[7] = 1.0;
stateTransitionOnTimeout[7] = "Ready";
stateName[8] = "CheckWet";
stateTransitionOnWet[8] = "WetFire";
stateTransitionOnNotWet[8] = "Fire";
};
datablock ItemData(Wp400)