Hello everyone. Here is my first in a series of tutorials I will be writing here within the next couple of days. I figure everyone in the HL community has helped me so much with programming, I need to give something back to the community. In this tutorial I will teach you how to use the UTIL_Bloodstream effect.
CODE
UTIL_BloodStream( tr.vecEndPos, gpGlobals->v_forward * -35 + gpGlobals->v_up * 2, (unsigned short)73, 100 );
There is some sample code for using UTIL_Bloodstream. Dont just cut and paste this though, Im going to explain which each part does.
CODE
UTIL_BloodStream
Thats the function itself for making the blood bursts. You can find more UTIL_ functions in the util.h file
CODE
tr.vecEndPos, gpGlobals->v_forward * -35 + gpGlobals->v_up * 2
That is where the bloodbursts will spawn t and what direction they will go in. tr.vecEndPos is where the bloodstream spawns, and the rest of the code makes the blood go towards the attacker 35 units and up 2 units.
CODE
(unsigned short)73
That is the color of the bloodstream. I''m still having trouble figuring this out, but that is the closest I have gotten to complete red so far. Half-Life indeed has a very screwed up color system.
CODE
100
This is the number of blood particles being sprayed.