{"name":"setMusicEffect","title":"setMusicEffect","type":"command","url":"https://community.bistudio.com/wiki/setMusicEffect","revid":377584,"updated":"2026-01-02T06:56:42Z","groups":["Sounds","Triggers","Waypoints"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","description":"Defines a music track played on activation. If another track is playing already, this will stop it and start the new track.\n\nTrack is a subclass name of CfgMusic. In addition, \"$STOP$\" (stops the current music track) or use `playMusic \"\"`.\nWhen used in a trigger, the track starts on activation but does not automatically stop on deactivation.","syntaxes":[{"syntax":"trigger setMusicEffect track","params":[{"name":"trigger","type":"Object","type_expr":"Object"},{"name":"track","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"trigger"},"right":{"text":"track"}},{"syntax":"waypoint setMusicEffect track","params":[{"name":"waypoint","type":"Waypoint","type_expr":"Waypoint"},{"name":"track","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"waypoint"},"right":{"text":"track"}}],"examples":[{"code":["_trigger setMusicEffect \"Track1\";"]},{"code":["[_group1,1] setMusicEffect \"$STOP$\";"]}],"see_also":["createTrigger","setSoundEffect","setTitleEffect"]}