Create Event:
execute code:
sound_stop_all();
SS_StopSound(curMusic);
filePlaying = 101;
curMusic = BGM_BOSS1;
if !global.audio_music_muted{
if !SS_IsSoundPlaying(curMusic){
SS_SetSoundVol(curMusic,2000+80*global.audio_music_volume);
SS_LoopSound(curMusic);
}
}
loop_start = 50.157;
loop_end = 78.570;
song_length = 87.098;
song_byte = SS_GetSoundLength(curMusic);
Step Event:
execute code:
if SS_GetSoundPosition(curMusic)/song_byte > loop_end/song_length{
SS_SetSoundPosition(curMusic,loop_start/song_length*song_byte);
}
效果不错
execute code:
sound_stop_all();
SS_StopSound(curMusic);
filePlaying = 101;
curMusic = BGM_BOSS1;
if !global.audio_music_muted{
if !SS_IsSoundPlaying(curMusic){
SS_SetSoundVol(curMusic,2000+80*global.audio_music_volume);
SS_LoopSound(curMusic);
}
}
loop_start = 50.157;
loop_end = 78.570;
song_length = 87.098;
song_byte = SS_GetSoundLength(curMusic);
Step Event:
execute code:
if SS_GetSoundPosition(curMusic)/song_byte > loop_end/song_length{
SS_SetSoundPosition(curMusic,loop_start/song_length*song_byte);
}
效果不错