I Wanna Community
Fangames => Game Design => Programming Questions => Topic started by: Ario147 on October 24, 2015, 08:36:55 AM
-
So I have ,,S" save that has Collision with Player with code:
if keyboard_check_pressed(ord("S")){
if (saveTimer < 0 && instance_exists(player) == true) {
saveTimer = 30;
image_index = 1;
image_speed = 0.017;
saveGame(0);
sound_play(SaveSound);
}}
Everything works, but when the SaveSound is played it mutes music from my stage. Music is Use Multimedia Player and SaveSound is Normal Sound.
Help fix. :atkCry:
-
What is the SaveSound filetype? And what is in the SaveGame script?
-
All files are MP3, and SaveGame script is:
//�Q�[����Z�[�u
//�Z�[�u�f�[�^�Ȃǂ͊�{�I�Ƀo�C�i���`���ŕۑ�����Ă��܂�
var f,tem;
f = file_bin_open("save"+string(global.savenum),1);
tem = room;
file_bin_write_byte(f,floor(tem/10000));
tem -= floor(tem/10000)*10000;
file_bin_write_byte(f,floor(tem/100));
tem -= floor(tem/100)*100;
file_bin_write_byte(f,tem);
if(global.grav=0){
tem = player.x;
file_bin_write_byte(f,floor(tem/10000));
tem -= floor(tem/10000)*10000;
file_bin_write_byte(f,floor(tem/100));
tem -= floor(tem/100)*100;
file_bin_write_byte(f,tem);
tem = player.y;
file_bin_write_byte(f,floor(tem/10000));
tem -= floor(tem/10000)*10000;
file_bin_write_byte(f,floor(tem/100));
tem -= floor(tem/100)*100;
}else{
tem = player2.x;
file_bin_write_byte(f,floor(tem/10000));
tem -= floor(tem/10000)*10000;
file_bin_write_byte(f,floor(tem/100));
tem -= floor(tem/100)*100;
file_bin_write_byte(f,tem);
tem = player2.y;
file_bin_write_byte(f,floor(tem/10000));
tem -= floor(tem/10000)*10000;
file_bin_write_byte(f,floor(tem/100));
tem -= floor(tem/100)*100;
}
file_bin_write_byte(f,tem);
file_bin_write_byte(f,global.grav);
file_bin_close(f);
saveGameItem();
It's unchanged yuuutu script.
-
Sound effect can't be a MP3 or else it will overrride what is currently playing. Convert the sound effect to WAV and you'll stop having this problem. :atkHappy:
-
Sound effect can't be a MP3 or else it will overrride what is currently playing. Convert the sound effect to WAV and you'll stop having this problem. :atkHappy:
Thank you. :)
-
Oh, and wav file sizes are usually *REALLY* big compared to mp3s. If you're not okay with that, you might have to make them into .ogg files and use an external sound engine.