Popup message (Full Version)

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



Message


slimatwar -> Popup message (10/26/2021 8:53:21 PM)

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.




BDukes -> RE: Popup message (10/26/2021 8:58:00 PM)

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).




slimatwar -> RE: Popup message (10/26/2021 10:17:45 PM)


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.




KnightHawk75 -> RE: Popup message (11/2/2021 10:57:44 PM)

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





slimatwar -> RE: Popup message (11/5/2021 7:23:28 PM)

Thanks guys.
And what should I do if I want the 'jump to location' button to point me to the specific unit?




KnightHawk75 -> RE: Popup message (11/6/2021 12:44:40 AM)

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});





slimatwar -> RE: Popup message (11/6/2021 9:43:15 AM)

Thank you very much, KnightHawk75.




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.953125