ID:168868
 
I have my game set up so that when you log in, you are in a sort of maze with no solution. In this maze there are many portals that teleport you to the gameworld itself.

When you 'zone in', music appropriate for the zone you land in begins to loop.
sound('appropriatezonemusic.mid',1)


I also would like to include sound effects that appear when you are on a given terrain feature, and shut off when you leave that turf. By way of example, let's look at the Rimwood.

area
Adorna //The starting area, home of the fate called Adorna
Entered(client)
src << sound('Fates_Adorna.mid',1)//Music for her area
Adorna_Exit//The area defs for the portals out of her area
Entered(client)
Rimwood//Area def for the Rimwood portal
Entered(client)//If you step on the portal
src << sound('Rimwood.mid',1)//Play the Rimwood theme music,
usr.homeland = "Rimwood"//Set your homeland to 'Rimwood',
usr.loc = locate(53,49,3)//and then go there.
world //Area defs for the actual world map
Rimwood //This is where I want to put my sounds and other effects.
Entered(client)//If you go into the Rimwood...
client << sound('Rimwood.mid',1)//play the Rimwood theme music.
riverbasin
Entered(client)//If you stand on the river . . .
src << sound('river.wav',1,,1)//You will hear it.


Okay, now here is the fun part. What I can't seem to figure out is how to shut it off. Yes I know the first variable after the sound file name is the switch that allows continuous play. It needs to keep playing while you are on the river itself. And yes, I know I could put an Exited command there to define what happens when you step off the river. What is the procedure to "shut off" a sound, and can I do this on the turf itself instead of defining an area for it?

Any help is appreciated as always.
src << sound(null)