AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Blood color ! (https://forums.alliedmods.net/showthread.php?t=3134)

sanaell 06-27-2004 06:13

Blood color !
 
Code:
blood(normal) {     //LAVASPLASH     new vec1[3]     get_user_origin(normal,vec1)     message_begin( MSG_BROADCAST,SVC_TEMPENTITY)     write_byte( 10 )     write_coord(vec1[0])     write_coord(vec1[1])     write_coord(vec1[2])     message_end() } public bloodcreature(id,color) {  // Blood spray     new maxBlood =2     new vec1[3]     new couleur     if (color == 1)         couleur = 1080     if (color == 2)         couleur = 1080     if (color == 3)         couleur = 1080     if (color == 4)         couleur = 1080     get_user_origin(id,vec1)     for (new i = 0; i < maxBlood; i++) {         message_begin(MSG_BROADCAST,SVC_TEMPENTITY)         write_byte(TE_BLOODSTREAM)         write_coord(vec1[0])         write_coord(vec1[1])         write_coord(vec1[2]+10)         write_coord(random_num(-200,200)) // x         write_coord(random_num(-200,200)) // y         write_coord(random_num(-20,20)) // z         write_byte(couleur) // color         write_byte(50) // speed         message_end()     } }


My problem is :

The blood stay RED ... BORING RED .... ANNOYING RED
color4 must be red
colod3 must be blue
color2 must be pink
color1 must be green

HOW I CAN HAVE THAT F......G BlOOD COLOR !!!

another problem i want keep a real blood spay ( and that code eXPlode )


whyyyyy
whereeeeee is my problem plz thx

Johnny got his gun 06-27-2004 21:25

I think you should replace the color byte with one of these.. might work, then again might not. You might wanna check out the HL SDK for docs. (const.h)
http://www.tcwonline.org/~johnnygoth...xx/palette.png

FroXeN 06-27-2004 23:35

wow thats cool i will use that chart :)

sanaell 06-28-2004 06:19

Quote:

Originally Posted by Johnny got his gun
I think you should replace the color byte with one of these.. might work, then again might not. You might wanna check out the HL SDK for docs. (const.h)
http://www.tcwonline.org/~johnnygoth...xx/palette.png


I HAVE CHECH THE SDK ... but never see that !!!! LOLLLLL i must take some google

sanaell 06-28-2004 07:25

i ve made thist ...

but is not very very ... realy good

the blood stream have color but the splatch before .... keep the red color ?????? how change that...

i want when i shoot on the creature have the completely colored blood

it s possible ? or have a more spheric blood stream (because now it s a little pee...)

Code:
public bloodcreature(id,color) {  // Blood spray     new maxBlood = 10     new vec1[3]     static const couleur[5] = {0,248,208,144,111}     get_user_origin(id,vec1)     for (new i = 0; i < maxBlood; i++) {         message_begin(MSG_BROADCAST,SVC_TEMPENTITY)         write_byte(TE_BLOODSTREAM)         write_coord(vec1[0])         write_coord(vec1[1])         write_coord(vec1[2]+10)         write_coord(random_num(-200,200)) // x         write_coord(random_num(-200,200)) // y         write_coord(random_num(-200,200)) // z         write_byte(couleur[color]) // color         write_byte(10) // speed         message_end()     } }

FlyingMongoose 06-28-2004 11:45

do you mean the bloodsplash that sometimes appears on walls or floors? or even cielings? If so, that's a texture, you could try replacing the texture for each person...but I dunno how well something like that would work

sanaell 06-28-2004 13:15

2 Attachment(s)
Quote:

Originally Posted by FlyingMongoose
do you mean the bloodsplash that sometimes appears on walls or floors? or even cielings? If so, that's a texture, you could try replacing the texture for each person...but I dunno how well something like that would work

i want a blood color replacement

- now i have that ( i ll put a screenshoot )

i want More blood, and no RED splach


(you now why i have White sprite in the RED blood ?

Ryan 06-29-2004 02:05

You can catch *ANY* temporary entity event simply by using event "23".

For example, this

Code:
    register_event( "23", "Ev_TargetBombed", "a", "1=17", "6=-105", "7=17" );

would catch a bomb explosion because all bits of data corrospond to the message write_ commands (ie- write_byte) of a bomb explosion.

Code:
// BOMB EXPLOSION // read_data(1) = 17    (TE_SPRITE) // read_data(6) = -105  (scale in 0.1's) // read_data(7) = 17    (brightness)

why event 23? simple.

Quote:

Originally Posted by amxconst.inc
#define SVC_TEMPENTITY 23
#define SVC_INTERMISSION 30
#define SVC_CDTRACK 32
#define SVC_WEAPONANIM 35
#define SVC_ROOMTYPE 37
#define SVC_ADDANGLE 38 /* [vec3] add this angle to the view angle */
#define SVC_NEWUSERMSG 39
#define SVC_HLTV 50

same reason you can catch the intermission(s) at the end of the round (event 30).


Anyway, back to my point, you can catch the blood events and may possibly be able to halt them to display blood in a different color.

sanaell 07-08-2004 05:10

Quote:

Originally Posted by Ryan
You can catch *ANY* temporary entity event simply by using event "23".

For example, this

Code:
    register_event( "23", "Ev_TargetBombed", "a", "1=17", "6=-105", "7=17" );

would catch a bomb explosion because all bits of data corrospond to the message write_ commands (ie- write_byte) of a bomb explosion.

Code:
// BOMB EXPLOSION // read_data(1) = 17    (TE_SPRITE) // read_data(6) = -105  (scale in 0.1's) // read_data(7) = 17    (brightness)

why event 23? simple.

Quote:

Originally Posted by amxconst.inc
#define SVC_TEMPENTITY 23
#define SVC_INTERMISSION 30
#define SVC_CDTRACK 32
#define SVC_WEAPONANIM 35
#define SVC_ROOMTYPE 37
#define SVC_ADDANGLE 38 /* [vec3] add this angle to the view angle */
#define SVC_NEWUSERMSG 39
#define SVC_HLTV 50

same reason you can catch the intermission(s) at the end of the round (event 30).


Anyway, back to my point, you can catch the blood events and may possibly be able to halt them to display blood in a different color.


need more ....

Code:

        DECAL_BLOOD1,
        DECAL_BLOOD2,
        DECAL_BLOOD3,
        DECAL_BLOOD4,
        DECAL_BLOOD5,
        DECAL_BLOOD6,
        DECAL_YBLOOD1,
        DECAL_YBLOOD2,
        DECAL_YBLOOD3,
        DECAL_YBLOOD4,
        DECAL_YBLOOD5,
        DECAL_YBLOOD6,

that found in the decals.h

does it made the blood on wall ?

and how to use it

because i have now all part of mine code for blood, but the only thing is bad is the blood decal on wall (red...red...red)


All times are GMT -4. The time now is 14:38.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.