ID:263892
 
Code:
mob/Login()
src.title_music()
src.loc = locate(55,9,3)
src.client.view=8


Problem description:
at the title screen its put music,and thats good but when i use the load button its using music again(the same file)
if you need to see the title music proc just say so

Login() is called whenever a client changes mobs. client/New() is called when somebody logs in.
Sasuke_EX wrote:
Code:
> mob/Login()
> src.title_music()
> src.loc = locate(55,9,3)
> src.client.view=8
>

Problem description:
at the title screen its put music,and thats good but when i use the load button its using music again(the same file)
if you need to see the title music proc just say so

but how can i fix it? change the mob/login()
to client/new()?
In response to Sasuke_EX
uh does it overlap the music is it doesn i think you need to nul the sound maybe?
In response to Sasuke_EX
Yes.
In response to StevieMan
yeah it overlap the music how i can nul the sound? o rdo what you just said
In response to Garthor
ok listen ive doing this(sorry to bumb this)
client/New()
..()
src.title_music()

but i get "src.title_music:undefined proc"
error when compile

any ideas?(if i put only one music its good but i want a random music at title)
In response to Ami425
You need to write the client/title_music() proc.
In response to Garthor
you need to see the title music proc?
cause i dont really get where to write the title_music

anyway i maked it like this

client/proc

title_music()


client/New()
..()
src.title_music()

now i dont get any errors but i dont hear the music
In response to Ami425
A client is not a mob.
You can't use anything but client procedures with them.

What you can do, however, is run the mob procedure on the client's mob.
client/New()
..()
mob.title_music()


Look up the mob variable (for clients) for more information on that.
In response to Keeth
Keeth wrote:
A client is not a mob.
You can't use anything but client procedures with them.

What you can do, however, is run the mob procedure on the client's mob.
> client/New()
> ..()
> mob.title_music()
>

Look up the mob variable (for clients) for more information on that.
umm i do hear the music but its still replay the music while loading the char

lets say when loggin to the game its active me music1.ogg
and when loading its active me music5.ogg and still play music1.ogg
so i hear double music
anyway to fix it?
In response to Ami425
Include the channel the sound should be played on.
I'm pretty sure if you play a sound on the same channel, it stops the previous sound.
In response to Keeth
and how am i suppose to do this?
In response to Keeth
Clients can be given procs. In fact, it conceptually makes more sense for this to be a client proc than a mob proc, because it only affects clients.
In response to Garthor
I meant, procedures for certain objects can only be called on those certain objects.
What he has is a mob procedure, and he's trying to use it on a client object.
In response to Ami425
Look the the reference for the sound objects.
In response to Keeth
What he posted was a client proc. He didn't post any body, though, so my guess was that it was using usr, which probably screwed it up.
In response to Garthor
I assumed it was a mob procedure, and then when you told him to define it for clients, he thought simply defining the procedure's name would make it work.