The Dink Network

Reply to Re: Sound commands in FreeDink

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
May 23rd, 09:23 AM
custom_robj.png
Robj
Jester Male Australia
You feed the madness, and it feeds on you. 
I figured this out and am putting this here because it is definitely helpful.

It is not the commands that are broken. It is the way FreeDink stores the soundbank numbers.
For some reason FreeDink stores the soundbank number+1, thus you need to subtract 1 from the value returned before killing it off.

i.e:
int &soundbank = playsound(23, 22050, 0, 0, 0);
&soundbank -= 1;
wait(1000);
sound_set_kill(&soundbank);


Same obviously goes for using any sound command that uses a soundbank number.

Using my Version Checker Dmod, you can check and alter your scripts based on the version the player is using to assure sounds don't break based on this.