User Tag List

Results 1 to 7 of 7

Thread: stop fast loop

  1. #1
    No Products Registered

    Join Date
    Aug 2010
    Posts
    343
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    stop fast loop

    The image below will hopefully make the words clear.

    The current frame >=7 triggers the loop
    B=1 is likely true in both cases.
    I imagined the first condition being true would stop the loop. This is not so.

    I have reset the animation frame (in theory once should be enough) to '0' to be sure the trigger condition is false.

    What am I missing here?


  2. #2
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: stop fast loop

    Is Alterable Value B an ID number, or something else? You need to select a specific object in the loop with an "Object: Alterable value = LoopIndex("gift-return")" action.

  3. #3
    No Products Registered

    Join Date
    Aug 2010
    Posts
    343
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: stop fast loop

    Thanks DavidN
    Object: Alterable value = LoopIndex("gift-return")
    I am not sure what this means - at least on first reading.

    I am coming from a PHP 'break;' line of thought where, when the condition is found to be true, the loop is broken/stopped.

    I have since mocked up the situation.
    www.buddhamind.info/mmf/AK_fast-loop_test.mfa
    with a mouse click trigger.

    I am thinking it is not the trigger but having the condition set correctly. Yes?



  4. #4
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: stop fast loop

    Actually I might have misinterpreted the problem - I thought you were looping over a collection of objects, and in the example you gave, even doing it with one object causes the problem. It... looks like the events are all right to me, as well - it's possible that "Stop loop" only actually happens once all loop events have run that time round, but I don't remember noticing this before...

  5. #5
    No Products Registered

    Join Date
    Aug 2010
    Posts
    343
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: stop fast loop

    I have had another try using LoopIndex and this works fine.

    www.buddhamind.info/mmf/AK_fast-loop_test2.mfa
    Value reset on first click
    click again and the second object is chosen

    The limitation is that I have to set the Value to a sequential 0, 1, 2, 3 system. I can do this in the current game (I speculate positively) but it seems a bit limited if this is the only way to exit a loop.

    Are there conditions other than LoopIndex that will exit part way through a loop?

  6. #6
    Clicker Multimedia Fusion 2 DeveloperiOS Export Module
    Nifflas's Avatar
    Join Date
    Jul 2006
    Posts
    2,613
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: stop fast loop

    As DavidN guessed, it's correct that "Stop Loop" does not stop a loop instantly, it does stop it after all "on loop" actions have been triggered for this loopindex. It's not the logical way for it to work, but it's how it does work. The best solution is to put your "on loop" actions in a group that you close when you stop the loop. That prevents the remaining "on loop" actions to trigger even for the same loopindex.

  7. #7
    No Products Registered

    Join Date
    Aug 2010
    Posts
    343
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: stop fast loop

    # not the logical way for it to work
    Logic and computers 'should,' but don't always, match.
    The best solution is to put your "on loop" actions in a group
    Thanks Nifflas. This worked a charm and has so much more flexibility than being tied to LoopIndex.
    A++

Similar Threads

  1. How to 'stop' a ForEach loop?
    By King_Cool in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 20th April 2013, 02:27 PM
  2. Incorrect handling of Stop Loop?
    By Phi in forum Multimedia Fusion 2 - Technical Support
    Replies: 13
    Last Post: 30th April 2011, 10:15 AM
  3. fast loop and loop index
    By willow in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 18th May 2010, 01:43 AM
  4. Fast loop within fast loop - platform game
    By Safe in forum The Games Factory 2 - Technical Support
    Replies: 1
    Last Post: 16th April 2010, 07:38 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
  •