Skip to main content
Spawn stock or custom particle effects anywhere in the world.

Custom effects

Build the effect in the CS2 Workshop Tools. Copy the compiled files from your addon’s game folder into Documents\Starline\scripts\assets, keeping the folder layout:
To tint an effect from Lua, make it read its color from a control point, for example C_OP_RemapCPtoVector into the color field, or a renderer color scale bound to a control point. Then set that control point with SetControlPoint.

particles.Load

Load-time only. Returns the name to spawn the effect with, or nil and an error message. Every file the effect references is checked before anything loads. References found in scripts\assets load with it. Everything else must exist in the game. A missing reference fails the load. Reloading the script picks up edits to the effect file itself. Edits to children, materials, and textures need a game restart. Files in scripts\assets take priority over game files with the same name. Files are capped at 64 MB each and 256 MB in total.

particles.Spawn

Spawns at a world position, written to control point 0. effect is a name returned by particles.Load or any stock .vpcf path. lifetime is in seconds. Without it the particle lives until you destroy it.

particles.Attach

Spawns on an entity and moves with it. attachment is a model attachment name. Without it the particle follows the entity itself.

Particle

Control points carry whatever the effect reads from them: positions, colors, counts. A control point the effect never reads is ignored. Children share their parent’s control points.

Lifetime

Particles are cleared at round start, on map change, when their lifetime runs out, and when the script unloads. Outside a match nothing spawns and the handle turns invalid. For anything that should stay up, like weather, check IsValid() and spawn again:
At most 1024 particles exist at once across all scripts.