OK. So what you want are some particles "sparkling" out of the body.
The first thing you need is a sprite that you want to use fore the particle. This should be a red dot image (best .tga) with an alpha-channel for transparency. An example for the define:
BMAP* blood_particle_bmap = "red_dot.tga";
You need to create this image using a program like photoshop or any other tool supporting alpha channels.
The next thing is an event function for your particle, that defines how the particle (each blood drop) should behave. This might be something like:
function blooddrop_partikel_function(PARTICLE *p)
{
p.alpha -= 2*time_step;
if (p.alpha <= 0) p.lifespan = 0;
}
This tells the drop to become more and more transparent each frame and to disappear when it is completely invisible. You may play with the factor "2" to change the speed of becoming more and more transparent.
Finally you need a function for the effect it's self.
function blooddrop_effect(PARTICLE *p)
{
p.size = 4;
p.alpha = 100;
p.gravity = 2;
p.bmap = lblood_particle_bmap;
p.vel_x = random(10)-5;
p.vel_y = random(10)-5;
p.vel_z = random(5)+5;
p.flags |= MOVE;
p.event = blooddrop_partikel_function;
}
p.size is the size of each blood drop.
p.alpha is it's transparency right after it's creation. 100 == not transparent at all, 0 == not visible (completely transparent)
p.gravity is the influance of gravity that pulls the particle to the ground.
p.bmap is the image defined before.
p.vel_x ist it's speed on the x-axis.
p.vel_y ist it's speed on the y-axis.
p.vel_z ist it's speed on the z-axis.
p.flags |= MOVE; tells the particle to move according to the p._vel speeds.
p.event is the event function defined above.
This effect function has to be called when the blood is meant to splash out of the body. Probably when the character is hit by a weapon or shot.
effect_local(blooddrop_effect, 10, startvector, nullvector);
effect_local tells the engine to create a local effect. If you need the effect for a multiplayer game and it shoud be visible on all client, use effect(...) instead.
blooddrop_effect is the effect_function defined before.
10 is the number of particles (blood drops) that you want to create.
startvector has to be the position-vector, where the particles are meant to sparcle out of the body. Probably set by a trace or something like that.
Nullvector is the starting movement direction. You can just use the nullvector because you define the move directions and speed by the p.vel parameters.
Hope, this does help you out. So let me know, if it works!
derGarv