forget I hate programming:
//Bomb.cs
//projectile
AddDamageType("BombDirect", '<bitmap:add-ons/Weapon_Bombs/CI_Bomb> %1', '%2 <bitmap:add-ons/Weapon_Bombs/CI_Bomb> %1',1,1);
AddDamageType("BombRadius", '<bitmap:add-ons/Weapon_Bombs/CI_BombRadius> %1', '%2 <bitmap:add-ons/Weapon_Bombs/CI_BombRadius> %1',1,0);
datablock ProjectileData(BombProjectile)
{
projectileShapeName = "./bomb.dts";
directDamage = 100;
directDamageType = $DamageType::BombDirect;
radiusDamageType = $DamageType::BombRadius;
impactImpulse = 20;
verticalImpulse = 10;
explosion = rocketExplosion;
particleEmitter = RocketTrailEmitter;
brickExplosionRadius = 10;
brickExplosionImpact = true; //destroy a brick if we hit it directly?
brickExplosionForce = 50;
brickExplosionMaxVolume = 200;
brickExplosionMaxVolumeFloating = 200;
muzzleVelocity = 5;
velInheritFactor = 0.5;
armingDelay = 1;
lifetime = 20000;
fadeDelay = 19500;
bounceElasticity = 0;
bounceFriction = 0;
isBallistic = true;
gravityMod = 1.0;
hasLight = false;
lightRadius = 3.0;
lightColor = "0 0 0.5";
uiName = "Bomb";
};
//////////
// item //
//////////
datablock ItemData(BombItem)
{
category = "Weapon"; // Mission editor category
className = "Weapon"; // For inventory system
// Basic Item Properties
shapeFile = "./bomb.dts";
mass = 1;
density = 0.2;
elasticity = 0.2;
friction = 0.6;
emap = true;
//gui stuff
uiName = "Bomb";
iconName = "./icon_Bomb";
doColorShift = false;
colorShiftColor = "0.400 0.196 0 1.000";
// Dynamic properties defined by the scripts
image = BombImage;
canDrop = true;
};
////////////////
//weapon image//
////////////////
datablock ShapeBaseImageData(BombImage)
{
// Basic Item properties
shapeFile = "base/data/shapes/empty.dts";
emap = true;
// Specify mount point & offset for 3rd person, and eye offset
// for first person rendering.
mountPoint = 0;
offset = "0 0 -3";
//eyeOffset = "0.1 0.2 -0.55";
// When firing from a point offset from the eye, muzzle correction
// will adjust the muzzle vector to point to the eye LOS point.
// Since this weapon doesn't actually fire from the muzzle point,
// we need to turn this off.
correctMuzzleVector = true;
// Add the WeaponImage namespace as a parent, WeaponImage namespace
// provides some hooks into the inventory system.
className = "WeaponImage";
// Projectile && Ammo.
item = BombItem;
ammo = " ";
projectile = BombProjectile;
projectileType = Projectile;
//melee particles shoot from eye node for consistancy
melee = false;
//raise your arm up or not
armReady = false;
//casing = " ";
doColorShift = true;
colorShiftColor = "0.400 0.196 0 1.000";
// Images have a state system which controls how the animations
// are run, which sounds are played, script callbacks, etc. This
// state system is downloaded to the client so that clients can
// predict state changes and animate accordingly. The following
// system supports basic ready->fire->reload transitions as
// well as a no-ammo->dryfire idle state.
// Initial start up state
stateName[0] = "Activate";
stateTimeoutValue[0] = 0.1;
stateTransitionOnTimeout[0] = "Ready";
stateSequence[0] = "ready";
stateSound[0] = weaponSwitchSound;
stateName[1] = "Ready";
stateTransitionOnTriggerDown[1] = "Fire";
stateAllowImageChange[1] = true;
stateName[2] = "Fire";
stateTransitionOnTimeout[2] = "Ready";
stateTimeoutValue[2] = 0.9;
stateFire[2] = true;
stateSequence[2] = "fire";
stateScript[2] = "onFire";
stateWaitForTimeout[2] = true;
stateAllowImageChange[2] = false;
stateSound[2] = SpearFireSound;
};
package Weapon_Bomb
{
function BombImage::onFire(%this,%obj,%slot)
{
if(!%obj.isMounted())
return;
Parent::onFire(%this,%obj,%slot);
}
};
activatePackage(Weapon_Bomb);
Essentially, it has decided to stop doing splash damage. Direct hits do damage, but not the actual explosion. You can find this weapon on RTB, but it's currently broken. I'm no programmer, I didn't write any of the script; I only conceived the idea, made the model, and collaborated to make the add-on. However, I'm currently in-charge of it, and I'd really like to fix it.