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

Firesmoke: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
 
(16 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<!-- When this page is updated to {{langsp}} or {{langsp}} instead of {{lang}}, please move {{this is a}} to the base page, as it is automatically translated. -->{{lang|Firesmoke}}{{ent not in fgd}}
{{languageBar}}
[[File:Env fire.jpg|thumb|right]]
{{ent not in fgd}}
{{this is a|point entity|name=_firesmoke}} This is the group of particle effects created by an {{ent|env_fire}}, including the flames. It does no damage. If a fire shouldn't damage things, or is unable to, this entity could be used directly to save an [[edict]]. <code>env_fire</code> does however allow much more control over the flame.
{{CD|CFireSmoke|file1=fire_smoke.cpp}}
{{this is a|point entity|name=_firesmoke}} This is the group of particle effects created by an {{ent|env_fire}}, including the flames. It does no damage. The entity is not intended to be used directly, so it lacks the keyvalues from <code>env_fire</code> used to configure the flame, as these parameters are normally set through code. It is otherwise functional on its own, though.
 
If a fire shouldn't damage things, or is unable to, this entity could be used directly to save an [[edict]] (as normally this plus the source <code>env_fire</code> would be 2). That being said, an {{ent|info_particle_system}} set to display the corresponding <code>env_fire</code> particles may be a better alternative to this, as it allows choosing the size of the fire and toggling it, although this will not respect the classic effects setting in {{hl2|2}}.
 
{{important|Since {{src07}}, this entity does not precache the fire assets on its own, so it won't be visible unless at least one env_fire exists elsewhere in the map. The fire sprites ''are'' properly precached in {{src04}} and {{src06}}. }}


{{CD|CFireSmoke|file1=fire_smoke.cpp}}
<gallery mode=packed heights=256px>
env_fire_modern.png|The modern particle-based fire effects, used in current versions of most games.
env_fire_classic.png|The classic sprite-based fire effects, used prior to {{src07|2}} and in modern HL2 if the "classic effects" setting is enabled.
</gallery>


== Keyvalues ==
== Keyvalues ==
Line 9: Line 17:


==FGD Code==
==FGD Code==
Paste into base.fgd.
{{code|_firesmoke}} point class. In-editor sprite is based upon "classic" (pre-Orange Box) flame effect.
{{ExpandBox|
<pre>
@BaseClass base(Targetname, Parentname, Angles, Origin, Global) = CBaseEntity
[
        ResponseContext(string) : "Response Contexts" :  : "Pre-defined response system contexts for this entity. Format is key:value,key:value,..."
        effects(choices) : "Effect Flags" : 0 : "For configuring visual effects. If you want to combine effects, simply type in the sum of the effect numbers, e.g., '72' for 64+8." =
        [
        0: "0 - None"
        1: "1 - EF_BONEMERGE: Bonemerge always (very expensive!)"
        2: "2 - EF_BRIGHTLIGHT: Bright, dynamic light at entity origin"
        4: "4 - EF_DIMLIGHT: Dim, dynamic light at entity origin"
        8: "8 - EF_NOINTERP: No movement interpolation"
        16: "16 - EF_NOSHADOW: Don't cast shadows"
        32: "32 - EF_NODRAW: Don't draw entity (entity is fully ignored by clients, NOT server; can cause collision problems)"
        64: "64 - EF_NORECEIVESHADOW: Don't receive dynamic shadows"
        128: "128 - EF_BONEMERGE_FASTCULL: Bonemerge only in PVS, better performance but prone to disappearing. Use with Bonemerge."
        256: "256 - EF_ITEM_BLINK: Unsubtle blink"
        512: "512 - EF_PARENT_ANIMATES: Flag parent as always animating and realign each frame"
        ]
        ltime(float) : "Local Time" :  : "The local time of the entity, independent of the global clock. Used mainly for physics calculations."
        nextthink(float) : "Next Think" :  : "Amount of time before the entity thinks again."
        hammerid(integer) : "Hammer ID" :  : "The entity's Hammer ID. Mainly used by plugins and debugging commands, such as ent_keyvalue. Can be manually assigned. Entities spawned at run-time are not assigned any Hammer ID."
        mincpulevel(integer) : "Minimum CPU Level (Since L4D)" :  : "Minimum CPU Level allowed for this entity. 0 means all levels allowed."
        maxcpulevel(integer) : "Maximum CPU Level (Since L4D)" :  : "Maximum CPU Level allowed for this entity. 0 means all levels allowed."
        mingpulevel(integer) : "Minimum GPU Level (Since L4D)" :  : "Minimum GPU Level allowed for this entity. 0 means all levels allowed."
        maxgpulevel(integer) : "Maximum GPU Level (Since L4D)" :  : "Maximum GPU Level allowed for this entity. 0 means all levels allowed."
        LagCompensate(choices) : "Lag Compensation (Since L4D2)" : 0 : "Set to Yes to lag compensate this entity. Should be used very sparingly!" =
        [
                0: "No"
                1: "Yes"
        ]
        is_autoaim_target(choices) : "Is Automatic-Aim Target (Since CSGO)" : 0 : "If yes, automatic-aim assistance will target this entity." =
        [
                0: "No"
                1: "Yes"
        ]
        ///////////////////////inputs
        input Use(void) : "Same as a player invoking +use; may not do anything. Can also be invoked by creating an output that does not specify an input."
        input DispatchEffect(string) : "Dispatches a special effect from the entity's origin. Replaced by particles since Left 4 Dead."
        input DispatchResponse(string) : "Dispatches a response to the entity."
        input AddContext(string) : "Adds to the entity's list of response contexts. Format is <key>:<value>."
        input RemoveContext(string) : "Remove a context from this entity's list. The name should match the key of an existing context."
        input ClearContext(string) : "Removes all contexts from this entity's list."
        input CallScriptFunction(string) : "Since L4D2. Execute a VScript function in the scope of the receiving entity."
        input SetLocalOrigin(string) : "Since p2. Set this entity's origin in the map. (dubious)"
        input SetLocalAngles(string) : "Since p2. Set this entity's angles in the map. (dubious)"
]
</pre>}}
 
_firesmoke point class. This MUST be ''below'' the first code block:
{{ExpandBox|
{{ExpandBox|
<pre>
<pre>
@PointClass base(CBaseEntity) = _firesmoke : "A purely visual flame effect."
@PointClass base(Targetname, Parentname) size(-4 -4 -4, 4 4 4) sprite("sprites/fire1.vmt") = _firesmoke : "A purely visual flame effect." []
[
]
</pre>
</pre>
}}
}}

Latest revision as of 10:44, 23 January 2025

English (en)Translate (Translate)
Icon-NotInFGD.png
This entity is not in the FGD by default.
See below for instructions on making it available.
C++ Class hierarchy
CFireSmoke
CBaseFire
CBaseEntity
C++ fire_smoke.cpp

_firesmoke is a point entity available in all Source Source games. This is the group of particle effects created by an env_fire, including the flames. It does no damage. The entity is not intended to be used directly, so it lacks the keyvalues from env_fire used to configure the flame, as these parameters are normally set through code. It is otherwise functional on its own, though.

If a fire shouldn't damage things, or is unable to, this entity could be used directly to save an edict (as normally this plus the source env_fire would be 2). That being said, an info_particle_system set to display the corresponding env_fire particles may be a better alternative to this, as it allows choosing the size of the fire and toggling it, although this will not respect the classic effects setting in Half-Life 2 Half-Life 2.

Icon-Important.pngImportant:Since Source 2007, this entity does not precache the fire assets on its own, so it won't be visible unless at least one env_fire exists elsewhere in the map. The fire sprites are properly precached in Source 2004 and Source 2006.

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

FGD Code

_firesmoke point class. In-editor sprite is based upon "classic" (pre-Orange Box) flame effect.


@PointClass base(Targetname, Parentname) size(-4 -4 -4, 4 4 4) sprite("sprites/fire1.vmt") = _firesmoke : "A purely visual flame effect." []