Gendai: Can you answer...about sounds/music.

rebumprebump Member Posts: 1,058
edited November -1 in Working with GS (Mac)
I was just wondering about something regarding when we implement volume control in our games. Sometimes we implement a "mute" button and/or volume slider(s) that can mute when slid all the way down to zero. Often, we use "0" (zero) to represent "mute" is on -or- a volume level where no sound/music behavior should be heard. The attribute that contains this value is obviously used in the "volume" sub-attribute of a "play sound" or "play music" behavior.

My question is...if that attribute is indeed set to zero, is the "play sound" and "play music" behavior smart enough to abort or does the sound still play only at an inaudible volume?

I would hope you have it abort but if not (and until it does) I'd like to know if we should wrap it in a rule to avoid it using processor time unnecessarily playing an unheard sound.

Comments

  • BarkBarkCoBarkBarkCo Member Posts: 1,400
    I know you are looking for an answer from Gendai...

    I would imagine it would work just like the iPod volume control, in that 0 means play inaudibly...

    The rule idea seems like the way to go.

    `
    Rule: If volume > 0
    - Play Music
    `
  • JGary321JGary321 Member Posts: 1,246
    I would love to know this as well. I wrapped all my action type sound effects in a rule to only play when mute was off, just in case. Would save quite a bit of time/effort if that wasn't necessary.
  • rebumprebump Member Posts: 1,058
    @barkbark: Yeah, I know how to wrap it in such logic but was wondering if it was something we could maybe strip from our behavior sets if it was already being done and save a few behavior executions here and there as well as the time needed to add them on new project actors.
  • BarkBarkCoBarkBarkCo Member Posts: 1,400
    Oh, I believe you know how it would be done. i was just posting that little bit in case someone with a limited understanding of what was being discussed had questions.
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    I guess an easy way round it is that when the Playvolume variable is 0, rather than chancing that the playback is still being processed even though not heard, perhaps set 0 volume as Pause Music (or even Stop Music). When the user puts the volume up again at a later time, it probably wouldn't matter that it's started from the beginning to him/her.

    ---------------------------------------------------------------
    Spiral Gyro Games

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

Sign In or Register to comment.