Jump to content

DrawScanItem

From CMM Wiki
Revision as of 10:12, 11 November 2025 by Ozdeadmeat (talk | contribs) (DrawScanItem – created via PowerShell script (2025-11-11T21:12:23Z))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Return to CMM Command Reference
Environment: Mission Scripting
Function: DrawScanItem
Function Description: Draws a visual marker for detected enemy units within the scan zone, using different shapes based on air defence status, and schedules partial transparency and removal after a defined time.
File Location: cmm.MapCommandFunctions.lua
Syntax: CMM.DrawScanItem( table argTable )
Return Value: nil
Parameters: Name Description
argTable{UnitData <TBL>, TTL <number>} – UnitData contains UnitPos, Attributes, and UnitName; TTL is the duration before marker removal.
Example: CMM.DrawScanItem({UnitData = {UnitPos = {x=100,y=200,z=50}, Attributes = {AirDefence = true}, UnitName = "Fighter 1"}, TTL = 10})
Example Description: Draws a light red triangle marker for a unit with air defence at position {x=100,y=200,z=50}, scheduled to fade and disappear after 10 seconds.
Related Functions:
Notes: