This article's documentation is for anything that uses the Source engine. Click here for more information.

Env blood: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 4: Line 4:
{{Entity|env_blood|type=e0}} It is used to spawn blood effects. By default, the <code>env_blood</code> creates an animated splash of blood at its [[origin]] when triggered; however, the <code>env_blood</code> can be set up to spray blood decals onto nearby objects. This entity will only function through [[input]]s.
{{Entity|env_blood|type=e0}} It is used to spawn blood effects. By default, the <code>env_blood</code> creates an animated splash of blood at its [[origin]] when triggered; however, the <code>env_blood</code> can be set up to spray blood decals onto nearby objects. This entity will only function through [[input]]s.


Does not appear to work properly in {{Team Fortress 2}}. The blood texture is missing.
{{ModernBug|Does not appear to work properly in {{Team Fortress 2}}. The blood texture is missing.}}


{{code class|CBlood|effects.cpp}}
{{code class|CBlood|effects.cpp}}

Revision as of 15:20, 27 February 2023

English (en)Русский (ru)中文 (zh)Translate (Translate)
env_blood demonstration in 2 different variations. (without and with the "Spray decals" flag)

Template:Entity It is used to spawn blood effects. By default, the env_blood creates an animated splash of blood at its origin when triggered; however, the env_blood can be set up to spray blood decals onto nearby objects. This entity will only function through inputs.

Template:ModernBug

C++ In code, it is represented by theCBloodclass, defined in theeffects.cppfile.

Keyvalues

Spray Direction (Pitch Yaw Roll) (spraydir) <angle>
The general direction that the blood should spray and the direction to trace to apply the decal.
Blood Color (color) <choices>
Color of the spraying blood.
  • 0: Red (Human)
  • 1: Yellow (Alien)
Amount of blood (damage to simulate) (amount) <float>
Intensity of the blood spray.
Name (targetname) <string>[ Edit ]
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also:  Generic Keyvalues, Inputs and Outputs available to all entities

Inputs

EmitBlood
Emits the blood effect.

Flags

Random Direction : [1]
Blood Stream : [2]
On Player : [4]
Spray decals : [8]
Cloud : [16] !FGD
Emits a much larger cloud of blood.
Drops : [32] !FGD
Splashes large blood drops.
Gore : [64] !FGD
Emits an effect similar to Cloud but smaller.