User Tag List

Results 1 to 6 of 6

Thread: Quick Array Object question - Current Position/FastLoops

  1. #1
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export Module
    uncleswell's Avatar
    Join Date
    Jan 2007
    Location
    Wilkes-Barre, PA
    Posts
    121
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Quick Array Object question - Current Position/FastLoops

    Hey!

    I have two separate behaviors using fastloops to work with an array object and they both alter the Current Position and read from it.
    My worry is that if the fastloop from each behavior are running simultaneously, they may conflict with each other by altering the Current Position at the same time in the Array Object producing inaccurate results for either or both processes.
    Is this a reasonable concern? Will I have to make sure that processes making use of the "Current Position" function are never running at the same time?
    Or is the array object able to create multiple "instances" of the current position? (I dont think that's the case.. just asking)

    Also, does the Current Position carry over to other frames if the array is global? Might I run into the same potential conflict issue there if using a sub-frame?

    Thanks in advance!

  2. #2
    Clicker Fusion 2.5 DeveloperiOS Export Module
    ChrisBurrows's Avatar
    Join Date
    May 2011
    Location
    Tasmania, Australia
    Posts
    622
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Changing the current position obviously changes the current position so every time you change it, it changes. That said, only one particular fast loop ever runs at once. You can however run one fast loop inside another, and another inside of that, but the parent loop is always paused until the child loop has completed the final iteration.

    Personally, I never use or refer to the current position, but instead loop through and compare to the loop index. What exactly are you trying to do?

  3. #3
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export Module
    uncleswell's Avatar
    Join Date
    Jan 2007
    Location
    Wilkes-Barre, PA
    Posts
    121
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ChrisBurrows View Post
    Changing the current position obviously changes the current position so every time you change it, it changes. That said, only one particular fast loop ever runs at once. You can however run one fast loop inside another, and another inside of that, but the parent loop is always paused until the child loop has completed the final iteration.

    Personally, I never use or refer to the current position, but instead loop through and compare to the loop index. What exactly are you trying to do?
    Chris, thanks for the reply. That's what I thought..

    However, I was under the impression that separate behaviors were 'processed' by MMF's event-reader independently and not in a particular order. So the Main events in the frame, Object 1's behavior, and Object 2's behavior are all run at once instead of checking the main events, THEN object 1's behavior, THEN object 2's behavior, etc... Is this correct? If so, I would imagine that two fast loops COULD in fact occur at the same time (in separate behaviors or in a sub-frame).

    Maybe I still just don't understand all the ins and outs of the runtime engine.

    As for what I am trying to do, I won't go into too much detail.. but Simply, I will have multiple object behaviors that contain events which each pretty much consistently access/alter the same array for different purposes. So obviously, a conflict in which the current position is rapidly changed by 2 separate processes that rely on the current position to access specific data will open up the possibility for error.

    I am currently using the loop index method to avoid that.. but I have found that some of it will be much more efficient if I can use the current position.

  4. #4
    Clicker Fusion 2.5 DeveloperiOS Export Module
    ChrisBurrows's Avatar
    Join Date
    May 2011
    Location
    Tasmania, Australia
    Posts
    622
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    To be honest, you should never use behaviors because they are totally pointless. But from what I remember they are executed before your main code (possibly after...). If you have multiple objects with behaviors then they are executed in their own invisible internal order which is somewhat dependent on the order in which you created the objects but it can change if you have deleted an object at any time during your project.

  5. #5
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,716
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by uncleswell View Post

    Also, does the Current Position carry over to other frames if the array is global? Might I run into the same potential conflict issue there if using a sub-frame?
    uncleswell. You will have to place the array in each frame.

    Marv
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

  6. #6
    Clicker Fusion 2.5 DeveloperiOS Export Module
    ChrisBurrows's Avatar
    Join Date
    May 2011
    Location
    Tasmania, Australia
    Posts
    622
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    At the end of the frame, store the current position in a global value and then at the start of the next frame, set the current position to that value. Regarding the sub-app, in the properties window, check "Global Values and Strings" then use the global value to save and load the position.

Similar Threads

  1. Quick question- 1 dimension array or list?
    By Sumo in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 4th December 2012, 02:47 PM
  2. Array and Fastloops - EXC BAD ACCESS error
    By Ramses in forum iOS Export Module Version 2.0
    Replies: 1
    Last Post: 17th September 2011, 07:56 PM
  3. ignoring array index values before the current one
    By mobichan in forum Multimedia Fusion 2 - Technical Support
    Replies: 10
    Last Post: 24th February 2009, 09:02 PM
  4. Quick Dynamic Array question
    By Kalnar in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 13th January 2008, 05:08 AM
  5. Quick Question about cypher object
    By LazyCoder in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 4th December 2006, 01:15 AM

Tags for this Thread

Posting Permissions

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