Jump to content

F10 menu - addCommandfForUnit() or equivalent?


Recommended Posts

Posted

When a human client selects an item in the F10 menu, I'd like to be able to pass the unit name or id of that client to the script. There just doesn't seem to be any way to do that right now. Something like this would be nice:

 

missionCommands.addCommandForUnit(unitID, "Options", nil, optionsFunction, unitID)

 

There is of course the addCommandForGroup() function:

 

missionCommands.addCommandForGroup(groupID, "Options", nil, optionsFunction, goupID)

 

With that you could make each client aircraft a separate group and that would accomplish the same thing I guess. But that adds a lot of complexity to the mission, and a lot of extra work for the mission builder.

 

Is there something I'm missing, or is this a feature we might could expect in the future? I'm pretty new to Lua programming, does ED periodically add new Lua functions?

Posted

There is an official feature request submitted for just that. Also with a soundToUnit and textToUnit type functionality.

 

Basically DCS didn't support more than one client in a group when those were made and now it does. So new functions are needed to adjust to that, but haven't been added yet. You can always just use the 1 client per group approach and always know that group X = unit Y.

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

  • Recently Browsing   0 members

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