Blood Splatters

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:
 

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.
Posted By: Drittz_Dourden

Re: Blood Splatters - 02/23/05 17:03

very nice ill have to give it a try soon


daniel
Posted By: Metal_Thrasher

Re: Blood Splatters - 02/24/05 05:49

Quote:

very nice ill have to give it a try soon


daniel



cool, tell me what you think.
89 views and only one reply? Please tell me what you guys think, good or bad. It only can help both of us.
Posted By: Spartan_117

Re: Blood Splatters - 02/24/05 05:56

i think its good but too much blood splatter when the guy is hit it shoud be alot less for realism but its a good start.
Posted By: Metal_Thrasher

Re: Blood Splatters - 02/24/05 06:00

well, since I'm giving the script away you guys can play with those settings too. but I'll take note of that and fix for my next release.
Posted By: Drittz_Dourden

Re: Blood Splatters - 02/24/05 06:01

well i gave it a try and i gotta say i love it thanks man


Daniel
Posted By: Metal_Thrasher

Re: Blood Splatters - 02/24/05 06:02

thanks man, glad you like it
Posted By: Josh_Arldt

Re: Blood Splatters - 02/24/05 06:08

Nice contribution.

@everyone it's rude to take the code without commenting on it.
Please post some replies.
Posted By: rappo

Re: Blood Splatters - 02/24/05 22:29

I am a newbie. How to use it with templates?
Posted By: Metal_Thrasher

Re: Blood Splatters - 02/25/05 03:28

The A5 or A6 templates? I don't how to implement it into the A6 templatges, but I can tell you how put it into the A5 templates.
Posted By: rappo

Re: Blood Splatters - 02/25/05 03:50

Yep. How to use it with the player walk file template. may you post also the wdl files? Thanks in advance.
Posted By: Metal_Thrasher

Re: Blood Splatters - 02/25/05 04:15

well, it's actauly really easy to implement. First include your blood wdl file before the was.wdl then in your war.wdl file goto my.siginal=_detected
and where the damamge thing is put the last lines I showed in the original post.
Posted By: Atlantis

Re: Blood Splatters - 02/25/05 11:00

Thank you for the contribution. Nice work!
Posted By: Metal_Thrasher

Re: Blood Splatters - 02/25/05 11:16

Thanks
Posted By: Nadester

Re: Blood Splatters - 02/25/05 13:53

The code itself is not too bad, but the graphics are slightly unrealistic... try more rounded blood droplet shapes, in a slightly darker shade of red (or if you want streaks, make them more apparent streaks). They also may blend into your scene better with a little more alpha.
Posted By: Metal_Thrasher

Re: Blood Splatters - 02/25/05 13:55

Thanks for the tips Nadester.
I almost feel bad about what I wrote in Morbius
Posted By: Nadester

Re: Blood Splatters - 02/25/05 14:04

No problem.

You "almost" feel bad
Posted By: Daedelus

Re: Blood Splatters - 02/25/05 19:26

Your script rocks!
Thanks for sharin' it
Posted By: rappo

Re: Blood Splatters - 02/25/05 20:34

Sorry, Im not a programmer. I edit in this way. It is the proper manner? Could I define something?
// if the player has been detected...
// if the player has been detected...
if(MY._SIGNAL == _DETECTED){
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);}

{
MY._SIGNAL = 0;
state_attack(); // ATTACK!
return;
}
}

force = 0; // no force from this actor
actor_move(); // react to outside forces (gravity, etc) even while waiting
waitt(1);
}
}



Quote:

well, it's actauly really easy to implement. First include your blood wdl file before the was.wdl then in your war.wdl file goto my.siginal=_detected
and where the damamge thing is put the last lines I showed in the original post.



Posted By: Metal_Thrasher

Re: Blood Splatters - 02/25/05 21:41

It goes here in the fight event
Code:
 function fight_event()
{
if((EVENT_TYPE == EVENT_SCAN && indicator == _EXPLODE)
|| (EVENT_TYPE == EVENT_SHOOT && indicator == _GUNFIRE))
{
MY._SIGNAL = _DETECTED; // by shooting, player gives away his position
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);

create(bloodspri, TARGET, bloodiest2);


@Zeroframe,
Thanks
Posted By: Metal_Thrasher

Re: Blood Splatters - 02/26/05 14:42

Do you guys have any screen shots to share of the script in action? I just wanted to see what you guys have done with it (not that it matters).
Posted By: 20BN

Re: Blood Splatters - 02/26/05 15:13

Thanks!
Posted By: Metal_Thrasher

Re: Blood Splatters - 02/26/05 16:07

Quote:

Thanks!



No problem
I actualy liked making the effect.
Didn't know so many people would like it though.
Thanks.
Posted By: Davetheave

Re: Blood Splatters - 02/27/05 08:35

thx soooo much but the ent_create is giving off a dangerous instruction error.
Posted By: Metal_Thrasher

Re: Blood Splatters - 02/27/05 10:33

really? I didn't get that error.
Posted By: Davetheave

Re: Blood Splatters - 02/27/05 23:04

http://NeoeliteUSA.com/demo/bloodfx_error.bmp

I'm using the same code you gave us to use. Maybe it would be the tga files i'm using?

Quote:

It goes here in the fight event
Code:
Code:

function fight_event()
{
if((EVENT_TYPE == EVENT_SCAN && indicator == _EXPLODE)
|| (EVENT_TYPE == EVENT_SHOOT && indicator == _GUNFIRE))
{
MY._SIGNAL = _DETECTED; // by shooting, player gives away his position
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);

create(bloodspri, TARGET, bloodiest2);



@Zeroframe,
Thanks



Posted By: Metal_Thrasher

Re: Blood Splatters - 03/07/05 15:24

sorry for not replying earlier I forgot this thread even existed.
I have no idea why you're getting that error. Have you tired to add a wait(1); before create? That might help, not sure though. I've never gotten the message. Well, try that. Oh yeah, for those of you who have less than commercial I used "streak" and "beam" in the code which won't appear for you guys. sorry 'bout that.
Posted By: Josh_Arldt

Re: Blood Splatters - 03/07/05 16:42

Quote:

thx soooo much but the ent_create is giving off a dangerous instruction error.




It would make it much easier to help you if you would post the exact error that you are getting.
Posted By: Metal_Thrasher

Re: Blood Splatters - 03/07/05 16:55

Quote:

Quote:

thx soooo much but the ent_create is giving off a dangerous instruction error.




It would make it much easier to help you if you would post the exact error that you are getting.



lol, HSB, look two posts up
Posted By: Davetheave

Re: Blood Splatters - 03/10/05 04:57

Quote:

Quote:

Quote:

thx soooo much but the ent_create is giving off a dangerous instruction error.




It would make it much easier to help you if you would post the exact error that you are getting.



lol, HSB, look two posts up




lol, thx DX.
Posted By: exile

Re: Blood Splatters - 07/18/05 19:35

i am getting an error message saying.....

Error(97): Mising keywords nonexistant/empty action c_content

How do i fix this???
Posted By: Metal_Thrasher

Re: Blood Splatters - 07/18/05 22:56

what version you got?
Posted By: exile

Re: Blood Splatters - 07/19/05 00:54

I have 5.24 or somthing
Posted By: Efrint

Re: Blood Splatters - 07/19/05 16:29

i think, the c_??? code isnŽt supported by a version under 6.3....
if u want to use this, youŽll have to get the new A6.....

Regards Efrint
Posted By: Metal_Thrasher

Re: Blood Splatters - 07/20/05 21:23

just get rid of the "C_" part then
Posted By: exile

Re: Blood Splatters - 07/21/05 01:03

Sorry DragonX, I didn't read your previous post. I have Standard edition. Is there anything I can do to have this work???
Posted By: Daedelus

Re: Blood Splatters - 07/21/05 01:50

Efrint is right. This script won't work with A5.
It also uses my.streak which isn't supported in your version.
Posted By: Metal_Thrasher

Re: Blood Splatters - 07/21/05 03:46

okay...I'm right too. You can still use the code
get rid of my.streak
and get rid of all the "C_"s
if ya do that the code should work just fine
try it tell me what happens
Posted By: exile

Re: Blood Splatters - 07/21/05 04:09

Thanks DragonX, your solution worked. Thanks very much!!!!!!!!
Posted By: spartan131

Re: Blood Splatters - 07/21/05 04:14

can somsone make a short tutorial because im a big noob and i need more explanation on how to use it. thanks in advance!
Posted By: exile

Re: Blood Splatters - 07/21/05 04:20

I can make a tutorial for you, which varsion are you using.
Posted By: spartan131

Re: Blood Splatters - 07/21/05 04:25

im using the A6 Extra. thanks!
Posted By: Metal_Thrasher

Re: Blood Splatters - 07/21/05 04:33

Quote:

Thanks DragonX, your solution worked. Thanks very much!!!!!!!!



Righteous, I'm glad the code worked.
Posted By: exile

Re: Blood Splatters - 07/21/05 04:36

Well i will still try...

First you should backup war.wdl
Next create a new wdl called blood.wdl
Next, copy the blood script that was posted a few pages back. I have posted a modified script at the bottom of this post.
Next, open your main script and where you see the lines toward the top ot the page called, include <war.wdl>;, add your blood script directly above war.wdl. It should look like this...
include <blood.wdl>;
include <war.wdl>;

Next, open war.wdl and find the line called function fight_event. then select function fight_event all the way down until you have hilighted the word "return".delete that and paste my fight_event..... (your fight_event should look like this when you are done)

function fight_event()
{
if((EVENT_TYPE == EVENT_SCAN && indicator == _EXPLODE)
|| (EVENT_TYPE == EVENT_SHOOT && indicator == _GUNFIRE))
{
MY._SIGNAL = _DETECTED; // by shooting, player gives away his position
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);

create(bloodspri, TARGET, bloodiest2);


if (indicator == _EXPLODE)
{ // reduce damage according to distance

damage *= max(0,(range - RESULT))/range;
}

if(MY._ARMOR <= 0)
{
MY._HEALTH -= damage;
}
else
{
MY._ARMOR -= damage;
}
return;
}

Then you are done! Sorry if it sonds a little cryptic, this is the first tutorial i have ever written. Btw, here is the blood script i am not sure if it will work for A6 but you might as well give it a try....

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.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);



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;
}
Posted By: spartan131

Re: Blood Splatters - 07/21/05 04:43

ok, ill start doing that. but i have a bit of a problem right now i messed up my weapons.wdl folder so i need to fix it somehow... anyways, thanks for the tutorial, ill definiatly do it. also, what do you mean by back-up war.wdl? thanks again.
Posted By: exile

Re: Blood Splatters - 07/21/05 04:50

open the template folder and right click war.wdl. then select copy and them paste it somewhere like your desktop. It will be called "Copy of War.wdl" Just rename it war.wdl and if the code doesn't work, just copy the file and paste it in your template folder. it will ask you if you wan't to overwrite the file, just select yes. As for the weapons.wdl i can send you mine but it is slightly modified so i don't know if it will work. I will e-mail it to you. what is your address????
Posted By: exile

Re: Blood Splatters *DELETED* - 07/21/05 04:58

Post deleted by exile
Posted By: spartan131

Re: Blood Splatters - 07/21/05 05:13

wait im gonna pm you cause this isnt the right place to talk about this.
Posted By: Gho5tFac3K1llah

Re: Blood Splatters - 09/05/05 20:06

Quote:

Now put the next part into the piece of code where the enemy is hit.




What do you mean by this?
Posted By: Metal_Thrasher

Re: Blood Splatters - 09/06/05 15:34

Quote:

Quote:

Now put the next part into the piece of code where the enemy is hit.




What do you mean by this?



Well, in the part of your code that detects that the enemy has been shot or slashed or dead or something. if that's been detected then have that piece of the code there. lol, there's an example in the first post
© 2024 lite-C Forums