---
name: "setUserActionText"
type: command
status: ok
groups: ["Interaction"]
arma3_since: "0.50"
locality: {"argument": "global", "effect": "local", "server_exec": false}
source: https://community.bistudio.com/wiki/setUserActionText
revid: 369154
updated: 2024-09-03T10:34:39Z
---

# setUserActionText

*Command · Interaction · Arma 3 v0.50*

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

## Description

Changes user added action (see [addAction](../commands/addAction.md)) menu item text.

## Syntax

```sqf
object setUserActionText [actionIndex, textMenu, textWindowBackground, textWindowForeground]
```

**Parameters:**

- `object`: [Object](../topics/Object.md) - object the action is added to
- `actionIndex`: [Number](../topics/Number.md) - action id returned by [addAction](../commands/addAction.md)
- `textMenu`: [String](../topics/String.md) or [Structured Text](../topics/Structured_Text.md) - text title shown in scroll action menu
- `textWindowBackground`: [String](../topics/String.md) or [Structured Text](../topics/Structured_Text.md) - (Optional, default "") background text *(since arma3 1.62)*
- `textWindowForeground`: [String](../topics/String.md) or [Structured Text](../topics/Structured_Text.md) - (Optional, default "") foreground text *(since arma3 1.62)*

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

## Examples

### Example 1

```sqf
_id = player addAction ["Hello", ""];
player setUserActionText [_id, "Good Bye"];
```

### Example 2

```sqf
_id = billboard addAction ["Some Action", {}];
billboard setUserActionText [
    _id, 
    "Some Action", 
    "<t color='#ff0000'>Background-----------------</t><br>Multiline<br>Multiline<br>Multiline<br>. . .", 
    "<t color='#00ff00'>-----------------Foreground</t>"
];
```

## See also

[actionIDs](../commands/actionIDs.md) · [actionParams](../commands/actionParams.md) · [addAction](../commands/addAction.md) · [inGameUISetEventHandler](../commands/inGameUISetEventHandler.md) · [showHUD](../commands/showHUD.md) · [inputAction](../commands/inputAction.md) · [removeAction](../commands/removeAction.md) · [removeAllActions](../commands/removeAllActions.md) · [action](../commands/action.md)

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