Env quadraticbeam: Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
		
	
mNo edit summary  | 
				No edit summary  | 
				||
| Line 41: | Line 41: | ||
== See Also ==    | == See Also ==    | ||
* {{l4d2}} [[Left_4_Dead_2/Script_Functions#CNetPropManager]]  | |||
* {{tf2}} [[Team_Fortress_2/Scripting/Script_Functions#CNetPropManager]]  | |||
* {{ent|beam}}  | * {{ent|beam}}  | ||
* {{ent|env_beam}}  | * {{ent|env_beam}}  | ||
Revision as of 07:06, 17 August 2024
| CEnvQuadraticBeam | 
| client side | 
|---|
| C_QuadraticBeam | 
env_quadraticbeam  is an   entity  available in all 
 Source games.
Fields
m_targetPosition <FIELD_POSITION_VECTOR>
- END point
 
m_controlPosition <FIELD_POSITION_VECTOR>
- CONTROL point (see picture)
 
m_scrollRate <FIELD_FLOAT>
m_flWidth <FIELD_FLOAT>
Relevant KIO
KeyValues
- Origin (origin) <vector>
 - Start point of the beam
 
Inputs
- Color <color255>
 - Changes color
 
Spawning via vscript example
function SpawnQuadBeam(start, end, control, color="255 0 0", model="sprites/laserbeam.spr") {
    PrecacheModel(model);
    local ent = SpawnEntityFromTable("env_quadraticbeam", {
        origin = start
    })
    NetProps.SetPropVector(ent, "m_targetPosition", end)
    NetProps.SetPropVector(ent, "m_controlPosition", control)
    NetProps.SetPropFloat(ent, "m_scrollRate", 2)
    NetProps.SetPropFloat(ent, "m_flWidth", 5)
    DoEntFire("!self", "color", color, 0, null, ent)
    ent.SetModel(model);
}