User Tag List

Results 1 to 3 of 3

Thread: Question about ForEach and looping in groups

  1. #1
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,237
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)

    Question Question about ForEach and looping in groups

    I learned a while ago that you could optimize a bit with loops by placing them in groups that you activated - ran the loop - and then deactivated in the same event line. To prevent the program from searching through all loop names

    I am wondering, does the same logic apply to loops with the ForEach object?

  2. #2
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,237
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Also I am wondering if you can have the same loop names when using ForEach if the loop is refering to different objects?

    For example could I have two events both that use "Do a for each loop named "Grow" for Object A" and another event that is "Do a for each loop named "Grow" for Object B".
    Or would that cause it to have less performance because it needs to check both loops?

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    happygreenfrog's Avatar
    Join Date
    May 2011
    Location
    I.L.T.D.O.I.R (I.L.T.D.O.I.R's Location: The Dimension Of Infinite Recursion)
    Posts
    4,307
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Outcast View Post
    I learned a while ago that you could optimize a bit with loops by placing them in groups that you activated - ran the loop - and then deactivated in the same event line. To prevent the program from searching through all loop names

    I am wondering, does the same logic apply to loops with the ForEach object?
    I would guess that the answer is yes, but I could be wrong.

    Quote Originally Posted by Outcast View Post
    Also I am wondering if you can have the same loop names when using ForEach if the loop is refering to different objects?

    For example could I have two events both that use "Do a for each loop named "Grow" for Object A" and another event that is "Do a for each loop named "Grow" for Object B".
    Or would that cause it to have less performance because it needs to check both loops?
    It would be best to use different loop names to be on the safe side. E.G "Run a foreach loop named 'GrowObjectA' for Object A" and another event with "Run a foreach loop named 'GrowObjectB' for Object B".

Similar Threads

  1. ForEach loop question
    By King_Cool in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 16th July 2014, 11:05 PM
  2. [CRASH] ForEach loop with Groups/Qualifiers (256.31)
    By MJK in forum iOS Export Module Version 2.0
    Replies: 6
    Last Post: 13th March 2013, 04:42 PM
  3. ForEach for object movement question
    By scaneider in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 5th April 2012, 12:53 AM
  4. Question about looping a background
    By segasan in forum The Games Factory 2 - Technical Support
    Replies: 4
    Last Post: 5th March 2009, 07:52 PM
  5. [Request/Idea/Question] New looping technique?
    By Dines in forum Extension Development
    Replies: 19
    Last Post: 28th May 2008, 11:35 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
  •