proc/build_random_echo()
var/list/echo[18]
echo[1] = rand(-10000, 1000) //direct
echo[2] = rand(-10000, 0) //direct hf
echo[3] = rand(-10000, 1000) //room
echo[4] = rand(-10000, 0) //room hf
echo[5] = rand(-10000, 0) //obstruction
echo[6] = rand(0, 100) * 0.01 //obstruction lf ratio
echo[7] = rand(-10000, 0) //occlusion
echo[8] = rand(0, 100) * 0.01 //occlusion lf ratio
echo[9] = rand(0, 100) * 0.1 //occlusion room ratio
echo[10] = rand(0, 100) * 0.1 //occlusion direct ratio
echo[11] = rand(-10000, 0) //exclusion
echo[12] = rand(0, 100) * 0.01 //exclusion lf ratio
echo[13] = rand(-10000, 0) //outside volume hf
echo[14] = rand(0, 100) * 0.1 //doppler factor
echo[15] = rand(0, 100) * 0.1 //rolloff factor
echo[16] = rand(0, 100) * 0.1 //room roll off factor
echo[17] = rand(0, 100) * 0.1 //air absorption factor
echo[18] = 1 | 2 | 4 //flags
return echo
mob/verb/test2()
var/sound/dry = sound('clap.ogg')
var/sound/wet = sound('clap.ogg')
wet.environment = 1
wet.echo = build_random_echo()
src << dry
sleep(5)
src << wet
Compile this code
Run project
Click test2()
Click the "X" button on the window to close dream seeker. Dreamseeker will crash.