Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

Popup message

 
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 >> Popup message Page: [1]
Login
Message << Older Topic   Newer Topic >>
Popup message - 10/26/2021 8:53:21 PM   
slimatwar

 

Posts: 77
Joined: 1/20/2017
Status: offline
I would like to know how I can receive a popup message (or a notification) when a specific unit of mine arrives at a specific waypoint or area? I guess it can be done with LUA but I don't know yet how to use it.
Post #: 1
RE: Popup message - 10/26/2021 8:58:00 PM   
BDukes

 

Posts: 1695
Joined: 12/27/2017
Status: offline
You can use it but don't necessarily need lua to do it. Use the event editor. Unit enters area (create area around waypoint) trigger with message action.

With lua you may be able to access the waypoint if it is a generated course for a strike etc.. I'd be careful if it's a patrol or something that won't actually hit the waypoint (use the above).

_____________________________

Don't call it a comeback...

(in reply to slimatwar)
Post #: 2
RE: Popup message - 10/26/2021 10:17:45 PM   
slimatwar

 

Posts: 77
Joined: 1/20/2017
Status: offline

quote:

ORIGINAL: BDukes

You can use it but don't necessarily need lua to do it. Use the event editor. Unit enters area (create area around waypoint) trigger with message action.

With lua you may be able to access the waypoint if it is a generated course for a strike etc.. I'd be careful if it's a patrol or something that won't actually hit the waypoint (use the above).


Thank you.
I forgot the features of the event editor,though I don't know much about it.

(in reply to BDukes)
Post #: 3
RE: Popup message - 11/2/2021 10:57:44 PM   
KnightHawk75

 

Posts: 1450
Joined: 11/15/2018
Status: offline
BDukes is right, depending on what you need the display message action may be all you need.

If you do need to script it though, you're looking for ScenEdit_SpecialMessage('SideNameHere','The html or plain text here')

http://commandlua.github.io/#ScenEdit_SpecialMessage


(in reply to slimatwar)
Post #: 4
RE: Popup message - 11/5/2021 7:23:28 PM   
slimatwar

 

Posts: 77
Joined: 1/20/2017
Status: offline
Thanks guys.
And what should I do if I want the 'jump to location' button to point me to the specific unit?

(in reply to KnightHawk75)
Post #: 5
RE: Popup message - 11/6/2021 12:44:40 AM   
KnightHawk75

 

Posts: 1450
Joined: 11/15/2018
Status: offline
quote:

'jump to location'
- Use the 3rd optional parameter.

ScenEdit_SpecialMessage('SideNameHere','The html or plain text here', {table of latitude=TheLatHere, longitude=TheLonHere});

So let's just say for example some unit enters some area (or say it is unit damaged) and you have a trigger for it, the action might include:

local u = ScenEdit_UnitX(); --get the unit wrapper.
ScenEdit_SpecialMessage('Blue','Something happened here. Jump to location is available',{latitude=u.latitude,longitude=u.longitude});
or say it's some hard coded location...
ScenEdit_SpecialMessage('Blue','Something happened here. Jump to location is available',{latitude=1.1234,longitude=-1.1234});



< Message edited by KnightHawk75 -- 11/6/2021 12:45:52 AM >

(in reply to slimatwar)
Post #: 6
RE: Popup message - 11/6/2021 9:43:15 AM   
slimatwar

 

Posts: 77
Joined: 1/20/2017
Status: offline
Thank you very much, KnightHawk75.

(in reply to KnightHawk75)
Post #: 7
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> Lua Legion >> Popup message 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

1.719