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
(raw; needs cleanup)
 
 
(43 intermediate revisions by 25 users not shown)
Line 1: Line 1:
{{cleanup}}
{{Source topicon}} {{Lang|title=env_blood}}
env_blood
{{tabs|env_blood|goldsrc=1|source=2|main=source}}
[[File:Env_blood.gif|thumb|250px|<code>env_blood</code> demonstration in 2 different variations. (without and with the "Spray decals" flag)]]
{{CD|CBlood|file1=effects.cpp}}


An entity used to spawn blood effects.
{{this is a|point entity|name=env_blood|engibe=2}} 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.


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


Name targetname <target_source> The name that other entities refer to this entity by.
==Keyvalues==
{{KV Targetname}}
{{KV|Spray Direction (Pitch Yaw Roll)|intn=spraydir|angle|The general direction that the blood should spray and the direction to trace to apply the decal.}}
{{KV|Blood Color|intn=color|integer choices|Color of the spraying blood.
:*0: Red (Human)
:*1: Yellow (Alien)}}
:{{note|[[AddOutput]] can be used to change the blood color from red to yellow, but not vice versa.}}
{{KV|Amount of blood (damage to simulate)|intn=amount|float|Intensity of the blood spray.}}


Parent parentname <target_destination> The name of this entity's parent in the movement hierarchy. Entities with parents move with their parent.
==Inputs==
{{I|EmitBlood|Emits the blood effect.}}


Spray Direction (Pitch Yaw Roll) spraydir <angle> The general direction that the blood should spray and the direction to trace to apply the decal.
==Flags==
 
{{Fl|1|Random Direction}}
Blood Color color <choices>
{{Fl|2|Blood Stream}}
 
{{Fl|4|On Player}}
Amount of blood (damage to simulate) amount <string>
{{Fl|8|Spray [[decals]]}}
 
{{Fl|16|Cloud|Emits a much larger cloud of blood.|nofgd=1}}
spawnflags spawnflags <flags>
{{Fl|32|Drops|Splashes large blood drops.|nofgd=1}}
 
{{Fl|64|Gore|Emits an effect similar to ''Cloud'' but smaller.|nofgd=1}}
 
INPUTS
 
Kill Removes this entity from the world.
 
KillHierarchy Removes this entity and all its children from the world.
 
AddOutput <string> Adds an entity I/O connection to this entity. Format: <output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire (-1 == infinite)>. Very dangerous, use with care.
 
FireUser1 Causes this entity's OnUser1 output to be fired.
 
FireUser2 Causes this entity's OnUser2 output to be fired.
 
FireUser3 Causes this entity's OnUser3 output to be fired.
 
FireUser4 Causes this entity's OnUser4 output to be fired.
 
SetParent <string> Changes the entity's parent in the movement hierarchy.
 
SetParentAttachment <string> Change this entity to attach to a specific attachment point on its parent. Entities must be parented before being sent this input. The parameter passed in should be the name of the attachment.
 
ClearParent Removes this entity from the the movement hierarchy, leaving it free to move independently.
 
EmitBlood Triggers the blood effect.
 
 
OUTPUTS
 
OnUser1 Fired in response to FireUser1 input.
 
OnUser2 Fired in response to FireUser2 input.
 
OnUser3 Fired in response to FireUser3 input.
 
OnUser4 Fired in response to FireUser4 input.

Latest revision as of 10:43, 2 November 2025

English (en)Русский (ru)中文 (zh)Translate (Translate)
env_blood demonstration in 2 different variations. (without and with the "Spray decals" flag)
C++ Class hierarchy
CBlood
CPointEntity
CBaseEntity
C++ effects.cpp

env_blood is a point entity available in all Source Source games. 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.

Icon-Bug.pngBug:Does not appear to work properly in Team Fortress 2. The blood texture is missing.  [todo tested in ?]

Keyvalues

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
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) <integer choices>
Color of the spraying blood.
  • 0: Red (Human)
  • 1: Yellow (Alien)
Note.pngNote:AddOutput can be used to change the blood color from red to yellow, but not vice versa.
Amount of blood (damage to simulate) (amount) <float>
Intensity of the blood spray.

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.