EFFECT
These hooks are used inside of a Lua effect. Lua effects are stored in either the /lua/effects
directory or in a gamemode in /gamemodes/<gamemodename>/entities/effects
.
Effects are entities with the classname class CLuaEffect
, and as such, Entity functions are usable on them (using the self
argument).
An EFFECT
is made using either a combination of the EFFECT:Init, EFFECT:Render and optionally the EFFECT:Think hook. Another way is to create all particles in one go in the Init
hook and don't use the other hooks at all.
Example
Creates a particle effect using a combination of the Init and the Think hooks.
Example
Creates a particle effect using only the Init hook. To use this effect in a loop one needs to create a new instance of this effect every drawn frame.
Inherits methods from Entity.