Skip to content

Set Master Volume

Set Master Volume

Adjusts the master volume level for either music or sound effects.

Properties

System

Name Explanation Type
Music When selected, the volume adjustment applies to the master music volume. Toggle
Volume The volume level to set. Ranges from 0 (silent) to 1 (full volume). Variable or Value

Examples

Set Master Music Volume to Half

Sets the master music volume to 50 percent.

set_master_volume(0.5, music);
{"Data":{"IsMusic":true,"Volume":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"0.5","VariableIndex":0,"Metadata":null},"Metadata":null},"TypeName":"MAR.Game.Shared.Models.Scripts.Commands.Audio.SetMasterVolumeCommand"}

Set Master Sound Effect Volume from a Variable

Sets the master sound effect volume using a value stored in a global variable.

set_master_volume($gv[0], sfx);
{"Data":{"IsMusic":false,"Volume":{"IsGlobalVariable":true,"IsLocalVariable":false,"IsValue":false,"Value":"","VariableIndex":0,"Metadata":null},"Metadata":null},"TypeName":"MAR.Game.Shared.Models.Scripts.Commands.Audio.SetMasterVolumeCommand"}