ID:145418
 
Code:
area/teleport/Ezerath/EnterEzeratht
Enter(mob/M)
if(ismob(M) && M.client)
M.client.edge_limit = "[1],[1] to [37],[37]"
M.loc = locate(19,10,4)
M << sound('music/dq5-town1.mid',1)
M.Sound = null
M.Sound = 'music/dq5-town1.mid'

area/teleport/Ezerath/ExitEzeratht
Enter(mob/M)
if(ismob(M) && M.client)
M.client.edge_limit = null
M.loc = locate(24,22,1)
M << sound('music/dq6-world1.mid',1)


Problem description:

The sounds are suddenly overlapping. Now, i believe this is caused by the Byond Beta Version # but i don't understand how to stop the sounds from constantly overlapping and making a mix of completely annoying sounds.

This is happening because you didn't specify what channel to play it in, so it selects a free channel that's not in use. To fix it, specify a channel to play the sounds in.

M << sound('music/dq5-town1.mid', 1, channel=5)


~~> Unknown Person
Newen wrote:
Code:
> area/teleport/Ezerath/EnterEzeratht
> Enter(mob/M)
> if(ismob(M) && M.client)
> M.client.edge_limit = "[1],[1] to [37],[37]"
> M.loc = locate(19,10,4)
> M << sound('music/dq5-town1.mid',1)
> M.Sound = null
> M.Sound = 'music/dq5-town1.mid'
>
> area/teleport/Ezerath/ExitEzeratht
> Enter(mob/M)
> if(ismob(M) && M.client)
> M.client.edge_limit = null
> M.loc = locate(24,22,1)
> M << sound('music/dq6-world1.mid',1)

Problem description:

The sounds are suddenly overlapping. Now, i believe this is caused by the Byond Beta Version # but i don't understand how to stop the sounds from constantly overlapping and making a mix of completely annoying sounds.


M << sound(wait) before the sounds.
In response to Unknown Person
do i have to specify to stop playing the other channel? or does this switch the usr's channel to the new one and leaves the old one automatically?
In response to Newen
Newen wrote:
do i have to specify to stop playing the other channel? or does this switch the usr's channel to the new one and leaves the old one automatically?

You don't have to, since when you play a sound in a specific channel when there is one already playing in that channel, it will automatically end that sound, and play the new sound.

~~> Unknown Person
In response to Unknown Person
do all users share that channel? or is it somthing that Byond creates anew for each session connected?
In response to Unknown Person
i changed my code so its more like...

area/teleport/Ezerath/JailEn
Enter(mob/M)
if(ismob(M) && M.client)
M.client.edge_limit = "[45],[1] to [74],[14]"
M.loc = locate(48,10,3)
M << sound('music/dq6-flute.mid',1,channel=7)
M.Sound = 'music/dq6-flute.mid'

area/teleport/Ezerath/JailEx
Enter(mob/M)
if(ismob(M) && M.client)
M.client.edge_limit = "[120],[1] to [150],[40]"
M.loc = locate(125,32,3)
M << sound('music/dq6-castle1.mid',1,channel=6)
M.Sound = 'music/dq6-castle1.mid'


but the sounds still overlap
In response to Newen
Because they're still set on different channels, so they'll play at the same time.

You want them to be on the same channel, so they'll interrupt each other. You want channel=# to both have the same #.
In response to Newen
Each client tracks that channel indipendantly. It will only change what they hear on that channel when you send a new sound instruction to them.

Let's say you use use channel 7 for all your songs and play an intro song on chan 7 for players when they log in. You can play battle music to player 3 on channel 7 without changing what the other players hear. When player 4 logs in and begins the start music, player 3 will still be enjoying his battle theme.