Author Topic: Adding blood spray.  (Read 2114 times)

0 Members and 1 Guest are viewing this topic.

Lidge Farkley

  • Uber Menace
  • *******
  • Posts: 1,357
  • Reputation: +2/-3
    • http://www.angelfire.com/ca2/psychosworld2/
Adding blood spray.
« 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?
« Last Edit: December 31, 1969 06:00 pm CST by Lidge Farkley »
Lend your heart unto the divine mineral TOPAZ;
from which our reverent hearts and minds sprang.
Also Known As:  Alcoholic 007
My Page of tribes Tools and Helpful "FAQ" Stuff

UnderGod

  • Centurian Lord
  • ********
  • Posts: 2,691
  • Reputation: +0/-0
(No subject)
« Reply #1 on: November 21, 2003 10:27 pm CST »
Code: [Select]

//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.
« Last Edit: December 31, 1969 06:00 pm CST by UnderGod »
"The right man in the wrong place can make all the difference in the world"

Hersh

  • Elvin Legion
  • *****
  • Posts: 413
  • Reputation: +0/-0
(No subject)
« Reply #2 on: November 22, 2003 03:28 am CST »
I used it for a Leech blade, to train Necro Skill, it worked fine.

I used
Code: [Select]
        %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
« Last Edit: December 31, 1969 06:00 pm CST by Hersh »

I kissed a drunk girl on the lips.
This post, by its very length, defends itself against the risk of being read.