ldnz Posted April 21, 2022 Posted April 21, 2022 These are accessible from the mission environment, but I'd like them for inclusion in a tool I'm working on. I see no export risk as they're already available in F-10 map. Does anyone know how to access a list of markpanels from the the GameGUI scripting environment?
toutenglisse Posted April 21, 2022 Posted April 21, 2022 (edited) 1 hour ago, ldnz said: These are accessible from the mission environment, but I'd like them for inclusion in a tool I'm working on. I see no export risk as they're already available in F-10 map. Does anyone know how to access a list of markpanels from the the GameGUI scripting environment? DCS event mark added - DCS World Wiki - Hoggitworld.com Using a handler with this event makes you able to create and update a table as mark panels are created or removed. Edit : As an example, this script add coordinates of marks panels in the F10 radio menu as long as they exist on the map (using mist functions) : Spoiler _MarkPath = missionCommands.addSubMenu('Marks') function EmptyFunction() end function CoordOnMarkups(event) if event.id == 25 then mgrs = coord.LLtoMGRS(coord.LOtoLL(event.pos)) mgrsString = mist.tostringMGRS(mgrs, 4) lat, lon = coord.LOtoLL(event.pos) MinDecim = 3 llString = mist.tostringLL(lat, lon, MinDecim) _ThisMark = missionCommands.addSubMenuForCoalition(event.coalition, 'Mark n° ' .. event.idx, _MarkPath) missionCommands.addCommandForCoalition(event.coalition, 'LAT LON: ' .. llString .. '.', _ThisMark, EmptyFunction) missionCommands.addCommandForCoalition(event.coalition, 'ELEVATION: ' .. mist.utils.round(event.pos.y, 0) .. ' meters / ' .. mist.utils.round(event.pos.y*3.28, 0) .. ' feet.', _ThisMark, EmptyFunction) missionCommands.addCommandForCoalition(event.coalition, 'MGRS/UTM: ' .. mgrsString .. '.', _ThisMark, EmptyFunction) end end function RemoveCoord(event) if event.id == 27 then missionCommands.removeItemForCoalition(event.coalition, {'Marks', 'Mark n° ' .. event.idx}) end end CoordOnMarkupsID = mist.addEventHandler(CoordOnMarkups) RemoveCoordID = mist.addEventHandler(RemoveCoord) Edited April 21, 2022 by toutenglisse in post
ldnz Posted April 21, 2022 Author Posted April 21, 2022 19 minutes ago, toutenglisse said: DCS event mark added - DCS World Wiki - Hoggitworld.com Using a handler with this event makes you able to create and update a table as mark panels are created or removed. Thanks, that's the events I am after, but they aren't available from the GameGUI environment. I'm looking for a purely client side solution that supports multiplayer. I can't find any combination of net.dostring_in() that gets what I want, and I can imagine good reasons you wouldn't want those events available to a client (Weapon fired, at me?! SATAL will go even further off the rails!). I guess either in the GameGUI/DCS singleton, or the Export API would be best?
toutenglisse Posted April 21, 2022 Posted April 21, 2022 12 hours ago, ldnz said: Thanks, that's the events I am after, but they aren't available from the GameGUI environment. I'm looking for a purely client side solution that supports multiplayer. I can't find any combination of net.dostring_in() that gets what I want, and I can imagine good reasons you wouldn't want those events available to a client (Weapon fired, at me?! SATAL will go even further off the rails!). I guess either in the GameGUI/DCS singleton, or the Export API would be best? I'm not sure what to answer, someone with real knowledge with server may help, but in my POV you can create markpanels table (there is also this function : DCS func getMarkPanels - DCS World Wiki - Hoggitworld.com ) at a time, or get the table populated by events - markpanels add or remove -, and do what you want with it (f.e. print with env.info). as example this .miz (launch mission, enter TF-51 client slot, put some markpanels on F10 Map, then use F10 radio menu to print the markpanels table in Logs folder\DCS.txt - just for testing, but I think you could print/export or whatever with server commands) test-marks-table-printLog.miz
ldnz Posted April 24, 2022 Author Posted April 24, 2022 Yeah cheers mate, I'm happy with how to do it in a mission, or server side. Just looking for a way to get all the marks on the client side when they're not running the mission. The marks are obviously available (they appear in the F-10 view, Tomcat, Harrier, Viggen all use them etc) but don't seem to have a public API.
Recommended Posts