ID:273829
 
how would i code this
mob
login()
world<<sound('music.wav',1)


cause i tried it but it wont work
"When you're ready to play the sound, just send it to a player like so:"

var/sound/S = sound('bubbles.wav')
usr << S


In response to Kyle_ZX
That's the same thing he's doing up there. But he's not storing the sound object in a variable which should be fine as long as he doesn't hope to access it anymore. It's just that I'm not sure if that's the actual code he's putting in. login() is not an actual proc Login() is though.
Try something like this:
mob
[tab]Login()
[tab][tab]..()
[tab][tab]src<<sound('music.wav',1)

..() basically calls the parent proc so the player logs in correctly and login() does not exist.E

EDIT: Removed world, didn't catch that :O
In response to ExPixel
I would also like to point out that in the original code the attempt to send the sound to world (If it were coded properly) might cause a few issues for people who are still hearing the sound from before. If you want to send a sound to world, make sure you either null the sound of everyone in world before, then have it play again, or make the people in world exempt from hearing the music play again (Which means you pretty much just want to send the sound to the src.)
mob
Login()
usr << sound('somesound.wav', repeat=1)


This will play only to the mob that logs in...each time a new character logs in it will play for the new character and will continue playing until they close the game or you ouput:

usr <<sound(null)
In response to Bhill1
i have one weird problem though when i put in mob/login() it always makes me have a black map but without it map loads fine

mob/Player
icon='Base.dmi'

//Hub Info//
mob/Login()
world<<"[src] has just logged on"
usr << sound('derp.wav', repeat=1)
world
hub = "Xavion Zenovka.RealmofZenxonica"//Your hub here
view="32x32"
tick_lag = 1
loop_checks = 0
name="Realm of Zenxonica"
status="<font size=2><font=yikes><b><i><u><font color=red>Version 1.0"
mob = /mob/Player


What am i doin wrong exactly
In response to Xavion_Zenovka
nvm i think i fixed it i added in src.loc=locate(1,1,1) and it made the map now appear