Player Blood

When you shoot someone blood comes out from them. Is there a function to overwrite this or is it the engine?

-snip- there is! Post 4

I had a similar question. But it seems there is no way in Lua to override the blood.

Yes, there is a way:


Ill try that, and what if you want to change it to the spark effect when you shoot metal?

And when should I call it? Because it won’t work on the people who havent joined yet.

I think it’s COLOR_MECH, and I think it will work on people who have joined, since it should be networked.

for k ,v in pairs(Ents.FindByClass(“Player”) ) do

if( v:IsTerminator() ) then
v:SetBloodColor( COLOR_MECH )

I suppose.

But when shall I call it? I suppose doing it on yourself each time you connect wouldn’t be efficient?

[lua]for _, ply in ipairs(player.GetAll()) do
if ply:IsTerminator() then
ply:SetBloodColor( COLOR_MECH )

Oh my I never knew that existed. Horsey you could probably call it when the player spawns.

More like it