ID:145139
 
Code:

turf
DI
Entered()
if(usr.indest == 1)
usr.frgt = 1
else
if(usr.client)
usr << sound(null)
usr << sound('destinyisland.mid',1)
usr.indest = 1
Exited()
usr.indest = 0
TT
Entered()
if(usr.intrav == 1)
usr.frgt = 1
else
if(usr.client)
usr << sound(null)
usr << sound('traversetown.mid',1)
usr.intrav = 1
Exited()
usr.intrav = 0
Problem description:

I want it so that when i walk into a certain area it will play a certain sound. But now everywere i walk it starts the song over.
</<></<></<></<>
You want area, not turf.
In response to JMT
Even so. First off, you're using both Entered() and Exited() complete wrong. Press F1 in DreamMaker to see how they're used.

Anyhow
mob/var/tmp/song
area
var/song
Entered(a)
..() // For if you have any other Entered()s
if(ismob(a))
var/mob/M=a
if(!M.song==src.song) // if M is NOT listening to the same music as src gives M
M.song=src.song

Cave
song='cavesong.ogg'
In response to Mysame
when i use it as an area it deletes my Safezone area
In response to MagicBLC13
The code he posted will work for turfs if you just define the variable and Entered() override under "turf".

You should also change the "mob/var/song" to "mob/var/tmp/song" so the song won't be saved with the mob, bloating your savefiles when and if you include them.
In response to Shadowdarke
Ah, right. Editted