User Tag List

Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 27

Thread: Why do you have to split actions into multiple lines sometimes for things to work?

  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)

    Join Date
    Oct 2016
    Posts
    60
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Why do you have to split actions into multiple lines sometimes for things to work?

    I'm new to fast loops so I'm trying to understand things.

    I've got a very simple example that shows my question, press the up or down arrow.

    It's supposed to destroy any existing numbers and then use a fast loop to create some numbers next to the object.

    Upon pressing up:
    +Destroy objects
    +Set object position
    +Run fastloop

    The numbers previously don't get destroyed.

    But if I duplicate the action like this it works?

    Upon pressing up:
    +Destroy objects

    Upon pressing up:
    +Set object position
    +Run fastloop


    Just wondering what I'm missing? Is this a quirk or something I'm doing wrong? Thanks.

    Attachment 29396

  2. #2
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleXNA Export ModuleInstall Creator Pro
    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)
    piscesdreams's Avatar
    Join Date
    Dec 2007
    Location
    United States
    Posts
    1,010
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Hmm, that's interesting. It seems like it may be a weird quirk to me, but I'd be curious to hear what others have to say about it.

  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)

    Join Date
    Oct 2016
    Posts
    60
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah it's tricky when you're learning to know if what you're doing should work and you've come across a quirk or if you're doing something wrong.

  4. #4
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export Module
    Janette5's Avatar
    Join Date
    Dec 2014
    Location
    Western Cape, SA
    Posts
    1,136
    Mentioned
    197 Post(s)
    Tagged
    0 Thread(s)
    We expect Fusion to do this:

    1. Destroy all the numbers
    2. Move the green block up or down
    3. Run the loop.


    But it was explained to me before that Fusion executes the commands as follows:

    1. Destroy 1 Number
    2. Move the green block up or down
    3. Run the loop
    4. Destroy the next number
    5. Destroy the next number etc.

    Now in your case because you've created more numbers with your loop - Fusion is doing this:

    1. Destroy 1 Number - the last number previously created.
    2. Move the green block up or down
    3. Run the loop
    4. Destroy the next number - the last number newly created - and then stops.

    Probably it stops because there's now a confusion between the numbers that were there and the new numbers - but I don't really know.

    It is quirky and there are lots of ways to get past this - the way you solved it by splitting the commands is probably the best.

    (To see the last number being destroyed just make your frame width wider - to about 1000 pixels - you'll see it's always destroying 2 numbers - the last one previously created, and the last one newly created.)

  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)

    Join Date
    Oct 2016
    Posts
    60
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the explanations. Interesting that it doesn't destroy all the numbers, but happy to know it's a quirk and my way round it works.

    I have another question that may be another quirk? I want to stop the loop when it reaches the red blocks, so it's counting the squares upto and including the red blocks but not after it.

    Oddly it seems to work sometimes and not others?
    Attachment 29397

  6. #6
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export Module
    Janette5's Avatar
    Join Date
    Dec 2014
    Location
    Western Cape, SA
    Posts
    1,136
    Mentioned
    197 Post(s)
    Tagged
    0 Thread(s)
    Yes, it's another quirk by design.

    The overlapping and collisions were designed to be used with moving objects and there are certain blocks and conditions built into them. When you use them with static objects they don't always work beyond the first time - in your case they're working every 2nd time. It has something to do with a design feature - Fusion waits for something to "change" before checking the condition again and with static objects that "change" doesn't happen.

    You can solve this by inserting this:

    * On loop "createXposcrosspath"
    + Y position of blocker = Y( "Active" )
    + Active 3 is overlapping blocker
    Special : Stop loop "createXposcrosspath"

    Because now Fusion is forced to re-check because there's a change in a particular condition every time - and then the loop also works every time.

  7. #7
    Clicker Fusion 2.5Fusion 2.5 Mac
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    zip2kx's Avatar
    Join Date
    Jun 2015
    Posts
    826
    Mentioned
    18 Post(s)
    Tagged
    0 Thread(s)
    triggering fastloops in an event sometimes breaks scoping. ForEach dont have the same issues but regular ones often benefit from being in their own event.

    Vol did a great deep dive on scoping here https://www.sprykegame.com/volblog/w...team-fusion-25

  8. #8
    Clickteam Clickteam
    Simon's Avatar
    Join Date
    Jun 2006
    Location
    UK
    Posts
    2,729
    Mentioned
    64 Post(s)
    Tagged
    3 Thread(s)
    Fastloops always break object scoping, this is a technical limitation of fastloops.

  9. #9
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Volnaiskra's Avatar
    Join Date
    Jan 2014
    Location
    www.sprykegame.com
    Posts
    2,501
    Mentioned
    131 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Simon View Post
    Fastloops always break object scoping, this is a technical limitation of fastloops.
    There seems to be at least one exception. Someone recently showed me an example where you can combine a fastloop with a forEach loop and, incredibly, it keeps scope across events. I was practically trembling with nerves when I tried it in my own code, but was amazed that it actually worked

  10. #10
    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)

    Join Date
    Oct 2016
    Posts
    60
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Janette5 that works great, and thanks for the input everyone, now I remember why I shied away from fastloops!

Page 1 of 3 1 2 3 LastLast

Similar Threads

  1. Lines connecting multiple objects
    By Mr_A in forum Fusion 2.5
    Replies: 4
    Last Post: 20th March 2016, 09:16 PM
  2. Use same button for multiple actions?
    By Gibbon in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 4th January 2013, 04:55 AM
  3. Chart Object, multiple lines?
    By Gibbon in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 21st August 2012, 11:09 AM
  4. Adding multiple lines at once
    By weka in forum SWF/Flash Export Module Version 2.0
    Replies: 6
    Last Post: 10th May 2010, 11:17 PM
  5. Phizix: Multiple Lines in Body
    By Jaffob in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 12th November 2008, 10:21 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
  •