Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

LUA for GUID of a manually selected contact?

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> Lua Legion >> LUA for GUID of a manually selected contact? Page: [1]
Login
Message << Older Topic   Newer Topic >>
LUA for GUID of a manually selected contact? - 11/1/2018 4:42:05 PM   
msc

 

Posts: 103
Joined: 7/31/2013
From: Austria
Status: offline
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!
Post #: 1
RE: LUA for GUID of a manually selected contact? - 11/2/2018 10:45:57 PM   
michaelm75au


Posts: 12494
Joined: 5/5/2001
From: Sydney, Australia
Status: offline
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.

_____________________________

Michael

(in reply to msc)
Post #: 2
RE: LUA for GUID of a manually selected contact? - 11/3/2018 12:20:55 PM   
msc

 

Posts: 103
Joined: 7/31/2013
From: Austria
Status: offline
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

(in reply to michaelm75au)
Post #: 3
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> Lua Legion >> LUA for GUID of a manually selected contact? Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.094