kts.PlaySound – play a sound effect
kts.PlaySound(position, sound, frequency)
This function plays a sound at a given dungeon position.
position
can either be a valid dungeon position, or nil
. In the former case, only knights in the same room as the given position will hear the sound; in the latter case, all players will hear it.
sound
should be a Sound object, as created by kts.Sound.
frequency
specifies the sample rate in Hz. This can be varied up or down to play the sound at a different pitch.
No value is returned.
Errors can be generated if the input parameters are invalid.