LUA for GUID of a manually selected contact? (Full Version)

All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> Lua Legion



Message


msc -> LUA for GUID of a manually selected contact? (11/1/2018 4:42:05 PM)

What is the LUA function to find out the GUID of a contact, which was manually selected (highlightend) on the map? (I looked into the documentation and forum, but was not able to find a solution.)
I want to select a contact with mouseclick (or multiple contacts with Shift+mousclick) on the map, start a "Special Action" and LUA should read the GUID for futher processesing.
Many thanks for your help!




michaelm75au -> RE: LUA for GUID of a manually selected contact? (11/2/2018 10:45:57 PM)

You can highlight the contacts and press ctlr-c to put the ids into clipboard (but then it would contain the GUIDs), but I don't think any of the current functions take data from the clipboard.
Might be useful so I'll have a look to see how it could work - probably function to return a table of GUIDs, which can then be used as a source for calling the standard functions.




msc -> RE: LUA for GUID of a manually selected contact? (11/3/2018 12:20:55 PM)

Thanks Michael,
an interesting method to find out the GUID quickly. (It would be nice to get the GUIDS out of the clipboard back into LUA...)

In the meantime I used this workaround:
I created a strike mission (just a dummy), where the player has to seclect his contacts (assign them as target).
Then when the player uses a "Special Action" Event, LUA can read out the GUID of the assigned targets for further processing.

Martin




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
1.625