[solved] Change Blood Color
I want to change the blood color for a particular player or group of players, not all players.
I'm having trouble doing this properly. Right now, I'm doing it in a very "hackish" way and the results are bad. I'm hooking TE_BLOODSTREAM, TE_BLOOD, TE_BLOODSPRITE, reading the coordinates, finding the ent at the coords, and then checking if the ent is the right one. It's not precise and it doesn't work well. I only found two relevant threads on the forum: https://forums.alliedmods.net/showthread.php?t=61812 https://forums.alliedmods.net/showthread.php?t=3464 I didn't have any success playing with pdata, but maybe I'm doing it wrong. Has anyone done this properly? |
Re: Change Blood Color
Quote:
|
Re: Change Blood Color
Try m_bloodColor (89) at player's spawn or Ham_BloodColor.
|
Re: Change Blood Color
set_pdata_int( id, 89, 195 ) on Ham_Spawn post works
However, the decals on the wall are still red :( I'm thinking about what to do about that... |
Re: Change Blood Color
Did you try to hook Ham_BloodColor ? Because It's called in TraceAttack().
|
Re: Change Blood Color
I tested Ham_BloodColor a long time ago, and I didn't have success. Maybe I was doing it wrong :oops:
Anyways, I don't think Ham_BloodColor will suffice for the red blood decals on the wall. So, the solution is to record the red and yellow blood decal indexes and then write the yellow one after Ham_TraceAttack is called on the target player. If you want more details, I can write some real code. |
Re: Change Blood Color
Record, you could harcode them like in HL :
#define BLOOD_COLOR_RED (BYTE)247 #defineBLOOD_COLOR_YELLOW (BYTE)195 |
Re: Change Blood Color
try to set "env_blood" entity's pev_impluse for it's color and pev_dmg for it's amount after it spawned
don't know if it works, never change the blood's color. :) |
Re: Change Blood Color
Doing that, it works and for decal too :
Code:
Edit : Actually decal color ( for other color ) is not changed and I don't think it's possible to change it since there is not color param for TE_WORLDDECAL or TE_DECAL. |
Re: Change Blood Color
@arkshine
Wow, this is confusing me. You said it does not work for decal color. I confirmed this last week when I tested Ham_BloodColor. Today, I'm testing it again, and decal color is successfully changed. :shock: |
| All times are GMT -4. The time now is 15:39. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.