Jump to content
  • 0
Tio Akima

soundeffect()

Question

Hello
 
does anyone know how to use the clif_soundeffect () function; in a skill?
 
the intention is to draw a sound effect.
 
tried the following:
 
clif->soundeffect(sd,&sd->bl,"teste.wav",type);
 
as a way to debug, I left out the file
the intention was to show the error which folder gets its sound (not found.)
to learn which folder is the correct
 
massss ... I did not succeed.
Nothing happens ...

Share this post


Link to post
Share on other sites

2 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 invoking

character only ('soundeffect') or multiple characters ('soundeffectall').

If the running code does not have an object ID (a 'floating' NPC) or is

not running from an NPC object at all (an item script) the sound will be

centered 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 the

client directly. It probably determines which directory to play the effect

from. 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 names

should also have a maximum length of 23 characters including the .wav

extension:

 

soundeffect "1234567890123456789.wav", 0; // will play the soundeffect

soundeffect "12345678901234567890.wav", 0; // throws gravity error

 

You can add your own effects this way, naturally.

 

So if you'll use

clif->soundeffect(sd,&sd->bl,"teste.wav",0);

it should play "datawavteste.wav".

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...

×
×
  • Create New...

Important Information

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