code is
mob/Login()
src<<sound("Bleach2.wma",0)
src.loc = locate(9,9,1)
src.client.view=8
ID:160064
Nov 23 2008, 8:44 pm
|
|
im having trouble doing this, it either repeats when clicking new,load,or delete and the song overlays or everyone hears it when someone logs in
code is mob/Login() |
In response to Mobius Evalon
|
|
Mobius Evalon wrote:
Kris13 wrote: mob/Login() I'm going to assume that your login system uses two types of mobs, one for performing the login process and one for playing the game. mob/Login() is called every time a client connects to a mob, which means that each player hears the WMA file upon initially connecting to the server, and again after fully logging in. when i change it to client/New(), it makes the src codes all errors along with some of my mob codes |
In response to Kris13
|
|
Don't post the same topic in two different forums. Stick to the Code Problems one, since this isn't really a How-To question. You already have working code, but it's not quite right, so this is a code problem, not a how to problem.
|
I'm going to assume that your login system uses two types of mobs, one for performing the login process and one for playing the game. mob/Login() is called every time a client connects to a mob, which means that each player hears the WMA file upon initially connecting to the server, and again after fully logging in.
As such, the solution is quite easy -- client/New() is called exactly once when the player first connects to the server, and seems like it would be a terrific place to play music for a login screen.
You might also want to investigate the sound datum's channel var, so you can have an easier time stopping the play of login music later.