Jump to content

SetUnlimitedFuel

From CMM Wiki
Revision as of 10:12, 11 November 2025 by Ozdeadmeat (talk | contribs) (SetUnlimitedFuel – created via PowerShell script (2025-11-11T21:12:00Z))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Return to CMM Command Reference
Environment: Mission Scripting
Function: SetUnlimitedFuel
Function Description: Enables or disables unlimited fuel for a unit or group. The function accepts either an entity object (Unit/Group) or the name of the entity as a string. It constructs a SetUnlimitedFuel command with the supplied boolean value (defaulting to true if omitted) and sends it to the entity’s controller. If no controller is found, an error is logged.
File Location: cmm.DCSFunctions.lua
Syntax: CMM.SetUnlimitedFuel( string or table Entity , boolean Bool )
Return Value:
Parameters: Name Description
EntityThe unit or group to modify, either as a name (string) or as the actual Unit/Group object.
Booltrue to grant unlimited fuel, false to revert. If omitted or not a boolean, defaults to true.
Example: CMM.SetUnlimitedFuel("USS Abraham Lincoln", true)
Example Description: Demonstrates granting unlimited fuel to the carrier "USS Abraham Lincoln" by name; the function will look up the group and apply the command.
Related Functions:
Notes: