You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
key: required, string, this is a unique key that will identify the sound in future events
url: required, string, base URL to fetch the sound file at
name: required, string, file name to add to the base url above, this should be an mp3
type: optional, string, default "sound", options "music" or "sound"
tag: optional, string, extra string to help tag sounds for internal organization
volume: optional, integer, 1-100, default 50, relative volume that the sound will play at
loops: optional, integer, -1 or 1+, default 1, number of loops that the sound file should play before stopping, -1 continues until a stop event is sent
continue: optional, boolean, default true, if true the sound file will continue playing if already playing, false will restart the sound
priority: optional, integer, 1-100, default 50, if a higher priority sound comes in, all sounds of the same type under it will stop playing
Stop File
To stop a media file that may be running, send an event with a filter to stop all matching media.
The filter above will check all active media files, and any matching media is stopped. For key, type, tag, and name, a simple string match is performed. For priority, anything below or equal to the sent value is matched.
Media must match all sent values in order to be considered a match and stopped.
MUD Client Media Protocol
Inspired by MSP
Also on Mudlet's Wiki
Enable Media
The client will enable sound by including
"Client.Sounds 1"
as part of the initialCore.Supports
messages.Set Default Values
You can set the default values for certain other messages by sending this message.
Play File
Send a
Client.Sounds.Start
event to start playing a sound or music file."sound"
, options"music"
or"sound"
1-100
, default50
, relative volume that the sound will play at-1
or1+
, default1
, number of loops that the sound file should play before stopping,-1
continues until a stop event is senttrue
, iftrue
the sound file will continue playing if already playing,false
will restart the sound1-100
, default50
, if a higher priority sound comes in, all sounds of the same type under it will stop playingStop File
To stop a media file that may be running, send an event with a filter to stop all matching media.
The filter above will check all active media files, and any matching media is stopped. For key, type, tag, and name, a simple string match is performed. For priority, anything below or equal to the sent value is matched.
Media must match all sent values in order to be considered a match and stopped.
To stop all sounds, send an event with no key.
Examples
Play a combat sound.
Interrupt your sword swing with the enemy blocking.
Play zone background music.
Migrate to a new zone.
Continue playing the zone's background, but add in a passing storm.
Stop the storm, the zone background will continue playing.
The text was updated successfully, but these errors were encountered: