User Tag List

Results 1 to 4 of 4

Thread: First free sound channel starting from...

  1. #1
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleUnicode Add-on
    Boba Fonts's Avatar
    Join Date
    Jan 2009
    Location
    Northern Italy
    Posts
    228
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    First free sound channel starting from...

    As far as I know, on "play sound effect" MMF2 automatically uses the next free channel.
    I've decided to reserve channels #1-#3 to background music (usually only channel #1 will be actually playing something), channels #4-#7 to environmental looping sounds (and again, they will hardly be all four occupied at the same time), channels #8-12 to sound sources which volume depends on the distance from the player sprite, channel #13 to player footsteps. Channels #14-32 are totally free for occasional sounds.
    Now, how can I be sure that playing a new sound it won't interfere with the first 13 channels?
    Is it possible to tell MMF to play a certain sound "starting from channel #14" searching for the first free channel and avoiding to use any of the first 13?

  2. #2
    Clicker Fusion 2.5
    Fusion 2.5 (Steam)Fusion 2.5+ DLC (Steam)

    Join Date
    Apr 2012
    Posts
    377
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You could have it so that a sound is set to play on a specific channel, and when it is asked for the channel you enter a variable that has the minimum value of 13+1, and this value increases until it reaches the top limit at 32.

    So you'll have
    Set channel
    ChannelVariable("Object")+1

    If ChannelVariable("Object") is equal to 35 or greater
    set Channelvariable("Object" to 14.

    Did this come out right? It ought to work.

  3. #3
    Clicker Fusion 2.5
    Fusion 2.5 (Steam)Fusion 2.5+ DLC (Steam)

    Join Date
    Apr 2012
    Posts
    377
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here's an example mfa!
    Attached files Attached files

  4. #4
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleUnicode Add-on
    Boba Fonts's Avatar
    Join Date
    Jan 2009
    Location
    Northern Italy
    Posts
    228
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you for your example, Storsorgen, I'll test it immediatly!

Similar Threads

  1. BUG? Sound Channel Condition
    By tom79 in forum Android Export Module Version 2.0
    Replies: 5
    Last Post: 17th June 2013, 12:58 PM
  2. How to handle sound on same channel?
    By Outcast in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 16th November 2012, 09:07 AM
  3. Playing 'sound effects' on a specific Channel.
    By King_Cool in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 4th June 2012, 10:49 AM
  4. Sound channel question...
    By MattKapa in forum iOS Export Module Version 2.0
    Replies: 3
    Last Post: 17th January 2012, 08:48 AM
  5. randomize sound effects in a specific channel
    By 1234cb in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 23rd August 2011, 12:35 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •