---
name: "setMusicEffect"
type: command
status: ok
groups: ["Sounds", "Triggers", "Waypoints"]
arma3_since: "0.50"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/setMusicEffect
revid: 377584
updated: 2026-01-02T06:56:42Z
---

# setMusicEffect

*Command · Sounds, Triggers, Waypoints · Arma 3 v0.50 · introduced in Operation Flashpoint: Elite v1.00*

## Description

Defines a music track played on activation. If another track is playing already, this will stop it and start the new track.

Track is a subclass name of CfgMusic. In addition, "$STOP$" (stops the current music track) or use `playMusic ""`.
When used in a trigger, the track starts on activation but does not automatically stop on deactivation.

## Syntax

### Syntax 1

```sqf
trigger setMusicEffect track
```

**Parameters:**

- `trigger`: [Object](../topics/Object.md)
- `track`: [String](../topics/String.md)

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

### Syntax 2

```sqf
waypoint setMusicEffect track
```

**Parameters:**

- `waypoint`: Waypoint
- `track`: [String](../topics/String.md)

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

## Examples

### Example 1

```sqf
_trigger setMusicEffect "Track1";
```

### Example 2

```sqf
[_group1,1] setMusicEffect "$STOP$";
```

## See also

[createTrigger](../commands/createTrigger.md) · [setSoundEffect](../commands/setSoundEffect.md) · [setTitleEffect](../commands/setTitleEffect.md)

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