ID:270408
 
Im using a base code and in the code theres music, how do i put the music into the game? Please help.

Thanks in advance
usr << sound('soundfilenamehere.soundfileextensionhere',1)

//example
usr << sound('Overworld.mid',1)

The ,1 at the end of that causes it to repeat the song, leave it out if you don't want it to repeat. The current supported extensions are .mid and .wav
In response to Pyro_dragons
Pyro_dragons wrote:
> usr << sound('soundfilenamehere.soundfileextensionhere',1)
>
> //example
> usr << sound('Overworld.mid',1)
>

The ,1 at the end of that causes it to repeat the song, leave it out if you don't want it to repeat. The current supported extensions are .mid and .wav

Currently supported music types include MIDI (.mid or .midi), and module formats .mod, .it, .s3m, .xm, and .oxm. Supported sound effect formats include .wav, .ogg, .raw, .wma, and .aiff.*
In response to Derekjeterisgod
That's not what im confused about

How i get the files onto dream maker i cant do cause i havnt even got them on my PC cause im using a base code!
In response to Master Scar
Just put them in the game's folder so you can access them I showed you.
In response to Pyro_dragons
How do i put them into the folder?

Im new at this
In response to Master Scar
You.. Learn how to work with a computer? :/
In response to Mysame
I can do that XD

What folder do i put tthe music in and i cant save it cause it's on real player
In response to Master Scar
It needs to be .wav or .ogg , and you map if into your game folder.... Game folder= folder with the .dme
In response to Mysame
Ok iv'e got the dme file how do i map it in?
In response to Master Scar
find the song you want copy it and then paste it into the file >.>
In response to Yami_Marik0
I'm sure that all your songs are mp3's. Byond can't support that. So what I would do in your place is go on google, www.google.com, and search for perhaps mid file's or something. And after you get it, download it onto your desktop. After that just drag it into your game folder and use the code that PyroDragon gave you. An example would be...

Mob
Login()
usr << sound("Songname.mid,1")


Once again the 1 in the end means that the song will be played over and over again. The usr simply means that only you can hear it. Use world instead of usr to make the entire world here it. But I would keep it usr.

And if this doesn't help you i'll have to go hang myself. Hehe.

-~Bamrulez~-

In response to Bamrulez
Then please, hang yourself.
You're setting one hell of a brilliant example by giving him a Login() code without a parent proc and with usr abuse.
In response to Mysame
Mysame wrote:
Then please, hang yourself.
You're setting one hell of a brilliant example by giving him a Login() code without a parent proc and with usr abuse.

Mysame, I'm sure I speak for many when I say that you do not know EVERYTHING that you're talking about. From Lummox's "usr Unfriendly" article (Direct Quote):

"client/New() and mob/Login(); mob/Login() can't use usr safely if you call it manually or if character loading is used"

I do understand that you can't assume anything, but in this case, it goes both ways. He shouldn't be assuming that the person isn't doing any of the above, but you shouldn't assume that (s)he is doing any of the above.

The best thing to do in a situation like this is, instead of making comments like the one above ("Then please, hang yourself"), point them to an article (If there is one) or kindly explain why it's wrong.

Now then, to sum it all up:

1.) No one knows EVERYTHING about a language. (Even if they did write the interpreter, etc. Bugs do occur sometimes)
2.) It is unsafe to assume.
3.) Rather than making comments such as the one above, kindly explain and point them to an article (if there is one) or explain to them why their way is wrong. For all you know, the above person could already have many problems, and your post could drive them off the edge and cause them to commit suicide or do anything worse.
In response to Bamrulez
Bamrulez wrote:
I'm sure that all your songs are mp3's. Byond can't support that. So what I would do in your place is go on google, www.google.com, and search for perhaps mid file's or something. And after you get it, download it onto your desktop. After that just drag it into your game folder and use the code that PyroDragon gave you. An example would be...

Mob
> Login()
> usr << sound("Songname.mid,1")

Once again the 1 in the end means that the song will be played over and over again. The usr simply means that only you can hear it. Use world instead of usr to make the entire world here it. But I would keep it usr.

And if this doesn't help you i'll have to go hang myself. Hehe.

-~Bamrulez~-


Your example is a really bad one first of all. If you going to show examples, make sure they're right huh?

mob //when the player, DO NOT CAPITALIZE THE 'M'
Login() //logs in
src << sound('Loginsong.mid',1) //use src, DO NOT USE USR. 'No put usr in proc, ungh" -Lummox JR
..() //call the parent proc to continue and prevent errors


Do not capitalize the M first of all. Second, you do not put quotation marks around the whole thing, you only put apostraphies around the file. Any file must be surrounded pay apostraphies. Third, DO NOT use 'usr' in a proc. Use src, or define a variable for the mob you're refering to. Last, you have to call the 'parent' proc at the end of Login(), which would be ..()
In response to Audeuro
I think i understand, get a midi song then put it in my games folder and then code it in with the code i was given the second time
In response to Audeuro
Well wewt, I never said I knew ALL and I do know that 'usr' is safe in some instances, but see it from this point of view.
If 'usr' is not always the right thing to do, but 'src' is, why take the challenge?
In response to Mysame
src isn't always the right thing to do, either. In a custom-datum verb, it'll be the datum. In an obj verb, it'll be the obj.
In response to Audeuro
That's taking out of context, we're talking about mob/Login() here.
In response to Mysame
Well, just so we don't waste forum bandwith*, I guess we'll just stop this right now.

* - I could go on forever.
Page: 1 2