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

infodecal

From Valve Developer Community
Jump to: navigation, search
Infodecal with Cubemap decaltexture
class hierarchy
CDecal defined in world.cpp
CPointEntity
CBaseEntity

infodecal is a point entity available in all Source Source games. It is used to place a static decal in a map. It is the entity created when the Decal tool is used. It places a texture on any surface, with transparency if the texture being applied supports transparency. In GoldSrc GoldSrc, these textures were indicated by being in decals.wad, while in Source Source, they are indicated by the $decal material parameter and typically placed in the decals/ texture folder. When needed, an overlay can be used for more control over the applied texture. For example, an infodecal cannot be resized, or rotated, while an overlay can; however, overlays cannot be applied dynamically.

Warning.pngRisk of Confusion:Unlike most entities with the prefix info, infodecal does not have an underscore!
Note.pngNote:This is a preserved entity in Counter-Strike: SourceHalf-Life 2: DeathmatchPortalLeft 4 DeadLeft 4 Dead 2Portal 2Counter-Strike: Global Offensive.
  • On a new round, its properties including its position will intentionally not reset. You can use logic_auto to emulate resetting it.
  • Killing it removes it forever, as it is not respawned on a new round.
  • It cannot be spawned with a point_template.
  • Parenting this with non preserved entities may have undesirable effects.
Icon-Bug.pngBug:In games where this entity is not preserved, such as Team Fortress 2 Team Fortress 2, large amounts of this entity present may overflow the decal limit after round restarts and not allow any more decals to be spawned. This can be be workarounded by spawning the decals once-off via VScript or point_templates instead.
Icon-Bug.pngBug:Placing this entity near brush entities may cause the game to crash with a fatal error randomly on map load: Bad inline model number N, worldmodel not yet setup

Keyvalues


Targetname:
Name (targetname) <string>
The targetname that other entities refer to this entity by.
Note.pngNote:Unnamed infodecal applies the decal right after spawning and then removes itself. If named, Activate input needs to be fired to spawn the decal. The entity counts towards edict limit in both cases though in the first case, it's only for a fraction of second.
texture (texture) <decal>
The image to apply as a decal.
Low Priority (can be replaced) (LowPriority) <boolean>
If true, allows the decal to be removed to accommodate newly-placed decals. Default behavior is false (high priority), meaning it is always present.
Apply Entity (ApplyEntity) <targetname> (in all games since Left 4 Dead)
An optional entity to apply the decal to. If this is empty, the decal will locate the entity by tracing.
Note.pngNote:Mainly present in Left 4 Dead series FGDs, but is still implemented in future branches.

Inputs

Activate
Force the decal to apply itself to the world and removes itself.

See also