visibleMap: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "<!-- Note Section [A-Z]+ --> " to "") |
Lou Montana (talk | contribs) m (Text replacement - "<dl class='command_description'>" to "<dl class="command_description">") |
||
Line 20: | Line 20: | ||
}} | }} | ||
<dl class= | <dl class="command_description"> | ||
<dt><dt> | <dt><dt> | ||
<dd class="notedate">Posted on 13 November 2017</dd> | <dd class="notedate">Posted on 13 November 2017</dd> |
Revision as of 16:50, 21 May 2021
Description
- Description:
- Description needed
- Groups:
- MapInteraction
Syntax
- Syntax:
- Syntax needed
- Return Value:
- Return value needed
Examples
- Example 1:
if (visibleMap) then {hint "You're showing the map !"}
Additional Information
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
- Posted on 13 November 2017
- James
-
visibleMap does not work in all cases where a map might be part of a dialog like in a uav terminal or in a artillery computer dialog. Some of these cases can be covered with an addMissionEventHandler of type "Map". Just use the two magic variables 'mapIsOpened' and 'mapIsForced'. Skeleton might look something like
// update marker as long as map is open (works for uav stations as well) J_myGPSEH = addMissionEventHandler ["Map", { params ["_mapIsOpened", "_mapIsForced"]; if (_mapIsOpened) then { systemChat "GPS aktiv"; J_var_GPSOn = true; // no sheduled environment -> create one /* Triggered when map is opened or closed either by user action or script command openMap. */ [] spawn { waitUntil{ ... // do something as long as map is open; not J_var_GPSOn }; }; } else { J_var_GPSOn = false; systemChat "GPS inaktiv"; }; }];