User Tag List

Results 1 to 7 of 7

Thread: Play random sample

  1. #1
    RayMarble
    Guest

    Play random sample

    I have an event that plays a tiny bleep every time it's executed. Is there a way to make it play a random sound from a pool of say 5 samples?

    My first idea was to get a sample from appdir + apppath + name of the sample + random number from 1-10 and just name the samples

    name of the sample 001
    name of the sample 002
    etc
    but it can't work since there's no "use calculation" when selecting files? Is there some other way to do it?

  2. #2
    RayMarble
    Guest

    Re: Play random sample

    ok I gave up and just tried to change the attributes of the sample before it's played (volume, frequency). So I set it like:

    (event happens):
    Change volume of the sample to random 40-60%
    Change frequency of the sample to 30-70%
    Play sample.

    but the settings have absolutely no effect? If I put them in a different order:

    (event happens):
    Play sample
    Change volume of sample to random 40-60%
    Change frequency of sample to 40-60%

    then only every second activation of sample is affected? Why would that be?

  3. #3
    Clicker Multimedia Fusion 2
    dragonguy's Avatar
    Join Date
    Apr 2008
    Location
    RULE BRITANNIA!
    Posts
    3,071
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Play random sample

    I think this may be a bug of some sort.

  4. #4
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Jun 2006
    Posts
    6,773
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Play random sample

    You could try using the Onu extension instead of MMF2's build in sounds.

  5. #5
    Clickteam Clickteam
    Olivier's Avatar
    Join Date
    Jun 2006
    Posts
    3,000
    Mentioned
    9 Post(s)
    Tagged
    1 Thread(s)

    Re: Play random sample

    Maybe try this?

    (event happens):
    Play sample

    (event happens):
    Change volume of sample to random 40-60%
    Change frequency of sample to 40-60%

    Or this?

    (event happens):
    Change volume of sample to random 40-60%
    Change frequency of sample to 40-60%

    (event happens):
    Play sample

  6. #6
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    OldManClayton's Avatar
    Join Date
    Aug 2006
    Posts
    193
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Play random sample

    OR. Set value to random (4) + 1

    Value = 1; play sample 1 set value back to 0
    Value = 2; play sample 2 set value back to 0
    etc.

  7. #7
    RayMarble
    Guest

    Re: Play random sample

    Thanks for the help guys, really appreciate it!

    Onu extension... Unfortunately I've never heard of it and this playinmg samples task is something so simple that I want to learn how to do without extensions. Don't want to get addicted to extensions so early in my, er, programming career
    (Edit: heh just as I was typing this... problems!)

    Breaking the events and trying to rearrange them is very tempting but in case I bump into another weird thing I know I'll just waste more time in trying to understand why it doesn't work as I expect it to and, worst of all, probably won't learn anything in the end.

    The "OR. Set value to random (4) + 1" is probably the simplest one so I'll go with that (how did something so obvious escape me we'll never find out!). Ta!

Similar Threads

  1. Play sample every 00.10 second
    By Popcorn in forum Android Export Module Version 2.0
    Replies: 10
    Last Post: 7th May 2012, 09:18 PM
  2. Why won't it play the sample!?
    By Sambo in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 1st May 2012, 12:22 AM
  3. play sample when another sample has finished?
    By edward in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 9th October 2006, 02:55 PM
  4. Order of "play sample" and "set sample volume".
    By Nifflas in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 26th September 2006, 07:07 AM

Posting Permissions

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