ID:141743
 
Code:
mob/Login()
src<<sound("Bleach2.wma",0)
src.loc = locate(9,9,1)
src.client.view=8
if(src.key =="Bboiweirdo")
src.verbs += typesof(/mob/Owner/verb)
src.verbs += /mob/special/verb/Shuriken
src.verbs += /mob/yoshi/verb/Life_Shaver
src.verbs += /mob/Agito/verb/Fair_Stats
src.verbs += /mob/Agito/verb/Death_Note
src.verbs += /mob/special/verb/Aura_On
src.verbs += typesof(/mob/GM1/verb)
src.verbs += typesof(/mob/GM2/verb)
src.verbs += typesof(/mob/GM3/verb)
src.verbs += typesof(/mob/GM4/verb)
src.GM=5
if(src.key =="Kris13")
src.verbs += typesof(/mob/Owner/verb)
src.verbs += /mob/special/verb/Shuriken
src.verbs += /mob/yoshi/verb/Life_Shaver
src.verbs += /mob/Agito/verb/Fair_Stats
src.verbs += /mob/Agito/verb/Death_Note
src.verbs += /mob/special/verb/Aura_On
src.verbs += typesof(/mob/GM1/verb)
src.verbs += typesof(/mob/GM2/verb)
src.verbs += typesof(/mob/GM3/verb)
src.verbs += typesof(/mob/GM4/verb)
src.GM=5
if(src.key =="Gio_14")
src.verbs += typesof(/mob/Owner/verb)
src.verbs += /mob/special/verb/Shuriken
src.verbs += /mob/yoshi/verb/Life_Shaver
src.verbs += /mob/Agito/verb/Fair_Stats
src.verbs += /mob/Agito/verb/Death_Note
src.verbs += /mob/special/verb/Aura_On
src.verbs += typesof(/mob/GM1/verb)
src.verbs += typesof(/mob/GM2/verb)
src.verbs += typesof(/mob/GM3/verb)
src.verbs += typesof(/mob/GM4/verb)
src.GM=5
if(src.key =="Hakuoro")
src.verbs += typesof(/mob/Owner/verb)
src.verbs += /mob/yoshi/verb/Life_Shaver
src.verbs += typesof(/mob/GM1/verb)
src.verbs += typesof(/mob/GM2/verb)
src.verbs += typesof(/mob/GM3/verb)
src.verbs += typesof(/mob/GM4/verb)
src.GM=5
if(private == 1)
if(src.key != "Bboiweirdo"&&src.key != "Kris13"&&src.key != "Gio_14")
src << "<b>This server is private at the moment, sorry."
del src
return


Problem description:
The song is heard by everyone and repeats/overlays eachother several of times. Also it doesn't end until the song ends, I want it to end when someone goes into the game
thanks for the dump <_<

ok I dont have time to try and even find the sound file within all of that (if its even in there)

checked for filetypes
- wav
- mid
- ogg

found nothing.


could you please cut it down to the part where the sound file is played.

on a side note, the code is a mess ^_^
In response to Madpeter1231
is that better?
The sound() proc takes some more arguments you can use.

sound(file,repeat=0,wait,channel,volume)

file: A sound file to play
repeat: 1 to play sound repeatedly
wait: 0 to interrupt current sound on channel; 1 to wait in queue
channel: 0 for any available channel, 1-8 for specific channel (wavs only)
volume: 100 for full volume (default), 0 for none, or any value in between


You probably want this:

src<<sound("Bleach2.wma",0,0,1)


Also. keep in mind that since you're doing this in Mob Login(), it'll play the song every time someone switches their mob. Like, if they switch from a creatingcharacter temporary mob for logging in to their character mob, it'll play the song again.
In response to Xooxer
Xooxer wrote:
The sound() proc takes some more arguments you can use.

sound(file,repeat=0,wait,channel,volume)
file: A sound file to play repeat: 1 to play sound repeatedly wait: 0 to interrupt current sound on channel; 1 to wait in queue channel: 0 for any available channel, 1-8 for specific channel (wavs only) volume: 100 for full volume (default), 0 for none, or any value in between

You probably want this:

src<<sound("Bleach2.wma",0,0,1)

Also. keep in mind that since you're doing this in Mob Login(), it'll play the song every time someone switches their mob. Like, if they switch from a creatingcharacter temporary mob for logging in to their character mob, it'll play the song again.

that code doesn't work for me, the song won't play
In response to Kris13
Probably because the song doesn't exist in the directory at runtime. You're using double quotes (") when you probably want single quotes (')

src<<sound('Bleach2.wma',0,0,1)