Jump to content
  • 0
Sign in to follow this  
Kei

about bgm

Question

11 answers to this question

Recommended Posts

  • 0
*soundeffect "<effect filename>",<type>;*soundeffectall "<effect filename>",<type>{,"<map name>"}{,<x0>,<y0>,<x1>,<y1>};These two commands will play a sound effect to either the invokingcharacter only ('soundeffect') or multiple characters ('soundeffectall').If the running code does not have an object ID (a 'floating' NPC) or isnot running from an NPC object at all (an item script) the sound will becentered on the character who's RID got attached to the script, if any.If it does, it will be centered on that object. (an NPC sprite)Effect filename is the filename in a GRF. It must have the .wav extension.It's not quite certain what the 'type' actually does, it is sent to theclient directly. It probably determines which directory to play the effectfrom. It's certain that giving 0 for the number will play sound files from'datawav', but where the other numbers will read from is unclear.The sound files themselves must be in the PCM format, and file namesshould also have a maximum length of 23 characters including the .wavextension:soundeffect "1234567890123456789.wav", 0; // will play the soundeffectsoundeffect "12345678901234567890.wav", 0; // throws gravity errorYou can add your own effects this way, naturally.

Share this post


Link to post
Share on other sites
  • 0

 

*soundeffect "<effect filename>",<type>;*soundeffectall "<effect filename>",<type>{,"<map name>"}{,<x0>,<y0>,<x1>,<y1>};These two commands will play a sound effect to either the invokingcharacter only ('soundeffect') or multiple characters ('soundeffectall').If the running code does not have an object ID (a 'floating' NPC) or isnot running from an NPC object at all (an item script) the sound will becentered on the character who's RID got attached to the script, if any.If it does, it will be centered on that object. (an NPC sprite)Effect filename is the filename in a GRF. It must have the .wav extension.It's not quite certain what the 'type' actually does, it is sent to theclient directly. It probably determines which directory to play the effectfrom. It's certain that giving 0 for the number will play sound files from'datawav', but where the other numbers will read from is unclear.The sound files themselves must be in the PCM format, and file namesshould also have a maximum length of 23 characters including the .wavextension:soundeffect "1234567890123456789.wav", 0; // will play the soundeffectsoundeffect "12345678901234567890.wav", 0; // throws gravity errorYou can add your own effects this way, naturally.

 

can i change the extension to mp3 instead of wav?

Share this post


Link to post
Share on other sites
  • 0

Nope. You can also use playbgm, but keep in mind they do different things:

 

*playBGM "<BGM filename>";*playBGMall "<BGM filename>"{,"<map name>"{,<x0>,<y0>,<x1>,<y1>}};These two commands will play a Background Music to either the invoking character only ('playBGM') or multiple characters ('playBGMall').BGM filename is the filename in /BGM/ folder. It has to be in .mp3 extension, but it's not required to specify the extension in the script. If coordinates are omitted, BGM will be broadcasted on the entire map. If the map name is also omitted the BGM will be played for the entire server.You can add your own BGMs this way, naturally.

Share this post


Link to post
Share on other sites
  • 0

 

Nope. You can also use playbgm, but keep in mind they do different things:

 

*playBGM "<BGM filename>";*playBGMall "<BGM filename>"{,"<map name>"{,<x0>,<y0>,<x1>,<y1>}};These two commands will play a Background Music to either the invoking character only ('playBGM') or multiple characters ('playBGMall').BGM filename is the filename in /BGM/ folder. It has to be in .mp3 extension, but it's not required to specify the extension in the script. If coordinates are omitted, BGM will be broadcasted on the entire map. If the map name is also omitted the BGM will be played for the entire server.You can add your own BGMs this way, naturally.

 

thanks also is it possible to make a playlist for it? like when the first song finished playing another song will play and so on..

Share this post


Link to post
Share on other sites
  • 0

Yes and no. Not as the scripting language is, but you can make an array that specifies how many milliseconds a sonw will take to play, then when it's finished make it autoplay the next or another one.

Share this post


Link to post
Share on other sites
  • 0

Answered already,

.wav = data/wav

.mp3 = /BGM

 

and if you read Mumbles description it says

 

Description:

A radio NPC that plays preset selection of client-side songs (these songs are to be placed in the 'BGM' folder).

Sometimes try to read first :)

Edited by sevenzz23

Share this post


Link to post
Share on other sites
  • 0

sorry i didn't see that .. btw i have a error

 

 

[Warning]: Unexpected type for argument 1. Expected variable, got C_STR.[Debug]: Data: string value="'As long as you love me' by Ohayou:"[Debug]: Function: set[Debug]: Source (NPC): Hercules Radio at prontera (164,158)[Error]: script:set: not a variable[Debug]: Data: string value="'As long as you love me' by Ohayou:"[Debug]: Source (NPC): Hercules Radio at prontera (164,158)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.