From 96f333d40a54f7ffd9420f4e0bce37e7a2a393ad Mon Sep 17 00:00:00 2001 From: Ambroise Garel <47314805+akaAgar@users.noreply.github.com> Date: Fri, 25 Jul 2025 15:22:54 +0200 Subject: [PATCH] Added "kill wingman" debug command --- Script/The Universal Mission/DebugMenu.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Script/The Universal Mission/DebugMenu.lua b/Script/The Universal Mission/DebugMenu.lua index 7ac34ba..efd08da 100644 --- a/Script/The Universal Mission/DebugMenu.lua +++ b/Script/The Universal Mission/DebugMenu.lua @@ -72,6 +72,17 @@ do timer.scheduleFunction(TUM.onEvent, landingEvent, timer.getTime() + 1) end + local function doKillWingman() + local wingGroup = TUM.wingmen.getGroup() + if not wingGroup then return end + + local units = wingGroup:getUnits() + for _,u in ipairs(units) do + trigger.action.explosion(u:getPoint(), 10) + return + end + end + function TUM.debugMenu.createMenu() if not TUM.DEBUG_MODE then return end @@ -79,6 +90,7 @@ do missionCommands.addCommand("Detonate \"boom\" map markers", rootMenu, doMarkersBoom, nil) missionCommands.addCommand("Detonate aircraft near \"airboom\" map markers", rootMenu, doMarkersAirBoom, nil) missionCommands.addCommand("Award 100 points and 1 objective", rootMenu, doAwardPointsAndObjectives, nil) + missionCommands.addCommand("Kill wingman", rootMenu, doKillWingman, nil) missionCommands.addCommand("Simulate player takeoff", rootMenu, doSimulatePlayerTakeOff, nil) missionCommands.addCommand("Simulate player landing", rootMenu, doSimulatePlayerLanding, nil) missionCommands.addCommand("Reset player stats", rootMenu, TUM.playerCareer.reset, nil)