Nix Mills Posted February 25, 2024 Posted February 25, 2024 Hi all, does anyone have any examples that they can share where, in a lua script, you can start a listen command? I.e. the Mission Editor command X:Start Listen Command that waits for a certain switch or button to activate a flag. nullCheers
MadCh33z3 Posted March 16, 2024 Posted March 16, 2024 take a look at FlightAssistant 1.5 by jmossr. It uses radio button sequenced pushes to create an autopilot for the mosquito by using TrimTable. You might be able to create a flag interaction in a similar way with a certain combination triggering a flag. Just a guess. Quote local function performClickableCommand(deviceId, commandId, value) return executeLuaInServerOrMissionEnv('a_cockpit_perform_clickable_action(' .. deviceId .. ', ' .. commandId .. ', ' .. (value or 1) .. ')') end local pperformClickableCommand local checkPerformClickableCommandArgs if isDebugUnitEnabled then checkPerformClickableCommandArgs = function(deviceId, commandId, value, errorLevel) local lvl = errorLevel + 1 checkArgType('performClickableCommand(device, command, value)', 'device', deviceId, 'number', true, lvl) checkArgType('performClickableCommand(device, command, value)', 'command', commandId, 'number', true, lvl) checkArgType('performClickableCommand(device, command, value)', 'value', value, 'number', false, lvl) end pperformClickableCommand = function(deviceId, command, value) checkPerformClickableCommandArgs(deviceId, command, value, 2) return performClickableCommand(deviceId, command, value) end end 1
Recommended Posts