Hi, i have create this simply script for fade in the music. This work 
i have a question for create a method for dont rewrite this code for any scene, how can done it?
i have try with this in the game.script
method MusicFade(Channel)
{
var volume ;
volume = Game.GetMusicChannelVolume(Channel);
for (volume=volume; volume>1; volume=volume-1)
{
Game.SetMusicChannelVolume(Channel,volume);
Game.Msg(volume);
Sleep(100);
}
}
and in the scene i have put code
Game.MusicFade(2);
but dont work
any idea..?
p.s. game.msg is only for check..

Code: WME Script
- var volume ;
- for (volume=volume; volume>1; volume=volume-1)
- {
- }
i have a question for create a method for dont rewrite this code for any scene, how can done it?
i have try with this in the game.script
method MusicFade(Channel)
{
var volume ;
volume = Game.GetMusicChannelVolume(Channel);
for (volume=volume; volume>1; volume=volume-1)
{
Game.SetMusicChannelVolume(Channel,volume);
Game.Msg(volume);
Sleep(100);
}
}
and in the scene i have put code
Game.MusicFade(2);
but dont work
any idea..?
p.s. game.msg is only for check..





Logged

how use method for done fadeIn e FadeOut of the music.