MFGG Forums
  • Home
  • Members
  • Help
  • Search
MFGG Main Site MFGG Forums MFGG Developer Discussion v
« Previous 1 … 10 11 12 13 14 … 16 Next »
(solved) audio_sound_gain not working on included audio files
MFGG Forums MFGG Developer Discussion v
« Previous 1 … 10 11 12 13 14 … 16 Next »
(solved) audio_sound_gain not working on included audio files
MFGG Forums MFGG Developer Discussion v
« Previous 1 … 10 11 12 13 14 … 16 Next »
(solved) audio_sound_gain not working on included audio files
Mark All Posts Read Today's Posts

(solved) audio_sound_gain not working on included audio files
United States CGWorks
Hammer Bro
Members
#1
08-06-2018, 09:18 PM (This post was last modified: 08-06-2018, 09:32 PM by CGWorks.)
EDIT: Nevermind rofllllllll i don't understand WHY but changing the time argument in the audio_sound_gain() function from 1 to 0 fixed it lol


Hey there, my problem is pretty much in the thread title. I've been using
Code:
audio_sound_gain(index, volume, time)
for a while now for some ambient sound effects in my project with no problems, but i decided to add further ambient sound effects as included files. I'm using
Code:
audio_create_stream(filename)
to load and play the sound effects. I get the sounds to play just fine, but now the audio_sound_gain function doesn't work on them anymore - now sounds like a creek are locked at 1 (max volume/gain) instead of fading smoothly from 0 to around 0.5 for example (based on distance to the player). Essentially, the audio_sound_gain function doesn't seem to work anymore now that i've moved some of the larger ambient sound effects to included files

Can anyone help?

  ↳
United States ReinlynxPSI
Dragon Lady
Main Site Moderator
Forum Moderator Main Site Moderator Submitter Iso Collab Contributor (2) Minigame Comp Runner-Up Drawing Comp Runner-Up Drawing Comp Top 5 NCFC Contributor Secret Santa (2) Holiday Tree MFGG 18th Anniversary
#2
08-09-2018, 10:14 PM
(08-06-2018, 09:18 PM)smbmaster99 Wrote: EDIT: Nevermind rofllllllll i don't understand WHY but changing the time argument in the audio_sound_gain() function from 1 to 0 fixed it lol

My guess is that it works like the alarm events; the 0th frame is the "trigger" frame, which means that setting the step count to 0 sets it to the trigger frame without it activating.
WarioWarioWario OBEY WARIO WarioWarioWario
Huh?Huh?Huh? DESTROY MARIO Huh?Huh?Huh?

  ↳
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



  • View a Printable Version
Forum Jump:

Mario Fan Games Galaxy - Powered by MyBB | MFGG Staff | Contact Us

Linear Mode
Threaded Mode