Jump to content

SpawnSmokeEffect

From CMM Wiki
Revision as of 10:12, 11 November 2025 by Ozdeadmeat (talk | contribs) (SpawnSmokeEffect – created via PowerShell script (2025-11-11T21:12:40Z))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Return to CMM Command Reference
Environment: Mission Scripting
Function: SpawnSmokeEffect
Function Description: Spawns a smoke or fire effect at a specified 3D coordinate with optional type, density, and marker visibility. The function validates inputs, uses default values if invalid, and stores the effect in a global table for management.
File Location: cmm.spawnFunctions.lua
Syntax: CMM.SpawnSmokeEffect( table vec3 , number or nil SmokeType , number or nil Density , boolean or nil Marker )
Return Value: boolean
Parameters: Name Description
vec3{x <number>, y <number>, z <number>} – 3D coordinate where the smoke or fire effect should be spawned.
SmokeType1 = small smoke and fire or 2 = medium smoke and fire or 3 = large smoke and fire or 4 = huge smoke and fire or 5 = small smoke or 6 = medium smoke or 7 = large smoke or 8 = huge smoke; defaults to 1 if not provided.
DensityNumber between 0 and 1 representing smoke density; defaults to 1 if not provided or invalid.
MarkerBoolean to show a visual marker for the effect; defaults to false if not provided.
Example: CMM.SpawnSmokeEffect({x=100,y=200,z=300}, 3, 0.7, true)
Example Description: Spawns a large smoke effect at (100,200,300) with 70% density and a visible marker.
Related Functions:
Notes: