Posted By: Metal_Thrasher
Blood Splatters - 02/23/05 15:24
Okay, I wasn't gonig to release this at all; but I thought it would be nice and would help alota noobs and possibley some experts.
Anyway, I'll first show you my screen shots and then I'll give you the code.
The guy gets ownxored right in the face blood splatters onto the wall.
This guy's shot and bleeds on to the floor.
This guy's killed there's blood all over the wall.
this guy's getting all shot up.
A true scene of carnage
here comes the code.
(press quote to snatch it)
Code:
Now put the next part into the piece of code where the enemy is hit.
Code:
Tell me what you think.
Suggestion and C&C accepted.
Anyway, I'll first show you my screen shots and then I'll give you the code.
The guy gets ownxored right in the face blood splatters onto the wall.
This guy's shot and bleeds on to the floor.
This guy's killed there's blood all over the wall.
this guy's getting all shot up.
A true scene of carnage
here comes the code.
(press quote to snatch it)
Code:
bmap blood = <blood1.tga>;
Function bloodburst_spec_fun()
{
my.alpha -=random(0 *time);
if(my.alpha < 0)
{
my.lifespan = 0;
}
}
Function bloodburstspezial()
{
my.bmap = blood;
my.vel_x = random( 11.270 ) - (11.270 /2);
my.vel_y = random( 11.270 ) - (11.270 /2);
my.vel_z = random( 11.270 );
my.size = random(3.150 );
my.move =1 ;
my.flare=on;
my.alpha = 50 ;
my.transparent = 1 ;
my.gravity =4.331 ;
my.streak =1 ;
my.bright =0 ;
my.function = bloodburst_spec_fun;
my.flare =1 ;
}
Function bloodburst()
{
while(1)
{
effect(bloodburstspezial,13 *time,my.x,nullvector);
wait(1 );
}
}
action bloodburst_action
{
my.invisible = on;
My.passable = on;
bloodburst();
}
string bloodspri = <blood2.tga>; // strings can be defined in "" or <>
entity* blood1;
entity* blood2;
function bloody
{
me=blood1;
}
function bloodiest
{
my.oriented=on;
my.overlay=on;
my.facing=off;
my.passable=on;
my.scale_x = random(0.33);
my.scale_y = random(0.33);
result = c_content(my.x);
vec_set(temp, my.x);
temp.z -= 3000;
trace_mode = ignore_me+ignore_sprites+ignore_you+ignore_models;
result = trace(my.x, temp);
vec_set(my.x, target); // set MY at target position
vec_to_angle(my.pan,normal);
my.roll=random(360);
}
function bloodiest2
{
vec_to_angle(my.pan,normal);
my.oriented=on;
my.overlay=on;
my.scale_x = random(0.33);
my.scale_y = random(0.33);
my.facing=off;
my.roll=random(360);
my.passable=on;
}
Now put the next part into the piece of code where the enemy is hit.
Code:
effect(bloodburstspezial,13,TARGET,nullvector);
ent_create (bloodspri, TARGET, bloodiest);
TRACE_MODE = IGNORE_ME + IGNORE_YOU + IGNORE_PASSABLE + IGNORE_MODELS + IGNORE_SPRITES + IGNORE_MAPS + ACTIVATE_SHOOT;
TRACE (gun_muzzle,gun_target);//this will have to be change to work for you
create(bloodspri, TARGET, bloodiest2);
Tell me what you think.
Suggestion and C&C accepted.