Jump to content

Tools.LogUnitData

From CMM Wiki
Return to CMM Command Reference
Environment: Mission Scripting
Function: tools.LogUnitData
Function Description: Logs the position and direction data of a specified unit to the dcs.log file. Accepts either a unit object or a string name of a unit. If the input is valid, it retrieves the unit's position and heading, converts the heading to degrees, and outputs the data in a readable format. If the unit is not found or input is invalid, an error message is logged.
File Location: cmm.tools.lua
Syntax: CMM.tools.LogUnitData( table or string unt )
Return Value: nil
Parameters: Name Description
untEither a unit object or a string name of a unit in the mission editor. If a string, the function attempts to resolve it using Unit.getByName.
Example: CMM.tools.LogUnitData("Fighter_01")
Example Description: Logs the position and direction of the unit named "Fighter_01" to the dcs.log file.
Related Functions:
Notes: