User Tag List

Results 1 to 3 of 3

Thread: Making a RRandom seconds timer

  1. #1
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)
    Robin's Avatar
    Join Date
    Jun 2014
    Location
    Bielefeld, Germany
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Making a RRandom seconds timer

    Hello Clickteam Community,

    I am new to this amazing software and faszinated by it's easy of use. I am already energetically crawling through the many tutorials out there, but sometimes I am having difficulties with the methods I can us ein the Events Editor. In this case I am nearly finished with the Fruit Catcher tutorial, but I'd like to modify the time, the fruits are dropping from the spacecraft to a random range between (i.e.) 5 and 10 seconds. I choosed calculate for the Timer/Every event, and found the operator RRandom and seconds but I don't know how to write the expression correctly. Would one of you wise guys please help a beginner?

    Salutations,
    Robin

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export Module

    Join Date
    Apr 2014
    Posts
    108
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I believe the 'Timer/Every' condition is meant to be consistent, as in once it is defined it is meant to repeat in that steady interval. But I just checked this out and I am wrong! More below.

    ---This is the complicated way lol---
    The technique I would use is to create a countdown value and test it against zero.

    At frame start set the countdown to rrandom(10,60) (where 10frames would be the min and 60frames between would be max).
    Always (every frame update) subtract one from the countdown value
    if countdown <=0, (do something) and set countdown to rrandom(10,60) again

    This would produce a routine where the event fires randomly within an interval range, but not always at a steady interval

    --- after checking I found that every does re-evaluate, so this is simpler than I thought ---

    The syntax of the custom expression in Timer/Every is simply in milliseconds. 1000ms/second, so (1000/(60fps))*number of frames would be the range formula.
    Timer/Every RRandom(166,1000) would be the same as the previous (10,1000) that relieved on the frame rate if that makes sense.

    ----
    If you want the interval to be consistent, you could set a value to an interval using rrandom(10,1000) at frame start, and then set the every condition to the value of that defined value.

    Sorry for the confusion, I started writing before I tried it all out.

    Attached is an example file for 2.5

    Timer.mfa

  3. #3
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)
    Robin's Avatar
    Join Date
    Jun 2014
    Location
    Bielefeld, Germany
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey, thanks for the quick answer! You helped me out, that is great. No confusion in there, I could follow and just tried the last option and it worked fine for my program.

Similar Threads

  1. Timer problem - Need help making it accurate
    By fwtep in forum Fusion 2.5
    Replies: 3
    Last Post: 4th March 2014, 05:58 AM
  2. Making a timer with 0.00
    By Outcast in forum Multimedia Fusion 2 - Technical Support
    Replies: 15
    Last Post: 18th May 2012, 10:35 AM
  3. Timer Good to .02 Seconds
    By drnebula in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 26th November 2007, 02:24 PM
  4. Seconds to Days, Hours, Minutes and seconds
    By dingdong in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 1st April 2007, 08:30 PM

Tags for this Thread

Posting Permissions

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