User Tag List

Results 1 to 6 of 6

Thread: Known issues with looping through objects?

  1. #1
    No Products Registered

    Join Date
    Sep 2008
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Known issues with looping through objects?

    I've done some searching and haven't found anything helpful, unfortunately.
    I'm trying to loop through objects to assign each one a value, but the loop only executes once. It works perfectly that one time, assigning the value to one object, but the rest get nothing.
    On loop "loop"
    MoveIndex of (object) = LoopIndex("loop")
    (stuff is supposed to happen, only happens once)

    It doesn't matter how many of the objects there actually are, only one is ever looped through.



  2. #2
    No Products Registered

    Join Date
    Oct 2006
    Location
    Sweden
    Posts
    1,141
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Known issues with looping through objects?

    Make sure you have a Spread Value Action somewhere. And it mustn't be in the same event as you start the loop.

  3. #3
    No Products Registered

    Join Date
    Sep 2008
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Known issues with looping through objects?

    Yeah, I have that in an "Always" group at the top of the code, forgot to mention that, sorry.

  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: Known issues with looping through objects?

    I think it's probably fastest to upload an example of this behaviour to the file archive - is it small enough to do that?

    Otherwise, inspired guess - are you using the Object's "Compare to an alterable value" condition? The "Compare two general values" variant won't select an instance of that object.

  5. #5
    Clicker Multimedia Fusion 2SWF Export Module

    Join Date
    Sep 2006
    Posts
    1,544
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: Known issues with looping through objects?

    try using this instead:

    *Always:

    =[Active Object]: Set Flag 0 Off

    =[Active Object]: Set Flag 1 Off



    *Always:

    =Start Loop [Loop Name] for (Number of [Active Object]) loops



    *On Loop: [Loop Name]

    +[Active Object]'s Flag 0 is Off?

    +Pick a [Active Object] at random

    =[Active Object]: Set Flag 0 On

    =[Active Object]y: Set Flag 1 On



    *On Loop: [Loop Name]

    +[Active Object] Flag 1 is On

    (conditions go here)

    (events go here)



    *On Loop: [Loop Name]

    =[Active Object]: Set Flag 1 Off

  6. #6
    No Products Registered

    Join Date
    Sep 2008
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Known issues with looping through objects?

    I just realized while I was posting to the file archive; the objects themselves are the source of data which is being written to an AGB object, but it's the looping behavior that's an issue here. I hope this doesn't muddy the waters any.

    File Archive post

    Here's the post in the file archive with sample uploaded.

    Edit: Pixelthief, thanks, I'll have to give that a try too.


Similar Threads

  1. Updating all objects' strings, not the chosen object's: I'm looping wrong
    By rubes in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 24th November 2012, 12:31 PM
  2. Performance issues: hidden List Objects
    By Boba Fonts in forum Multimedia Fusion 2 - Technical Support
    Replies: 10
    Last Post: 26th April 2012, 10:59 PM
  3. MCI - Looping a wav?
    By Dines in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 15th July 2008, 11:53 AM
  4. "Pick Objects" issues
    By Roseweave in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 16th June 2008, 09:24 PM

Posting Permissions

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