Jump to content

Recommended Posts

Posted

Hi all

I need help with a script, it may be simple, but I have been testing and searching for hours and I can not find how to do it:

 

I need to make a script (using MIST or MOOSE) that sends a message to a coalition that a flag is true.

 

I did it in ME

FLAG EQUALS (11,1) ---- GROUP ACTIVATE (RED F15)

TIME SINCE FLAG (11.5) --- MESSAGE TO COALITION (BLUE, RED F15 ACTIVATED, 15, FALSE, 0)

 

 

Please if someone has already done it or knows how to do it, I will be very grateful.

 

Colmillo

[sIGPIC][/sIGPIC]

Intel(R) Core(TM) i9-10900KF CPU @ 3.70GHz   3.70 GHz ROG STRIX Z490-E GAMING
RAM 128 M.2*2 2T total SSD*3 2.5T total
GeForce RTX 3090   Orion2 HOTAS F-16EX  Saitek Pro Rudder

Posted

Yes, thanks, I know that some scripts do not need Mist or Moose.

But how do I solve it ?, I have not done much scripts, and many examples help me. And I have not found one for what I want.

This is my script:

--START

trigger.action.outText ('SCENARIO', 45)

 

local M1 = missionCommands.addSubMenuForCoalition (coalition.side.RED, "ACT AI BLUE PILOTS", nil)

missionCommands.addCommandForCoalition (coalition.side.RED, "01 PILOT", M1, function () trigger.action.setUserFlag (1, true) end, nil)

missionCommands.addCommandForCoalition (coalition.side.RED, "02 PILOTS", M1, function () trigger.action.setUserFlag (2, true) end, nil)

missionCommands.addCommandForCoalition (coalition.side.RED, "03 PILOTS", M1, function () trigger.action.setUserFlag (3, true) end, nil)

missionCommands.addCommandForCoalition (coalition.side.RED, "04 PILOTS", M1, function () trigger.action.setUserFlag (4, true) end, nil)

--END

 

My intention is that a text appears when I select one of those commands in the comm menu.

[sIGPIC][/sIGPIC]

Intel(R) Core(TM) i9-10900KF CPU @ 3.70GHz   3.70 GHz ROG STRIX Z490-E GAMING
RAM 128 M.2*2 2T total SSD*3 2.5T total
GeForce RTX 3090   Orion2 HOTAS F-16EX  Saitek Pro Rudder

Posted

@Colmillo

 

I guess you're asking for something like this (it's standard DCS code, don't need MOOSE or MIST):

 

 

local function Pilot01()

trigger.action.setUserFlag(1, true)

trigger.action.outTextForCoalition(coalition.side.RED, "Flag 1 is true",10)

end

 

local function Pilot02()

trigger.action.setUserFlag(2, true)

trigger.action.outTextForCoalition(coalition.side.RED, "Flag 2 is true",10)

end

 

local function Pilot03()

trigger.action.setUserFlag(3, true)

trigger.action.outTextForCoalition(coalition.side.RED, "Flag 3 is true",10)

end

 

local function Pilot04()

trigger.action.setUserFlag(4, true)

trigger.action.outTextForCoalition(coalition.side.RED, "Flag 4 is true",10)

end

 

 

trigger.action.outText ('SCENARIO', 45)

 

local M1 = missionCommands.addSubMenuForCoalition (coalition.side.RED, "ACT AI BLUE PILOTS")

missionCommands.addCommandForCoalition (coalition.side.RED, "01 PILOT", M1, Pilot01)

missionCommands.addCommandForCoalition (coalition.side.RED, "02 PILOTS", M1, Pilot02)

missionCommands.addCommandForCoalition (coalition.side.RED, "03 PILOTS", M1, Pilot03)

missionCommands.addCommandForCoalition (coalition.side.RED, "04 PILOTS", M1, Pilot04)

 

Posted

Thank you Hardcard

 

It is exactly what I wanted!

I always see that you post solutions to those of us who have doubts with programming scripts, you are very helpful and I thank you very much!

[sIGPIC][/sIGPIC]

Intel(R) Core(TM) i9-10900KF CPU @ 3.70GHz   3.70 GHz ROG STRIX Z490-E GAMING
RAM 128 M.2*2 2T total SSD*3 2.5T total
GeForce RTX 3090   Orion2 HOTAS F-16EX  Saitek Pro Rudder

Posted

hahahaha, no problem!! (But in my family we prefer Alexis Sanchez)

[sIGPIC][/sIGPIC]

Intel(R) Core(TM) i9-10900KF CPU @ 3.70GHz   3.70 GHz ROG STRIX Z490-E GAMING
RAM 128 M.2*2 2T total SSD*3 2.5T total
GeForce RTX 3090   Orion2 HOTAS F-16EX  Saitek Pro Rudder

  • Recently Browsing   0 members

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