User Tag List

Results 1 to 9 of 9

Thread: How to wait a certain amount of time?

  1. #1
    Clicker Fusion 2.5HTML5 Export ModuleiOS Export ModuleSWF Export Module

    Join Date
    Jul 2006
    Location
    California
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to wait a certain amount of time?

    Hello, this is (maybe) a simple question. What's the best way to have an event occur after waiting for a certain amount of time?

    The way I do it now seems excessively complicated. For example if I want a sound to play several milliseconds after I click a button, I have the button trigger Flag 0 in an active object, then another condition that adds to the Alterable Value A while Flag 0 is on, then when Alterable Value A equals 5 or something, it plays the sound and resets the flag and value. Is there a simpler way?
    Thanks

  2. #2
    No Products Registered

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

    Re: How to wait a certain amount of time?

    heh, that's the way I do too. If I remember correctly, is there an extension "Function eggtimer" for this, but I didn't use it yet.

  3. #3
    Clicker Multimedia Fusion 2 DeveloperHTML5 Export ModuleSWF Export ModuleInstall Creator Pro
    drnebula's Avatar
    Join Date
    Jul 2006
    Location
    Pennsylvania, USA
    Posts
    908
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to wait a certain amount of time?

    The best way I've found is to use the Timer X extension. You can set a number of timers, start them, pause them, reset them. You can ask if one of the timers is greater than so many thousndths of a second. I wish that the extension was vitalized, since it's the only real easy way to make an accurate timer.
    Steve

  4. #4
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module

    Join Date
    Feb 2007
    Location
    Queensland, Australia
    Posts
    317
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to wait a certain amount of time?

    I do it this way too... drnebula's method is interesting though.

  5. #5
    No Products Registered

    Join Date
    Oct 2006
    Location
    Sweden
    Posts
    1,141
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to wait a certain amount of time?

    Function Eggtimer would be the best for this kind of thing...

  6. #6
    Clicker Multimedia Fusion 2

    Join Date
    Sep 2006
    Location
    Britain, South Coast
    Posts
    1,030
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to wait a certain amount of time?

    Agreed, Function Eggtimer is teh ossum.

    What it does is create a queue of timers, based on frame cycles instead of timers. Which is better. So when a button is pressed, you can queue a function with a name like "My function", and tell it to activate in 10 frames' time.

    10 frames later, any 'ON "My Function"' conditions will trigger. Because it's a queue, you can keep tapping the button, adding new itterations to the queue. That's one potential problem with creating your own workaround, it's quite hard to create a queuing system. FET does that.

    To convert the timer, so it works on seconds, you can use this formula:

    frames = seconds * framerate

    So if you want something to happen in 12.5 seconds, set the timer for the FET to:

    12.5 * framerate

    Should work.

    EDIT: Just in case it's not clear, 'framerate' is a built-in variable in MMF, like 'frames' and 'xmouse'. It returns the current framerate in frames per second.

  7. #7
    Clickteam Clickteam
    Anders's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, Århus
    Posts
    3,456
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)

    Re: How to wait a certain amount of time?

    Yes Function Eggtimer has some advantages over traditional timers.
    I am aware of it only supporting MMF2's event repetitions as a time measure, I didn't know how to program proper timers back then.
    Real seconds or maybe milliseconds is something I could add in a future version

  8. #8
    Clicker Fusion 2.5 DeveloperSWF Export Module

    Join Date
    Jun 2006
    Location
    Turku, Finland
    Posts
    1,023
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to wait a certain amount of time?

    Happy birthday Andos

  9. #9
    Clickteam Clickteam
    Anders's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, Århus
    Posts
    3,456
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)

    Re: How to wait a certain amount of time?

    Lol thank you

Similar Threads

  1. Any ways to set an action for Wait a certain time?
    By BackStaged in forum Multimedia Fusion 2 - Technical Support
    Replies: 12
    Last Post: 13th June 2013, 09:45 PM
  2. Wait X amount of time? and score issues...
    By Shmuper in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 4th April 2010, 10:36 PM
  3. Amount of overlapping objects
    By Jacob in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 7th March 2010, 01:50 PM
  4. Amount of colours for a MooServer
    By Syp3r in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 9th August 2006, 04:12 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
  •