---
name: "BIS_fnc_missionSelector"
type: function
status: ok
groups: ["Systems"]
arma3_since: "1.78"
locality: {"argument": null, "effect": "local", "server_exec": false}
source: https://community.bistudio.com/wiki/BIS_fnc_missionSelector
revid: 349497
updated: 2023-11-08T17:09:09Z
---

# BIS_fnc_missionSelector

*Function · Systems · Arma 3 v1.78*

Locality: effect **local**

## Description

Function that draws clickable, hoverable and animated icons on the map that execute a user-defined code when pressed.

## Syntax

```sqf
[area, mapCenter, missionsArray] call BIS_fnc_missionSelector
```

**Parameters:**

- `area`: [Array](../topics/Array.md) of [Number](../topics/Number.md) - (Optional, default [100,100]) used to determine map's zoom, format [width, height]
- `mapCenter`: [Position2D](../topics/Position.md#introduction) - (Optional, default [0,0]) center position where the map camera will be positioned
- `missionsArray`: [Array](../topics/Array.md) - (Optional, default `[]`) list of selectable missions and their parameters, to format [pos, text, tooltip, picture, code]:
  - pos: [Array](../topics/Array.md) - where the clickable marker will be placed
  - text: [String](../topics/String.md) - text that should be displayed next to the icon
  - tooltip: [String](../topics/String.md) - text to be displayed in the tooltip (on mouse over)
  - picture: [String](../topics/String.md) - location of the picture to be displayed in the tooltip
  - code: [Code](../topics/Code.md) - code spawned when the icon is clicked

**Returns:** [Number](../topics/Number.md) - index of the chosen mission

## Examples

### Example 1

```sqf
private _area = [750, 400];
private _missionsList =
[
    [
        getMarkerPos "BIS_briefMarkerINFANTRY",
        "Infantry",
        "Your mission is to do stuff",
        "AnimBriefing\intro_stage1a_CA.paa",
        { hint "infantry mission selected" }
    ],
    [
        getMarkerPos "BIS_briefMarkerSPECIALFORCES",
        "Special Forces",
        "Your mission is to do stuff but in a more special way",
        "AnimBriefing\intro_stage1a_CA.paa",
        { hint "special forces mission selected" }
    ]
];

private _index = [_area, getMarkerPos "BIS_cameraCenter", _missionsList] call BIS_fnc_missionSelector;
private _missionDetails = _missionsList select _index;
```

## See also

[playMission](../commands/playMission.md)

<sub>Source: [BI Community Wiki — BIS fnc missionSelector](https://community.bistudio.com/wiki/BIS_fnc_missionSelector) (revision 349497).</sub>
