---
name: "BIS_fnc_basicTask"
type: function
status: ok
groups: ["Tasks"]
arma3_since: "1.00"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/BIS_fnc_basicTask
revid: 379544
updated: 2026-10-31T13:40:20Z
---

# BIS_fnc_basicTask

*Function · Tasks · Arma 3 v1.00*

## Description

> [!NOTE]
> **Arma 3:** Internally used **.fsm**.

Compiled FSM that creates a predefined task for the [player](../commands/player.md) or changes its state. The only defined task type is "ATTACK"; its task ID is "ATTACK_" followed by the given number.

- If the task does not exist yet, it is created with [BIS_fnc_taskCreate](../functions/BIS_fnc_taskCreate.md) (title "Attack *name*", description "Attack the location and neutralize all enemies.").
- If the task exists and its state is "Assigned" or "Created", its state is changed with [BIS_fnc_taskSetState](../functions/BIS_fnc_taskSetState.md).

> [!NOTE]
> The state check is case-sensitive, while a task created as current is stored as "ASSIGNED"; such a task is therefore not updated by a second call.

## Syntax

```sqf
[taskType, taskNumber, params] call BIS_fnc_basicTask
```

**Parameters:**

- `taskType`: [String](../topics/String.md) - "ATTACK"; any other value logs an error
- `taskNumber`: [Number](../topics/Number.md) - (Optional, default 0) number appended to the task ID
- `params`: [Array](../topics/Array.md) - (Optional, default `[]`)

  - when the task does not exist: [position, name, isCurrent]
    - position: anything accepted by [BIS_fnc_position](../functions/BIS_fnc_position.md) - (Optional, default `markerPos "BIS_attack"`) task destination; none is set if the position is [0,0,0]
    - name: [String](../topics/String.md) - (Optional, default "the location") name used in the task title
    - isCurrent: [Boolean](../topics/Boolean.md) - (Optional, default [true](../commands/true.md)) set the task as current
  - when the task exists: [state]
    - state: [String](../topics/String.md) - (Optional, default "succeeded") new task state

**Returns:** [Nothing](../topics/Nothing.md)

## Examples

### Example 1

```sqf
["ATTACK", 1, [getMarkerPos "target", "Agia Marina"]] call BIS_fnc_basicTask; // creates task "ATTACK_1"
```

## See also

[BIS_fnc_taskCreate](../functions/BIS_fnc_taskCreate.md) · [BIS_fnc_taskSetState](../functions/BIS_fnc_taskSetState.md) · [BIS_fnc_taskExists](../functions/BIS_fnc_taskExists.md) · [BIS_fnc_taskState](../functions/BIS_fnc_taskState.md)

<sub>Source: [BI Community Wiki — BIS fnc basicTask](https://community.bistudio.com/wiki/BIS_fnc_basicTask) (revision 379544).</sub>
