playsound() question
If I use the following script no sound is heard, but if I change the ¤t_sprite in playsound to 0, it works (but is not 3D). It makes no difference if the sound_set_vol() part is used or not.
How do I get the 3D effect to work?
void main (void)
{
sp_nodraw(¤t_sprite, 1);
sp_nohit(¤t_sprite, 1);
int &qfall = playsound(12, 22050, 0, ¤t_sprite, 1);
sound_set_vol(&qfall, -2750);
}
How do I get the 3D effect to work?
void main (void)
{
sp_nodraw(¤t_sprite, 1);
sp_nohit(¤t_sprite, 1);
int &qfall = playsound(12, 22050, 0, ¤t_sprite, 1);
sound_set_vol(&qfall, -2750);
}
Not sure, but you could try taking out the int &qfall and the sound_set_vol(&qfall, -2750);.
No difference, as I said (or meant to).
This does not work:
void main (void)
{
sp_nodraw(¤t_sprite, 1);
sp_nohit(¤t_sprite, 1);
playsound(12, 22050, 0, ¤t_sprite, 1);
}
and I can't just attach the sound in the editor because I want to make it quieter.
This does not work:
void main (void)
{
sp_nodraw(¤t_sprite, 1);
sp_nohit(¤t_sprite, 1);
playsound(12, 22050, 0, ¤t_sprite, 1);
}
and I can't just attach the sound in the editor because I want to make it quieter.
Erm... I dunno. Try switching the positioning of the sp_nodraw and sp_nohit with the playsound and set_sound_vol. I often find that making tiny little changes, like this, often work. For instance, once, my script was perfect, but it wasn't working. So I copied and pasted everything from it, into a new script. Deleted the old one, and renamed the new one. And it worked.
Who is the sound attached to? Seems like that's the problem.
If everything is commented out except playsound(12, 22050, 0, ¤t_sprite, 1); it still doesn't work.
It's just attached to a random sprite, a non-animated duck.
It's just attached to a random sprite, a non-animated duck.