TE DLIGHT: Difference between revisions
Jump to navigation
Jump to search
Outerbeast (talk | contribs) Created page with "frame|TE_DLIGHT A spherical dynamic light that fades over time and only affects point entities. This appears to be the same effect used with the EF_MUZZ..." |
Outerbeast (talk | contribs) mNo edit summary |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
[[File:TE DLIGHT.gif|frame|TE_DLIGHT]] | [[File:TE DLIGHT.gif|frame|TE_DLIGHT]] | ||
A spherical dynamic light that fades over time | A spherical dynamic light that fades over time. | ||
<pre> | <pre> | ||
void te_dlight(Vector pos, uint8 radius=32, | void te_dlight(Vector pos, uint8 radius=32, Color c=PURPLE, | ||
uint8 life=255, uint8 decayRate=50, | uint8 life=255, uint8 decayRate=50, | ||
NetworkMessageDest msgType=MSG_BROADCAST, edict_t@ dest=null) | NetworkMessageDest msgType=MSG_BROADCAST, edict_t@ dest=null) | ||
| Line 19: | Line 19: | ||
m.End(); | m.End(); | ||
} | } | ||
<pre> | </pre> | ||
* <code>Vector pos</code> Center point for the effect | * <code>Vector pos</code> Center point for the effect | ||
| Line 26: | Line 26: | ||
* <code>uint8 life</code> Time to display the light (seconds * 0.1) | * <code>uint8 life</code> Time to display the light (seconds * 0.1) | ||
* <code>uint8 decayRate</code> Light fade speed | * <code>uint8 decayRate</code> Light fade speed | ||
[[Category:Scripting]] | |||
Latest revision as of 19:05, 7 July 2025

A spherical dynamic light that fades over time.
void te_dlight(Vector pos, uint8 radius=32, Color c=PURPLE,
uint8 life=255, uint8 decayRate=50,
NetworkMessageDest msgType=MSG_BROADCAST, edict_t@ dest=null)
{
NetworkMessage m(msgType, NetworkMessages::SVC_TEMPENTITY, dest);
m.WriteByte(TE_DLIGHT);
m.WriteCoord(pos.x);
m.WriteCoord(pos.y);
m.WriteCoord(pos.z);
m.WriteByte(radius);
m.WriteByte(c.r);
m.WriteByte(c.g);
m.WriteByte(c.b);
m.WriteByte(life);
m.WriteByte(decayRate);
m.End();
}
Vector posCenter point for the effectfloat radiusRadius of the light sphereRGBA cLight coloruint8 lifeTime to display the light (seconds * 0.1)uint8 decayRateLight fade speed