Jump to content
Sign in to follow this  
mostly

Map Coordinates in chat text from onMapSingleClick

Recommended Posts

Hi,

I'm trying to put together a script where my team are calling for support at a location defined by a single click on the map. The script places a marker using 'onMapSingleClick'. I've got the script working but I want to add some realistic communication procedures.

I basically want to have the radio comms show the requested coordinates as text, for example "Requesting extraction from grid ########".  Any ideas?

Thanks.

Share this post


Link to post
Share on other sites

Information about the command can be found here: https://community.bistudio.com/wiki/onMapSingleClick ...

... where we can see that the MEH is recommended: https://community.bistudio.com/wiki/Arma_3:_Mission_Event_Handlers#MapSingleClick

 

Regardless, both return the clicked coordinates via the local variable _pos.

 

Simple example using MEH:

addMissionEventHandler ["MapSingleClick", { 
    params ["_units", "_pos", "_alt", "_shift"];
    [player, format ["Requesting extraction from grid %1", _pos]] remoteExec ["sideChat"];
}];

 

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×