S
Spongyoshi
Guest
Hello! I have a problem with sound_volume in GM8.1
I have an objet that, when created, checks the value of the current event and gets the corresponding bgm in his variable "MyMusic" then plays it with sound_loop(MyMusic);
Afterward, I want to adjust the volume depending of another variable called MyCut to silence the music when needed (like when getting an item with it's own theme) with the following code:
The problem is that it doesn't work, the music doesn't change volume at all
Did I do something wrong? Is there something else I should address? Have another way of doing it?
Thanks for reading and I hope you can help me out! I'm getting close to ending my project and this error is a pain for me... I don't understand it! Especially since I already use sound_volume in my project and it works well!
I have an objet that, when created, checks the value of the current event and gets the corresponding bgm in his variable "MyMusic" then plays it with sound_loop(MyMusic);
Afterward, I want to adjust the volume depending of another variable called MyCut to silence the music when needed (like when getting an item with it's own theme) with the following code:
Code:
if (MyCut == 0)
{sound_volume(self.MyMusic,1);}
if (MyCut == 1)
{sound_volume(self.MyMusic,0);}
Did I do something wrong? Is there something else I should address? Have another way of doing it?
Thanks for reading and I hope you can help me out! I'm getting close to ending my project and this error is a pain for me... I don't understand it! Especially since I already use sound_volume in my project and it works well!