ID:138700
 
Code:
client/New()
CheckHost()
src << sound('test.wav',1)
world<<"<font color=green size= 1>[src] <font color=yellow>is logging in."
..()


Problem description:
The sound just isn't playing when at the title screen of the game. I've tried src and usr to no avail. Yes my sound is on and my setting for it is turned on in the preferences.

Also one more quick question, I haven't coded in a while and for some reason when I am laying down the images for my title screen the buttons aren't being placed on top of the title screen it is underneath it. How do I fix it so people can click the login buttons.

turf/login
ts1_create
icon = 'ts1_create.png'
density = 1
Click()
alert("welcome")
alert("Please choose which character you would like to play with now.")

Dbgtsuperfreak wrote:
Also one more quick question, I haven't coded in a while and for some reason when I am laying down the images for my title screen the buttons aren't being placed on top of the title screen it is underneath it. How do I fix it so people can click the login buttons.

> turf/login
> ts1_create
> icon = 'ts1_create.png'
> density = 1
> Click()
> alert("welcome")
> alert("Please choose which character you would like to play with now.")
>


You need to set the layer of the buttons otherwise they will sit underneath the other
In response to A.T.H.K
A.T.H.K wrote:
Dbgtsuperfreak wrote:
Also one more quick question, I haven't coded in a while and for some reason when I am laying down the images for my title screen the buttons aren't being placed on top of the title screen it is underneath it. How do I fix it so people can click the login buttons.

> > turf/login
> > ts1_create
> > icon = 'ts1_create.png'
> > density = 1
> > Click()
> > alert("welcome")
> > alert("Please choose which character you would like to play with now.")
> >


You need to set the layer of the buttons otherwise they will sit underneath the other

Ah duh thx. But what about my sound issue.
In response to Dbgtsuperfreak
Try activating the sound when the user logs in, as a test

mob/Login()
src << soundhere


http://www.byond.com/members/?command=reference&path=sound
In response to A.T.H.K
I've tried that too still doesn't work. I'm pretty sure byond plays .wav files but this is weird.

mob
Login()
src.loc=locate (8,8,1)
src << sound('test.wav',1)
Are there any other Login() codes in your programming?
Does src << 'test.wav' work?
Does test.wav actually make a sound?

Not asking this to make you sound stupid, but double checking because you never know.
Shouldn't it be like...
> client/New()
> CheckHost()
> src << browse_rsc('test.wav')
> src << sound('test.wav',1)
> world<<"<font color=green size= 1>[src] <font color=yellow>is logging in."
> ..()
>
I believe the problem is that the sound is being outputted in client/New()...before the creation of their mob. ( ..() ) I don't know if sound can be outputted to a client.

It could also be that it's being outputted too soon, seems like it'd play as soon as it connects, like, if you try to output text as soon as you connect, before the creation of the things you'd need to see the text, you won't see the text.
So it could be corrected by making the client a login mob and then switching to there actual mob when they have actually logged in?

or just play the sound after ..()
Hmm yeah That would work lol.