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

CBeam: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
(test)
Line 1: Line 1:
{{LanguageBar}}
{{LanguageBar}}
{{ent not in fgd|codeonly=1}}{{this is a|point entity|name=beam}}  
{{ent not in fgd|nolink=1|because=[[env_beam]] is available but this entity might be of intereset for vscript use}}
[[File:Dog hand beams.png|300px|thumb|right|When Dog holds objects, his hand creates four <code>beam</code>s.]]
[[File:Dog hand beams.png|300px|thumb|right|When Dog holds objects|his hand creates four <code>beam</code>s.]]
It is a base entity used by other entities to make beams or other effects, such as bubbles. The entities which use this one offer greater control over the effect.
{{CD|CBeam|file1=1}}
{{this is a|point entity|name=beam}}
It is a base entity used by other entities to make beams or other effects|such as bubbles. The entities which use this one offer greater control over the effect.


==Inputs==
== Fields ==
{{IO|Width|param=float|Sets the beam width.}}
{{DEFINE_FIELD|m_nHaloIndex|FIELD_MODELINDEX}}
{{IO|Noise|param=float|Sets the scale of noise effect.}}
{{DEFINE_FIELD|m_nBeamType|FIELD_INTEGER}}
{{IO|ScrollSpeed|param=float|Sets the scroll speed.}}
{{DEFINE_FIELD|m_nBeamFlags|FIELD_INTEGER}}
{{IO|ColorRedValue|param=float|Change the intensity of the red channel (0-255).}}
{{DEFINE_FIELD|m_nNumBeamEnts|FIELD_INTEGER}}
{{IO|ColorGreenValue|param=float|Change the intensity of the green channel (0-255).}}
{{DEFINE_FIELD|m_nMinDXLevel|FIELD_INTEGER}}
{{IO|ColorBlueValue|param=float|Change the intensity of the blue channel (0-255).}}
{{IO|SetDamageFilter|param=targetname|Sets a [[filter]] for this entity for when it receives damage.}}
{{IO|EnableDamageForces|Allows the entity to be pushed by damage done to it (usually force amount correlates with the damage done).}}
{{IO|DisableDamageForces|Prevents the entity from being pushed by damage done to it.}}
{{I Shadow|prep2=1}}
{{I RenderFields}}
{{I BaseEntity|base=1}}


==Outputs==
{{DEFINE_FIELD|m_fWidth|FIELD_FLOAT}}
{{O BaseEntity}}
{{DEFINE_FIELD|m_fEndWidth|FIELD_FLOAT}}
{{DEFINE_FIELD|m_fFadeLength|FIELD_FLOAT}}
{{DEFINE_FIELD|m_fHaloScale|FIELD_FLOAT}}
{{DEFINE_FIELD|m_fAmplitude|FIELD_FLOAT}}
{{DEFINE_FIELD|m_fStartFrame|FIELD_FLOAT}}
{{DEFINE_FIELD|m_fSpeed|FIELD_FLOAT}}
 
{{DEFINE_FIELD|m_flFrameRate|FIELD_FLOAT}}
{{DEFINE_FIELD|m_flFrame|FIELD_FLOAT}}
 
{{DEFINE_FIELD|m_flFireTime|FIELD_TIME}}
 
{{DEFINE_FIELD|m_vecEndPos|FIELD_POSITION_VECTOR}}
{{DEFINE_FIELD|m_hEndEntity|FIELD_EHANDLE}}
 
 
#ifdef PORTAL
{{DEFINE_FIELD|m_bDrawInMainRender|FIELD_BOOLEAN}}
{{DEFINE_FIELD|m_bDrawInPortalRender|FIELD_BOOLEAN}}
#endif
== Arrays ==
{{DEFINE_ARRAY|m_hAttachEntity|FIELD_EHANDLE|10}}
{{DEFINE_ARRAY|m_nAttachIndex|FIELD_INTEGER|10}}
 
== KeyFields ==
{{DEFINE_KEYFIELD|m_flHDRColorScale|FIELD_FLOAT|"HDRColorScale"}}
{{DEFINE_KEYFIELD|m_flDamage|FIELD_FLOAT|"damage"}}
{{DEFINE_KEYFIELD|m_nDissolveType|FIELD_INTEGER|"dissolvetype"}}
 
== Inputs ==
{{DEFINE_INPUT|m_fSpeed|FIELD_FLOAT|ScrollSpeed}}
 
== Input Functions ==
{{DEFINE_INPUTFUNC|FIELD_FLOAT|"Width"|InputWidth}}
{{DEFINE_INPUTFUNC|FIELD_FLOAT|"Noise"|InputNoise}}
{{DEFINE_INPUTFUNC|FIELD_FLOAT|"ColorRedValue"|InputColorRedValue}}
{{DEFINE_INPUTFUNC|FIELD_FLOAT|"ColorGreenValue"|InputColorGreenValue}}
{{DEFINE_INPUTFUNC|FIELD_FLOAT|"ColorBlueValue"|InputColorBlueValue}}
 
== See Also ==
* {{ent|env_beam}}

Revision as of 04:41, 9 August 2024

English (en)Translate (Translate)
Icon-NotInFGD.png
This entity is not in the FGD by default.
It should not be put directly in a map because env_beam is available but this entity might be of intereset for vscript use.
his hand creates four beams.
C++ Class hierarchy
CBeam
CBaseEntity
C++ beam_shared.cpp

beam is a point entity available in all Source Source games. It is a base entity used by other entities to make beams or other effects|such as bubbles. The entities which use this one offer greater control over the effect.

Fields

m_nHaloIndex <FIELD_MODELINDEX>

m_nBeamType <FIELD_INTEGER>

m_nBeamFlags <FIELD_INTEGER>

m_nNumBeamEnts <FIELD_INTEGER>

m_nMinDXLevel <FIELD_INTEGER>


m_fWidth <FIELD_FLOAT>

m_fEndWidth <FIELD_FLOAT>

m_fFadeLength <FIELD_FLOAT>

m_fHaloScale <FIELD_FLOAT>

m_fAmplitude <FIELD_FLOAT>

m_fStartFrame <FIELD_FLOAT>

m_fSpeed <FIELD_FLOAT>


m_flFrameRate <FIELD_FLOAT>

m_flFrame <FIELD_FLOAT>


m_flFireTime <FIELD_TIME>


m_vecEndPos <FIELD_POSITION_VECTOR>

m_hEndEntity <FIELD_EHANDLE>


  1. ifdef PORTAL

m_bDrawInMainRender <FIELD_BOOLEAN>

m_bDrawInPortalRender <FIELD_BOOLEAN>

  1. endif


Arrays

m_hAttachEntity[10] <FIELD_EHANDLE>

m_nAttachIndex[10] <FIELD_INTEGER>


KeyFields

m_flHDRColorScale <FIELD_FLOAT> ("HDRColorScale")

m_flDamage <FIELD_FLOAT> ("damage")

m_nDissolveType <FIELD_INTEGER> ("dissolvetype")


Inputs

m_fSpeed <FIELD_FLOAT> (ScrollSpeed)


Input Functions

"Width" <FIELD_FLOAT> linked function: InputWidth

description todo

"Noise" <FIELD_FLOAT> linked function: InputNoise

description todo

"ColorRedValue" <FIELD_FLOAT> linked function: InputColorRedValue

description todo

"ColorGreenValue" <FIELD_FLOAT> linked function: InputColorGreenValue

description todo

"ColorBlueValue" <FIELD_FLOAT> linked function: InputColorBlueValue

description todo

See Also