+  Particle's Custom RPG
|-+  PCRPG Development» Development» Adding blood spray.
Username:
Password:
Pages: [1]
  Print  
Author Topic: Adding blood spray.  (Read 432 times)
0 Members and 1 Guest are viewing this topic.
Lidge Farkley
Uber Menace
*******

Reputation: +2/-3
Posts: 1,357


View Profile WWW
« on: November 21, 2003 03:42 PM PST »

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 04:00 PM PST by Lidge Farkley » Logged

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
********

Reputation: +0/-0
Posts: 2,691



View Profile
« Reply #1 on: November 21, 2003 04:27 PM PST »

Code:

//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 04:00 PM PST by UnderGod » Logged

"The right man in the wrong place can make all the difference in the world"
Hersh
Elvin Legion
*****

Reputation: +0/-0
Posts: 413



View Profile
« Reply #2 on: November 21, 2003 09:28 PM PST »

I used it for a Leech blade, to train Necro Skill, it worked fine.

I used
Code:
        %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 04:00 PM PST by Hersh » Logged


I kissed a drunk girl on the lips.
This post, by its very length, defends itself against the risk of being read.
Pages: [1]
  Print  
 
Jump to:  

Page created in 0.083 seconds with 18 queries.