User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12

Thread: set up scale through the loop !

  1. #1
    Clicker 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)
    anatol's Avatar
    Join Date
    Jun 2016
    Posts
    120
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    set up scale through the loop !

    Need help.
    i tried to set up SCALE Y to random numbers from 0.1 to 0.9 - but it doesn`t work.
    why.jpg

  2. #2
    Clicker Fusion 2.5 Developer

    Join Date
    Jul 2008
    Posts
    1,305
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    Line 4. You can't compare a loopindex outside of a loop. You *must* include an "on loop" condition. There may be other issues as well, but that's the one that jumped out at me.

  3. #3
    Clicker 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)
    anatol's Avatar
    Join Date
    Jun 2016
    Posts
    120
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Ok. i rephrase my question ))
    qw.jpg

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS 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)
    Popcorn's Avatar
    Join Date
    Jun 2006
    Location
    Norway, Bergen
    Posts
    2,350
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    RRandom() only takes integers (whole numbers), so you need to input values that are ten times as high as the values you need, and then devide by ten afterwards.
    Use RRandom(1,9) / 10.0 instead.
    Keep in mind that RRandom(1,9) / 10 would not work as you need to convert the value into a float for Fusion to treat it as a decimal number, and you simply convert it by adding a decimal value to the calculation.

  5. #5
    Clicker 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)
    anatol's Avatar
    Join Date
    Jun 2016
    Posts
    120
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Thank you Popcorn !

    P.S. - I tried to *1.0 and +0.0
    Why it doesn`t work ?

  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,283
    Mentioned
    26 Post(s)
    Tagged
    0 Thread(s)
    Also you run your loop 12 times but are comparing when loopindex = 12. The loop will never reach an index of 12 as it runs indexes 0 through 11 ( 12 total).

  7. #7
    Clicker 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)
    anatol's Avatar
    Join Date
    Jun 2016
    Posts
    120
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Everything is OK with this. Try it for yourself
    try_this.mfa

  8. #8
    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,283
    Mentioned
    26 Post(s)
    Tagged
    0 Thread(s)
    Ah, I realize what you are doing now. I have never tried doing a LoopIndex comparison outside of a fastloop. If you add (On Loop "q") to the second event, you would need to change your comparison to 11.

    It seems that a LoopIndex outside of a loop is 1 based. But it is bad coding practice to check this outside of a loop, since it will be checked every frame. If it is inside the loop, it is only checked once for each loop that is run.

    This is another reason I really hope EVERY F***ING THING in F3 is 0 based by default.

  9. #9
    Clicker 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)
    anatol's Avatar
    Join Date
    Jun 2016
    Posts
    120
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by mobichan View Post
    Ah, I realize what you are doing now. I have never tried doing a LoopIndex comparison outside of a fastloop. If you add (On Loop "q") to the second event, you would need to change your comparison to 11.

    It seems that a LoopIndex outside of a loop is 1 based. But it is bad coding practice to check this outside of a loop, since it will be checked every frame. If it is inside the loop, it is only checked once for each loop that is run.

    This is another reason I really hope EVERY F***ING THING in F3 is 0 based by default.
    Hm. Ok thanks for info. But how can I check that the cycle (loop) has ended ?

  10. #10
    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,283
    Mentioned
    26 Post(s)
    Tagged
    0 Thread(s)
    You would do exactly the same thing. but inside the loop. Whatever you need to trigger on the loop's end, you would have a LoopIndex comparison (as you already do) but do it in an "On Loop" condition:

    +Some Condition
    -- Start Loop "q" 12 times

    + On Loop "q"
    + LoopIndex("q") = 11
    -- Do Action

Page 1 of 2 1 2 LastLast

Similar Threads

  1. For each loop behaving differently than regular loop
    By SoftWarewolf in forum Fusion 2.5
    Replies: 3
    Last Post: 20th January 2017, 06:01 AM
  2. Terminate fast loop mid-loop
    By JDWB in forum Fusion 2.5
    Replies: 8
    Last Post: 2nd November 2014, 05:14 PM
  3. Setting the Scale of an Object to the Scale of the Object it was Created From
    By Corlen in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 26th July 2013, 08:53 PM
  4. Replies: 7
    Last Post: 25th December 2012, 12:26 PM
  5. fast loop and loop index
    By willow in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 18th May 2010, 02:43 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
  •