SetUnlimitedFuel
Appearance
| 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 |
| Entity | The unit or group to modify, either as a name (string) or as the actual Unit/Group object. | |
| Bool | true 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: | ||