Author Topic: [Glass+Blockland] Loading Screen Music + Main Menu Music  (Read 5542 times)

Loading Screen Music

When you join a server, the mod searches for songs (.ogg) in
Add-Ons/Music/LoadingScreen/.
and pick a song to play at random.

Should the folder not have any songs, it will randomly pick the following defaults:
After School Special
Peaceful
Piano Bass.

If the folder doesn't exist, create it yourself or run Blockland with the mod once to create it.

Blockland v1.0.2*



Main Menu Music

It will search Add-Ons/Music/MainMenu for .ogg songs, pick a song at random, and play it. Should the folder not have any songs, it will pick from the following default songs:
After School Special
Peaceful
Rock
Stress
Ambient Deep
Bass 1-3
Distort
Drums

Like in the Loading Screen add-on, if the folder doesn't exist, it will be created.

Main Menu Music* **


*I took the liberty of making it check if Glass exists instead of having two versions of the same mod.
**Since the Main Menu GUI doesn't actually use onWake and onSleep, the check is on the buttons.
« Last Edit: January 23, 2017, 05:04:41 PM by Pastrey Crust »




when I join a server it shows the popup saying "now loading - /loadingscreen/songname.ogg" but no music plays

also console error - unable to find function clientcmdstopmusic
« Last Edit: January 23, 2017, 04:24:31 PM by Perry »

when I join a server it shows the popup saying "now loading - /loadingscreen/songname.ogg" but no music plays
yay, first bug!

What does the console say? Does it print an error?

Ok, for some reason, it isn't executing the functions. Give me a min.

Aha. This
Code: [Select]
if(isFile("Add-ons/Client_2DMusic.zip"))
{
exec("./Functions.cs");
} else {
exec("Add-Ons/Client_2DMusic/client.cs");
}

should be

Code: [Select]
if(!isFile("Add-ons/Client_2DMusic.zip"))
{
exec("./Functions.cs");
} else {
exec("Add-Ons/Client_2DMusic/client.cs");
}

Reuploading in a sec.
« Last Edit: January 23, 2017, 04:26:49 PM by Pastrey Crust »

yay, first bug!

What does the console say? Does it print an error?

Ok, for some reason, it isn't executing the functions. Give me a min.
sorry i just realized my music was over 1mb. the only console error is clientcmdstopmusic

sorry i just realized my music was over 1mb.
Doesn't matter.

Reuploaded to Dropbox. Try redownloading the mod.

wow I actually have an old add-on just like this except that it just plays 1 specific song
can you make a different version for the main menu

can you make a different version for the main menu
Sure. Should it pull songs from the load screen folder or make another folder?

Sure. Should it pull songs from the load screen folder or make another folder?
make another

that said, can you make it support wav's and other file types?

that said, can you make it support wav's and other file types?
Probably can as I've seen client mods play wav sounds. I'll look into it.

Definitely can. Only thing is other modders bitching about using eval in the code but I can't find a way around it.

Found a way around it lmao.

no, nevermind. It's not working. I'll do it later.
« Last Edit: January 23, 2017, 05:44:33 PM by Pastrey Crust »

There's a bug with TheBlackParrot's music player.
It shows all the songs in the LoadingScreen folder as "LoadingScreen/[songname]"
Any way you can prevent it from recognizing those files?

Client_MusicPlayer download

There's a bug with TheBlackParrot's music player.
It shows all the songs in the LoadingScreen folder as "LoadingScreen/[songname]"
Any way you can prevent it from recognizing those files?

Client_MusicPlayer download
There probably is. I'll look into it.