Particle's Custom RPG
PCRPG Development => Development => Topic started by: Lidge Farkley on November 21, 2003 09:42 pm CST
-
I know it is possible to do this... as it's in regular tribes;
Use the Base Tribes laser-impact red-mark as a blood-spray effect for arrow impacts that hit. I think you may also be able to do this with weapons... I think Hersh was experimenting with it, but I can not remember.
So, the suggested addition to PCRPG is to have all weapons cause a blood-spray effect when they hit a target, just as the laser-rifle from Base tribes does.
Good, bad, suggestions, finished already?
-
//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.
-
I used it for a Leech blade, to train Necro Skill, it worked fine.
I used
%client = GameBase::getOwnerClient(%player);
%trans = GameBase::getMuzzleTransform(%player);
%vel = Item::getVelocity(%player);
Projectile::spawnProjectile("SejeroBlood",%trans,%player,%vel);
In the onfire, along with the leech code, and UseSkill. (No damage, because if you kill something by leeching, I don't really thing you need any exp.)
Then I made a bulletData with the laserhit.dts called SejeroBlood. And change aimDeflection to deflection to somethinng slightly above 0, so the blood splatter doesn't go in the same direction every time.
Hersh