openGPS: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\|game([0-9]) ?= (.+) \|version([0-9]) ?= (.+) " to "|game$1= $2 |version$3= $4 ")
m (Some wiki formatting)
 
(One intermediate revision by the same user not shown)
Line 6: Line 6:
|gr1= Interaction
|gr1= Interaction


|descr= Opens or closes minimap if player has <tt>"ItemGPS"</tt> linked in inventory and <tt>"MinimapDisplayComponent"</tt> is not disabled with [[enableInfoPanelComponent]]. Returns [[true]] on success. If more than one minimap is open (see [[infoPanels]], [[infoPanel]]) each call to the command will close only 1 minimap. Visibility of minimap can be checked with [[visibleGPS]] command.
|descr= Opens or closes minimap if player has {{hl|"ItemGPS"}} linked in inventory and {{hl|"MinimapDisplayComponent"}} is not disabled with [[enableInfoPanelComponent]]. Returns [[true]] on success. If more than one minimap is open (see [[infoPanels]], [[infoPanel]]) each call to the command will close only 1 minimap. Visibility of minimap can be checked with [[visibleGPS]] command.


|s1= [[openGPS]] open
|s1= [[openGPS]] open
Line 14: Line 14:
|r1= [[Boolean]] - [[true]] on success
|r1= [[Boolean]] - [[true]] on success


|x1= <code>[[player]] [[linkItem]] "ItemGPS";
|x1= <sqf>
[[private]] _success = [[openGPS]] [[true]];</code>
player linkItem "ItemGPS";
private _success = openGPS true;
</sqf>


|x2= To close all opened minimaps:<code>[[while]] { [[openGPS]] [[false]] } [[do]] { };
|x2= To close all opened minimaps:
{{cc|or}}
<sqf>
[[while]] { [[visibleGPS]] } [[do]] { [[openGPS]] [[false]] };</code>
while { openGPS false } do { };
// or
while { visibleGPS } do { openGPS false };
</sqf>


|seealso= [[showGPS]] [[shownGPS]] [[visibleGPS]]
|seealso= [[showGPS]] [[shownGPS]] [[visibleGPS]]
}}
}}

Latest revision as of 17:28, 5 May 2022

Hover & click on the images for description

Description

Description:
Opens or closes minimap if player has "ItemGPS" linked in inventory and "MinimapDisplayComponent" is not disabled with enableInfoPanelComponent. Returns true on success. If more than one minimap is open (see infoPanels, infoPanel) each call to the command will close only 1 minimap. Visibility of minimap can be checked with visibleGPS command.
Groups:
Interaction

Syntax

Syntax:
openGPS open
Parameters:
open: Boolean - true to open, false to close
Return Value:
Boolean - true on success

Examples

Example 1:
player linkItem "ItemGPS"; private _success = openGPS true;
Example 2:
To close all opened minimaps:
while { openGPS false } do { }; // or while { visibleGPS } do { openGPS false };

Additional Information

See also:
showGPS shownGPS visibleGPS

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