> For the complete documentation index, see [llms.txt](https://levelalfaomega.gitbook.io/unity-mugen/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://levelalfaomega.gitbook.io/unity-mugen/unity-mugen/state-controller-reference/commandset.md).

# CommandSet

Add commands by scripts.

<mark style="color:green;">**New controller added.**</mark>

### Required parameters:

&#x20;          value = *commands* (string)

&#x20;                     Set to nonzero to have control, or 0 to disable control.<br>

### Optional parameters:

&#x20;          clear = *clear\_old (int)*

&#x20;                     if *clear\_old = 0 (*&#x72;emoves any command prior to the one being typed no&#x77;*).*

&#x20;                     if *clear\_old = 1 (*&#x74;he opposite of &#x30;*).*

### Example:

{% code fullWidth="false" %}

```
; Set command Input
type = CommandSet
trigger1 = (enemynear, stateno = 0) && (enemynear,time >= 3000)
value = B, Y
```

{% endcode %}

<details>

<summary>Inputs Examples:</summary>

{% code fullWidth="false" %}

```
U = UP
D = DOWN
L = LEFT
R = RIGHT

X = Light Punch
Y = Medium Punch
Z = Strong Punch
A = Light Kick
B = Medium Kick
C = Strong Kick

T = Taunt
```

{% endcode %}

</details>
