Zum Inhalt springen

CAOS-Programmierung: Befehlsgruppen: Sounds

Aus Wikibooks

Sounds

FADE (command)

Fade out a controlled sound.

MCLR (command) x (integer) y (integer)

Clear the music for the metaroom at the given location.

MIDI (command) midi_file (string)

Plays a MIDI file. Set to an empty string to stop the MIDI player.

MMSC (command) x (integer) y (integer) track_name (string)

Associates a music track with the meta room at the specified coordinates.

MMSC (string) x (integer) y (integer)

Returns the name of the music track played at the metaroom in the given location.

MUTE (integer) andMask (integer) eorMask (integer)

This returns (and potentially sets) the mute values for the sound managers in the game. Sensible settings for the parameters are as follows:
andMask	eorMask	returns
0	3	3 - Mutes both sound and music
3	0	0 for no mute
1 for sound muted
2 for music muted
3 for both muted
Sets nothing
1	2	Returns 2 for music muted, or 3 for both muted
Only sets mute on music, leaves sound alone

RCLR (command) x (integer) y (integer)

Clear the music for the room at the given location.

RMSC (command) x (integer) y (integer) track_name (string)

Associates a music track with the room at the specified coordinates. This overrides any track specified for the metaroom that the room is in.

RMSC (string) x (integer) y (integer)

Returns the name of the music track played at the room in the given location.

SEZZ (command) text (string)

Makes the TARG agent speak the specified text with voice as set by VOIS or VOIC. If TARG is a creature then it will be spoken properly (speech bubble 
et al).

SNDC (command) sound_file (string)

Plays a controlled sound effect emitted from the target. Updates volume and panning as the agent moves.

SNDE (command) sound_file (string)

Play a sound effect audible as if emitted from target's current location.

SNDL (command) sound_file (string)

Play a sound effect as in SNDC, only the sound is looped.

SNDQ (command) sound_file (string) delay (integer)

As SNDE, only with a delay before playing.

STPC (command)

Stops a controlled sound.

STRK (command) latency (integer) track (string)

This triggers the music track specified. The track will play for at least latency seconds before being overridden by room or metaroom music.

VOIC (command) genus (integer) gender (integer) age (integer)

This sets the TARG agent's voice to the specified creature voice, using standard cascade techniques to select the nearest match. On failure,  
"DefaultVoice" will be reloaded. Use SEZZ to actually say something.

VOIS (command) voice_name (string)

Sets the TARG agent's voice to the specified value. The voice name must be valid in the catalogue. If it fails, then "DefaultVoice" will be reloaded. 
Use SEZZ to actually say something.

VOIS (string)

This returns the voice name for the TARG agent. (Unless it has been serialised in :( In which case it returns "Lozenged" if the agent had a voice  
before the save, or "" as normal if the agent can't speak.)

VOLM (command) channel (integer) volume (integer)

Set overall the volume of the sound effects (channel 0), the MIDI (channel 1) or the generated music (channel 2). Values range from -10000 (silent) to 
0 (loudest).

VOLM (integer) channel (integer)

Returns the overall the volume of the sound effects (channel 0), the MIDI (channel 1) or the generated music (channel 2). Values range from -10000 
(silent) to 0 (loudest).