The following warnings occurred:
Warning [2] Undefined array key "lockoutexpiry" - Line: 94 - File: global.php PHP 8.4.12 (Linux)
File Line Function
/global.php 94 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "lockoutexpiry" - Line: 573 - File: global.php PHP 8.4.12 (Linux)
File Line Function
/global.php 573 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $can_access_moderationqueue - Line: 752 - File: global.php PHP 8.4.12 (Linux)
File Line Function
/global.php 752 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 892 - File: global.php PHP 8.4.12 (Linux)
File Line Function
/global.php 892 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 892 - File: global.php PHP 8.4.12 (Linux)
File Line Function
/global.php 892 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $awaitingusers - Line: 34 - File: global.php(959) : eval()'d code PHP 8.4.12 (Linux)
File Line Function
/global.php(959) : eval()'d code 34 errorHandler->error
/global.php 959 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 1024 - File: global.php PHP 8.4.12 (Linux)
File Line Function
/global.php 1024 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5327 - File: inc/functions.php PHP 8.4.12 (Linux)
File Line Function
/inc/functions.php 5327 errorHandler->error
/global.php 1024 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.4.12 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.4.12 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.4.12 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.4.12 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.4.12 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.4.12 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.4.12 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.4.12 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



2DWorlds Forums
How do I add custom music to my server? - Printable Version

+- 2DWorlds Forums (http://2dworlds.buildism.net/forum)
+-- Forum: 2DWorlds (http://2dworlds.buildism.net/forum/forumdisplay.php?fid=4)
+--- Forum: Help (http://2dworlds.buildism.net/forum/forumdisplay.php?fid=21)
+--- Thread: How do I add custom music to my server? (/showthread.php?tid=729)



How do I add custom music to my server? - Oak - 03-17-2013

I've always wanted to know how.


RE: How do I add custom music to my server? - Ghosty - 03-17-2013

Create Sound object in game. Name it "BGM" and put it directly in the world.

Add an MP3, WAV, or MIDI sound link to the Sound property of the Sound.

Whenever you want it to play, call this line somewhere in a script:

game.World.BGMConfusedtop()
sleep(0.1)
game.World.BGM:play()


If you just want it to play in your server, type "game.World.BGMConfusedtop() game.World.BGM:play()" into the Lua console of the server.


RE: How do I add custom music to my server? - Oak - 03-17-2013

(03-17-2013, 11:34 PM)Ghosty Wrote: Create Sound object in game. Name it "BGM" and put it directly in the world.

Add an MP3, WAV, or MIDI sound link to the Sound property of the Sound.

Whenever you want it to play, call this line somewhere in a script:

game.World.BGMConfusedtop()
sleep(0.1)
game.World.BGM:play()


If you just want it to play in your server, type "game.World.BGMConfusedtop() game.World.BGM:play()" into the Lua console of the server.

So lets say I make a music track or whatever, and wanna upload it into my game/server, how would I enter that link or source file into the Lua console of the server? Be more specific.


Also, can I use an already made song/track? Or would I risk copyright infringements?


RE: How do I add custom music to my server? - Ghosty - 03-18-2013

You can't just upload it to the server. It has to be hosted somewhere on the net.

Like, for example, one of these files:

http://keybored.x10.mx/musicdata/bdsmmidi/

Then, add the link to the Sound property of the Sound object.

If you need to create it through a script, here's an example:

s = create("Sound"); s.Name = "BGM"; s.Parent = game.World; s.Sound = "http://keybored.x10.mx/musicdata/bdsmmidi/Axel_F_Remix.mp3"

Then, use that script I posted above.