---
name: "createSimpleTask"
type: command
status: ok
groups: ["Briefing"]
arma3_since: "0.50"
locality: {"argument": "global", "effect": "local", "server_exec": false}
source: https://community.bistudio.com/wiki/createSimpleTask
revid: 353044
updated: 2024-03-12T12:09:28Z
---

# createSimpleTask

*Command · Briefing · Arma 3 v0.50 · introduced in Arma 2 v1.00*

Locality: arguments **global** · effect **local**

## Description

Creates a new [Task](../topics/Task.md) and adds it to the Diary.

> [!NOTE]
> **Arma 3:** Using the **Arma 3: Task Framework** instead is recommended

> [!NOTE]
> When task is added as a child, it appears as subcategory to the parent task in the Tasks menu and can be parent to another child task. However this is cosmetic appearance as each task has own id and can be referenced directly via diary link.

## Syntax

```sqf
unit createSimpleTask [name, parentTask]
```

**Parameters:**

- `unit`: [Object](../topics/Object.md) - unit to add this new task
- `name`: [String](../topics/String.md)
- `parentTask`: [Task](../topics/Task.md) - (Optional, [taskNull](../commands/taskNull.md)) - The new task will be a sub task of the parent task

**Returns:** [Task](../topics/Task.md) - the new task

## Examples

### Example 1

```sqf
_currentTask = player createSimpleTask ["NewTask"];
```

### Example 2

```sqf
_childTask = player createSimpleTask ["ChildTask", _currentTask];
```

## Multiplayer

The task effect is [local](../topics/Multiplayer_Scripting.md#locality), it will only exist on the client it was added.

## See also

[simpleTasks](../commands/simpleTasks.md) · [removeSimpleTask](../commands/removeSimpleTask.md) · [setSimpleTaskDescription](../commands/setSimpleTaskDescription.md) · [setSimpleTaskDestination](../commands/setSimpleTaskDestination.md) · [setTaskState](../commands/setTaskState.md) · [setTaskResult](../commands/setTaskResult.md) · [taskState](../commands/taskState.md) · Tasks · Briefing

## Community notes

**Lou Montana** — 2011-07-02

- Creating child will position the new task just under the parent task.
- Creating another "normal" (parent) task will create a new line **above** the others. Think of it if you want ordered objectives.
- Succeeding parent task will automatically succeed childs, whatever their [taskState](../commands/taskState.md) was set to. (I.E. If a task is set as a child to another, it will be completed when its parent is complete.. no matter if the child task really was or not).
- This command has to be executed again for it to be applied for JIP players - no server sync

Full step by step code from beginning to end:

**Step 1: create a new simpleTask**

```sqf
MySimpleTask = player createSimpleTask [(localize "STR_aSimpleTask")];
```

You may create a task at any given point in time. You just need to be aware of the fact, that you've created the task for a single unit (the player). So if you make use of teamSwitch, respawn or similiar, you need to think about how to manage this, so all of these units will have up to date tasks assigned to them.
Second, it is a good practice to use a stringtable, even if you do not plan (yet) to offer translations.

**Step 2: task destination**

```sqf
MySimpleTask setSimpleTaskDestination _destination;
```

variable/pointer-to-your-task setSimpleTaskDestination some-position. That's it.

**Step 3: task description**

```sqf
MySimpleTask setSimpleTaskDescription [
    localize "STR_aSimpleTaskLongText",
    localize "STR_aSimpleTask",
    localize "STR_aSimpleTaskWaypointLabel"
];
```

Again, no magic involved here. You take your task, the command setSimpleTaskDescription an pass an array with three strings in it.
The first string is the long description text, the second is the name/title of the task and the last one will show up on-screen on the waypoint in cadet mode.

**Step 4: set and update task states**

```sqf
MySimpleTask setTaskState "CREATED";
```

And that's it. Here a minimal working example:

```sqf
MySimpleTask = player createSimpleTask ["simple task title"];
MySimpleTask setSimpleTaskDestination (position player);
MySimpleTask setSimpleTaskDescription [
    "simple task long description",
    "simple task title",
    "simple task waypoint label"
];
MySimpleTask setTaskState "CREATED";
```

And then later in the mission:

```sqf
MySimpleTask setTaskState "SUCCEEDED";
```

If you want to keep the player in the loop about the status of tasks, you may always do this:

```sqf
[objNull, objNull, MySimpleTask, "SUCCEEDED"] execVM "CA\Modules\MP\data\scriptCommands\taskHint.sqf";
```

<sub>Source: [BI Community Wiki — createSimpleTask](https://community.bistudio.com/wiki/createSimpleTask) (revision 353044).</sub>
