here's an updated dropbox link because mr bilesky asked me for a new version.
this is apparently version 1.0.0.4.
so just putting that out there before i start doing stuff.
...
i'm not very good at making physical sound effects.
i'm trying to manipulate the drum effects to try and make footsteps and stuff but it doesn't sound great.
i might want want to try and find some way to record some footstep effects.
what i have done today though, was get that sound button working.
100%
80%
0%
and then when you click it again it loops back to 100%
i'm a little proud of how i did this cause i think it's clever.
i've got a global variable of "volume" which i use as a decimal modifier.
so in this code for the sound button:
if (volume==0){
volume=1;
audio_play_sound(sfx_menu_click,10,false);
}
else{
volume=volume-0.2;
audio_play_sound(sfx_windowed_mode,10,false);
}
if the volume is at 0, or 0%, it jumps it up to 1, or 100%.
any other time you click the button, it lowers the modifier by 0.2, or 20%.
and when in use it looks sort of like this;
audio_sound_gain(bgm_hubworld,(0.4*volume),0);
this code sets the audio file to 40% by default, because i made it a bit too loud.
then it's multiplied by the volume modifier, which could be 100% - 0%, with intervals of 20%.
then, back to the sound button.
it changes sprite with this code in the step event.
image_index=volume*5;
so if the volume is 1, image index is 5, with 5 dots filled in.
if volume is 0.4 (40%) image index is 2, with 2 dots filled in.
tomorrow i'll see if i can make some more sfx, either with software or by recording stuff.
No comments:
Post a Comment