User Tag List

Results 1 to 6 of 6

Thread: Changing volume depending on distance to object?

  1. #1
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,237
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)

    Changing volume depending on distance to object?

    In my game i have water at the bottom of the game area and i want the volume of the water to adjust depending on how close or far away the character is. RIght now I have a always event ; set water volume to Y( "character" )-480 , but this dont work so well.. the volume does change when close and moving slowly away, but its very very fast goes from no volume to full volume.. is there a better way to do this?

  2. #2
    Forum Moderator

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,773
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    Check out the example on my website named Distance Volumn Example.

    Link:
    http://www.castles-of-britain.com/mm...plespage19.htm

    Marv
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

  3. #3
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,237
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Thank you very much Nivram! Is it possble to explain the event for a greeny? ( I dont know if it will be a problem if I have more then 1 of the same active that the sound is changing toward? The water is made up by like 10 actives in a row) I dont know anything about Sin Con Pow and all these other signs. :p

    100-(Abs(Sqr((X( "Active" )-X( "Active 2" )) pow 2+(Y( "Active" )-Y( "Active 2" )) pow 2)))/3.5

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    Fanotherpg's Avatar
    Join Date
    Jul 2006
    Location
    High Wycombe, Buckinghamshire, UK
    Posts
    3,663
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use Looki OpenAL extension?

  5. #5
    Clicker Fusion 2.5 DeveloperiOS Export Module
    ChrisBurrows's Avatar
    Join Date
    May 2011
    Location
    Tasmania, Australia
    Posts
    622
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

  6. #6
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)
    As a suggestion, you can create invisible active objects that trigger sound as well. That way you are only testing one object for your water sound and you can resize it to whatever you need it to be without affecting the visuals.

Similar Threads

  1. Volume keys should change multimedia volume
    By qenio in forum Android Export Module Version 2.0
    Replies: 2
    Last Post: 14th October 2012, 09:56 AM
  2. Redirect depending on text
    By jameswsparker in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 19th September 2011, 03:00 PM
  3. Master Volume, Channel Volume, Sound Volume
    By BHGames in forum iOS Export Module Version 2.0
    Replies: 14
    Last Post: 18th December 2010, 12:11 PM
  4. Volume based on distance
    By ELCGames in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 27th November 2010, 09:50 PM
  5. Volume Based on Distance
    By InsertNameHere in forum File Archive
    Replies: 5
    Last Post: 25th July 2008, 07:40 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
  •