//We need to make an effect to easily attach when damage is dealt
//I have chosen to make it an explosion. Seemed the best
//way at the time
//goes in mine.cs under MineData Bomb17
MineData Bomb18
{
mass = 0.3;
drag = 1.0;
density = 2.0;
elasticity = 0.15;
friction = 1.0;
className = "Handgrenade";
description = "Handgrenade";
shapeFile = "smoke";
shadowDetailMask = 4;
explosionId = bloodexp;
explosionRadius = 10.0;
damageValue = 1.0;
damageType = $NullDamageType;
kickBackStrength = 0;
triggerRadius = 0.5;
maxDamage = 1.0;
};
function Bomb18::onAdd(%this)
{
schedule("Mine::Detonate(" @ %this @ ");", 0.2, %this);
}
//Now, the actual "blood" I am using laserhit.dts because
//I suppose it would look more real than anything else.
//Now, if the possibility of client-side additions existed
//an actual blood splurt could be very possible.
//goes in baseexpdata.cs after ExplosionData LargeShockwave
ExplosionData bloodexp
{
shapeName = "lasterhit.dts";
soundId = NoSound;
faceCamera = false;
randomSpin = false;
hasLight = false; //If you want to play with the light, go at it.
lightRange = 10.0;
timeZero = 0.100;
timeOne = 0.300;
colors[0] = { 1.0, 1.0, 1.0 };
colors[1] = { 1.0, 1.0, 1.0 };
colors[2] = { 0.0, 0.0, 0.0 };
radFactors = { 1.0, 0.5, 0.0 };
};
//Well, now all thats left is adding the action.
//Goes in playerdamage.cs right after Player::setDamageFlash(%this,%flash);
CreateAndDetBomb(%damagedClient, "Bomb18", %damagedClientPos, false);
//If it doesn't work, add %index to the arguement list.
That should do it.