AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Off-Topic (https://forums.alliedmods.net/forumdisplay.php?f=15)
-   -   HL 1 blood effects from dead bodies? (https://forums.alliedmods.net/showthread.php?t=343437)

GlobalPlague 07-23-2023 17:11

HL 1 blood effects from dead bodies?
 
In Half-Life 1, when you shoot dead bodies, they release blood and the blood is being dispersed around the body. In Counter-Strike 1.6, when you shoot dead bodies, the bullets simply pass through the bodies and no blood effects appear.

Is there a way to make dead bodies in Counter-Strike to release blood effects, like the dead bodies in Half-Life 1, when you shoot them?

I have a Zombie mod for CS 1.6, and i want the dead bodies in this mod to release blood effects when someone attacks them. :)

hellmoss 08-14-2023 03:58

Re: HL 1 blood effects from dead bodies?
 
With this you can get the vector[3] position of where the hit comes from (i.e. end of gun barrel, I assume it should work for knife too and it would look good enough to create the illusion the blood comes from the corpse).

https://www.amxmodx.org/api/amxmodx/get_user_origin

You may take a look at the sprites TE_BLOOD, TE_BLOODSTREAM and TE_BLOODSPRITE (the one you see in HL1 is TE_BLOOD).

https://www.amxmodx.org/api/message_const/__raw

In order to check whether you are around a corpse, you may want to use
https://www.amxmodx.org/api/amxmodx/get_user_aiming and check whether the entity you are looking at has the model of one of your zombie player models.

Or maybe a combination of https://www.amxmodx.org/api/engine/find_ent_in_sphere and https://www.amxmodx.org/api/engine/is_in_viewcone if aiming doesn't work.


Either the above or mp_corpsestay 0 and you create your own entities where players die and set some parameters.


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

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