User Tag List

Results 1 to 4 of 4

Thread: Every (multiple of) ms into a sample...

  1. #1
    No Products Registered

    Join Date
    Dec 2015
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Every (multiple of) ms into a sample...

    I'm trying to make a rhythm game and I want something to happen every few hundred milliseconds of a sample being played. I put a counter in and I used this expression: SamplePosition("Sample"). I was able to have the counter display that number of milliseconds.

    I don't really know where to go from here, or if I had put in an extra step for no reason (sorry, I'm a noob). I tried typing out the first 5 multiples separated by commas, but it seems that the fps wasn't high enough to display every single number of milliseconds, and it only did what I wanted it to do every umpteenth try.

    Any help would be appreciated. (How do I get the expression to include multiples of a number, instead of having to type out every single one?)

  2. #2
    Clicker Multimedia Fusion 2 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)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try this

    + 'Sample Position' mod 50 = 0
    -> [Action]

    ( 'mod' is another one of + - * /. What it does it takes a number, divides it by another number, and your left with the reminder, example 5 mod 3 = 2 )

  3. #3
    No Products Registered

    Join Date
    Dec 2015
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Did I mention I'm a noob? I don't know what you mean by that.

  4. #4
    Clicker Multimedia Fusion 2 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)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Create a new Event, and ad this Condition to the Event:

    - Special -> Compair Two Genaral Values -> SamplePosition( >Enter Sample Name< ) mod X equals 0... ( X being the nr of milliseconds between each Action, so enter a number in milliseconds and not 'X' )
    ( some Object actions are "hidden" behind the 'Compair Two Genaral Values' condition )

    Then create a new Action for the Event you just created, what that action should be is up to you.

    ...
    This will make 'something' happen 'every X millisecound' as the specific Sample plays ( as opposed to every X milliseconds in general ).

Similar Threads

  1. Multiple homing missiles with multiple targets
    By royalcrown28 in forum Fusion 2.5
    Replies: 3
    Last Post: 21st September 2015, 06:51 AM
  2. BUG: Resume sample action restarts the sample
    By mobichan in forum SWF/Flash Export Module Version 2.0
    Replies: 10
    Last Post: 4th September 2011, 02:13 PM
  3. Multiple Turret Shooting With Multiple Targets
    By Brandon in forum File Archive
    Replies: 4
    Last Post: 29th January 2008, 02:34 AM
  4. 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
  5. 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
  •