Page 1 of 1
					
				 Popup message
				Posted: Tue Oct 26, 2021 5:53 pm
				by slimatwar
				 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.
			 
			
					
				 RE: Popup message
				Posted: Tue Oct 26, 2021 5:58 pm
				by 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).
			 
			
					
				 RE: Popup message
				Posted: Tue Oct 26, 2021 7:17 pm
				by slimatwar
				 
 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.
 
			 
			
					
				 RE: Popup message
				Posted: Tue Nov 02, 2021 7:57 pm
				by KnightHawk75
				 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
 
  
			
					
				 RE: Popup message
				Posted: Fri Nov 05, 2021 4:23 pm
				by slimatwar
				 Thanks guys.
 And what should I do if I want the 'jump to location' button to point me to the specific unit?
			 
			
					
				 RE: Popup message
				Posted: Fri Nov 05, 2021 9:44 pm
				by KnightHawk75
				 '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});
 
 
 
			 
			
					
				 RE: Popup message
				Posted: Sat Nov 06, 2021 6:43 am
				by slimatwar
				 Thank you very much, KnightHawk75.