Jump to content

Is Trigger action "LOAD MISSION" replaceable by a MOOSE function ?


jdeyrieux

Recommended Posts

Hi all,

 

My project is to purpose to the pilote with a F10 menu to select the mission who want to do.

 

With several missions files ".miz", with different meteo and training context. I created a script to implement a F10 menu to access to the mission library.

 

To be more easily to maintain, I would like to bypass the legacy ACTION "LOAD MISSION" triggered by a flag in the Mission Editor and use a function lua to do the same thing.

 

Here my sample of lua,

 

MenuTrainingSwitch = MENU_MISSION:New( "Training Switch Mission" )

do
    local function SwitchMissionFn( Mission2Load )
        MESSAGE:NewType( Mission2Load .. " to load", MESSAGE.Type.Information ):ToAll()
    -- HERE CALL FUNCTION TO LOAD AND RUN MISSION FILE
    end

    local MenuTrainingSwitch_CaseI = MENU_MISSION:New( "CASE I", MenuTrainingSwitch )

    local MenuTrainingSwitch_M1 = MENU_MISSION_COMMAND:New( "CASE I - Calm" , MenuTrainingSwitch_CaseI, SwitchMissionFn, "103_Training_CASE I_SOLO_SYRIA_W06SCT.miz")
    local MenuTrainingSwitch_M2 = MENU_MISSION_COMMAND:New( "CASE I - Moderate" , MenuTrainingSwitch_CaseI, SwitchMissionFn, "103_Training_CASE I_SOLO_SYRIA_W15BRK.miz")
    local MenuTrainingSwitch_M2 = MENU_MISSION_COMMAND:New( "CASE I - Hard" , MenuTrainingSwitch_CaseI, SwitchMissionFn, "103_Training_CASE I_SOLO_SYRIA_W25BRK.miz")
    local MenuTrainingSwitch_M2 = MENU_MISSION_COMMAND:New( "CASE I - Tempest" , MenuTrainingSwitch_CaseI, SwitchMissionFn, "103_Training_CASE I_SOLO_SYRIA_W35OVC.miz")
    
end

 

Do you have any idea about that ?

 

Thanks for your help

 

Link to comment
Share on other sites

  • 4 months later...
  • 1 month later...

I don't think there is a way to do this with MOOSE or scripting only. I use the ME editor to load a mission via a Flag is True condition, then in my scripting I use trigger.action.setUserFlag(####, true) to trigger the actionl.

[PC] ASUS X570E - Ryzen 9  5950X - RX 6900 XT - 32GB 3600Mhz

Hornet, A-4E-C, Huey, Ka-50, Mi-8, F-15E, F-14

Join us on Death Dealers PvE server.

Link to comment
Share on other sites

  • 8 months later...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...