- Activities
- Help files
- Recent announcements
- View Recent Changes
- View our policies.
- our hosts
- Leaderboards.
- Our Roleplayers.
- About the races of the game
- Go to the MOOs home
- Find out about PVP on Cosmic Rage
- The Cosmic Rage Podcast.
- Our skills system
- The Ranking System
- Frequently Asked Questions
- Leave us a review!
Welcome to: Cosmic rage!
By Nathan Tech!
Web view
You are in the web view for viewing help files online in your browser.Viewing category soundpack..
back to help list
Soundpack Hook Trigger Configuration
To enable the client to understand which sound to play, the MUD sends a specific line that is broken down into components below. For those knowledgeable about the scripting language of different clients and willing to set it up:
$sphook action:path:volume:pitch:pan:id
Each argument in the string is separated by colons (:) and will always have the same number of elements. If an argument is not used, it will be replaced with the string 'na', indicating that the value should remain at its default. For example, pan in the centre or the sound pitched normally.
The 'action' part of the string can include the following arguments:
play: Plays a sound once.
loop: Loops a sound.
playrec: Plays a sound and registers its ID in the game for future adjustments.
stop: Stops a currently playing loop or the recorded ID.
adjustsound: Adjusts the currently playing sound (if it was recorded with playrec), such as modifying its pan, pitch, or volume.
The 'path' part of the string is the path to the sound within the sound subfolders. It always starts within the 'sounds' folder located in the game's directory. For example, if your sounds are stored in D:\games\cosmic rage\sounds, the path sent will start from within the 'sounds' folder, e.g., 'ambience/landingpad'.
Volume and pan are integers:
Volume ranges from 0 to 100.
Pan ranges from -100 (full left) to 100 (full right).
Pitch is measured in Hz, typically from 0 to 192000 Hz.
The 'id' is used to control properties of a currently playing sound, such as adjusting volume or stopping a loop, allowing the client to identify which sound to modify or stop.
Why not explore the moo!
Explore the moo:- Activities
- Help files
- Recent announcements
- View Recent Changes
- View our policies.
- our hosts
- Leaderboards.
- Our Roleplayers.
- About the races of the game
- Go to the MOOs home
- Find out about PVP on Cosmic Rage
- The Cosmic Rage Podcast.
- Our skills system
- The Ranking System
- Frequently Asked Questions
- Leave us a review!