Jump to content

MarkerSpawnUnit

From CMM Wiki
Revision as of 10:12, 11 November 2025 by Ozdeadmeat (talk | contribs) (MarkerSpawnUnit – created via PowerShell script (2025-11-11T21:12:25Z))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Return to CMM Command Reference
Environment: Mission Scripting
Function: MarkerSpawnUnit
Function Description: Spawns a unit or cargo based on a marker event, using the provided spawnable table and unit types. It checks if the item exists in the spawnable list, determines if it's a cargo or ground group, and spawns accordingly with optional AI settings and notifications.
File Location: cmm.MapCommandFunctions.lua
Syntax: CMM.MarkerSpawnUnit( table EventData )
Return Value: nil
Parameters: Name Description
EventDataCustom Event Table passed by S_EVENT_MARK_REMOVED EventHandler, contains position and other metadata.
Example: CMM.MarkerSpawnUnit({pos = vec3(100, 200, 300)}, 123, 1, 1)
Example Description: Triggers the spawning of a unit with ID 123 on the RED side at position (100, 200, 300) initiated by player 1.
Related Functions:
Notes: Map Command !spawn