User Tag List

Results 1 to 6 of 6

Thread: Compare range of alterables B with the same alterable A simultaneously

  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)
    anatol's Avatar
    Join Date
    Jun 2016
    Posts
    140
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Question Compare range of alterables B with the same alterable A simultaneously

    Tried to solve this puzzle for a month... without any luck

    Here is situation:
    I have 20 objects with alterables ID and POSE. So my objects looks like : OBJECT 1 with ID 1 and POSE 0
    OBJECT 2 with ID 2 and POSE 0
    OBJECT 3 with ID 3 and POSE 0
    OBJECT 4 with ID 4 and POSE 1 and so on.

    I need to test for objects with ID`s from 8 to 12 and have POSE =1 . And most importantly - i need to check this range simultaneously !
    So i click some button and check this range, if i see that is ALL range have POSE =1 , i do next step. If any of ID from range have POSE =0 - do nothing.

    Sorry for my english )) Still learning
    Thank you

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    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)
    Popcorn's Avatar
    Join Date
    Jun 2006
    Location
    Norway, Bergen
    Posts
    2,366
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)
    I take it all the 20 objects is duplicates of the same Active object? If not, give them the same qualifier and test for that instead of Object.
    All you need to do is to run a for each loop for the object / qualifier.

    * Always
    - Counter: Set value to 0

    * Always
    + Object: Pose = 0
    + Object: ID>=8
    + Object: ID<=12
    - Object: Start For Each loop "Pose 0" // This will run the For Each loop ONLY for those objects that matches all the conditions.

    * Object: On For Each loop "Pose 0"
    - Counter: Set value to 1

    Now, whenever the counter is 1, it means that one of the objects in the range 8-12 had its pose set to 0.

  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)
    anatol's Avatar
    Join Date
    Jun 2016
    Posts
    140
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    It doesn`t work.
    Where i am wrong ? ssssss.jpg
    POSE.mfa

    Once again - I need to get this :
    When ALL object in selected RANGE have POSE=1 - then DO something
    NOT some one from RANGE , but ALL in range.

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    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)
    Popcorn's Avatar
    Join Date
    Jun 2006
    Location
    Norway, Bergen
    Posts
    2,366
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)
    It does work, but I think you misunderstood the concept.
    You test for Pose = 1 instead of 0.
    I took it that Pose would be EITHER 0 or 1.
    If you test for Pose = 0, then you will know that one or more object had Pose = 0, which means that not all objects has Pose = 1.
    This means that if the counter is still 0 after the loop has finished, no objects had Pose = 0, meaning all objects had Pose = 1. Of course, if there can be more than two poses, it wouldn't work like that.

    Here's an alternative that will work for any number of poses.

    * Always
    - Counter: Set value to 0

    * Always
    + Object: Pose = 1
    + Object: ID>=8
    + Object: ID<=12
    - Object: Start For Each loop "Pose 1" // This will run the For Each loop ONLY for those objects that matches all the conditions.

    * Object: On For Each loop "Pose 1"
    - Counter: Add 1 to value

    * Counter: Current value = 5
    // 5 objects had Pose = 1
    - Do action!

  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)
    anatol's Avatar
    Join Date
    Jun 2016
    Posts
    140
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Aahhhh ))) Thank you Popcorn !!
    It work like a charm !

  6. #6
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I see that this is allready solved, but would like to present an alternative idea.

    You could do this without any loops, by 'assuming that all object within the range have POSE 1' and simply cancle/ deactivate this default behaviour if ANY of the objects within the range have POSE 0 by doing a simple Event like this

    + Obj ID within range
    + Obj POSE = 0
    -> Cancel action ( somehow )

Similar Threads

  1. Replies: 3
    Last Post: 18th March 2016, 08:17 PM
  2. How to limit the range of an Alterable Valur
    By steakor in forum Fusion 2.5
    Replies: 7
    Last Post: 28th January 2016, 03:33 PM
  3. 'Compare to one of the alterable values' VS 'Compare two general values'
    By King_Cool in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 1st January 2012, 06:26 PM
  4. Range of an Alterable Value
    By LB in forum Articles
    Replies: 9
    Last Post: 25th June 2011, 02:07 AM
  5. Select a range numbers from an alterable value?
    By Mantoid in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 14th March 2009, 09:49 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
  •