User Tag List

Results 1 to 6 of 6

Thread: How to compare alterable values of overlapped objects? (With same value names)

  1. #1
    Clicker Fusion 2.5 (Steam)

    Join Date
    Nov 2019
    Posts
    17
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    How to compare alterable values of overlapped objects? (With same value names)

    In my frame, I have this:
    Zone_Question_2 copy.png

    I also have this:
    Zone_Question copy.png

    I made it so each zone has the "area" qualifier. Each zone also has the alterable value "Imp" (short for "Importance").

    I wanted to make it so that when the circular object overlaps multiple zones, that it compares the "Imp" values of each zone to determine which zone has the highest "Imp" value.

    Then, after a short delay, the orange square would be translated over to that zone that had the highest value.

    In the above example, I'd want it to be translated to Z1, which had the highest "Imp" value out of the other two.

    My problem is that I don't know how to execute this kind of function. I think it has to do with loops.

    The zones, as well as number of zones, that the circular object will overlap will change as the square moves. I need to somehow compare the values of only the zones it overlaps, and not all the zones in the frame. (As they all fall under the "area" qualifier.)

    I'm open to sharing my file if needed.

  2. #2
    Clicker Fusion 2.5Fusion 2.5+ DLC

    Join Date
    Jan 2018
    Posts
    225
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    here is a mfa to show how to compare

    compare.mfa

  3. #3
    Clicker Fusion 2.5 (Steam)

    Join Date
    Nov 2019
    Posts
    17
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    This is wonderful, thanks. I'll need to credit you if I finish my game for helping me.


    However, there is one more thing that I'm trying to do. In my game, I'm trying to update the "Imp" values of all these objects based on user input.

    So I tried to do something like: "If Player presses 'spacebar', then change the 'Imp' values of each active object to something else" In my code, I would change the "Imp" values individually, not by group.

    The thing is, when I tried to change the values like above, the yellow circle wasn't able to select the highest value most of the time. I think it has something to do with using the "Imp" value as an index, rather than something that changes based on user input. I'm trying to learn this comparison code as much as I can, so I only kind of know what's going wrong.

    I've tried changing several different things in the example mfa you gave me, but I can't seem to achieve it yet.


    So basically, is it possible to change the code in the mfa you gave to allow user input to change the "Imp" values on any of the active objects, so that the code recognizes the change in "Imp" values, making it update and select the new active object with the highest value?

  4. #4
    Clicker Fusion 2.5Fusion 2.5+ DLC

    Join Date
    Jan 2018
    Posts
    225
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    ok but 2 imp musn't have same value isn't it?

  5. #5
    Clicker Fusion 2.5Fusion 2.5+ DLC

    Join Date
    Jan 2018
    Posts
    225
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    in this ex it works but it's possible that 2 actif have the same "imp" when you press space, but if in your prog you will ghange manually it won't be a problem

    compare 2.mfa

  6. #6
    Clicker Fusion 2.5 (Steam)

    Join Date
    Nov 2019
    Posts
    17
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    True, I'll change the values manually, so I won't have to worry about having two equal values.

    Thank you though, this is so helpful! I'll try to credit you in the game I'm making for helping me since you wrote out this code for me.
    I don't think I would've been able to figure it out on my own. Thank you!


    On a side note, I took two French classes almost a year ago, and it's fun to see it pop up here.

Similar Threads

  1. Replies: 3
    Last Post: 18th March 2016, 09:17 PM
  2. Replies: 5
    Last Post: 11th October 2015, 11:48 AM
  3. Global Values & Alterable Values with same names
    By Gustav in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 7th November 2012, 07:15 PM
  4. '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, 07:26 PM
  5. Global and Alterable values names
    By Corentin in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 26th February 2007, 12:25 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
  •