User Tag List

Results 1 to 2 of 2

Thread: Get distance to closest left-side Box

  1. #1
    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)

    Get distance to closest left-side Box

    Hi

    I have a horizontal row of Boxes ( Active Objects ).
    Boxes hotspot is centered.
    The Boxes 'collectively' move back and forth horizontally.

    Above the row of Boxes there is a fixed Arrow ( Active Object ), defining a X coordinate.

    Problem:
    I need to get the distace between the Arrow and the 'closest left-side Box' ( the closest box on the left side of the Arrow ).
    I need this wtithout any loops.

    Idea:
    As the 'general offset' of all the boxes relative to the Arrow are the same, i think i should be able to referrance any of the Boxes to retrieve desired data by using 'modulus' in some way.
    I have ben trying for a while now but cant seem to wrap my head arround how this can be done.

    The problems appears simple enough, but i cant solve it. Maybe im too entrenched into this problem to see an apparent simple solution.

    How can i get the distace between the Arrow and the 'closest left-side Box', without any looping?
    Attached files Attached files

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,159
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    Hi King Cool,

    here is a very simple way:

    Offset_1.mfa

    (assuming that the nearest left box you need is a "whole" box,
    if rightmost coordinate of the box gets past the arrow, I assume it's no more on its "left"
    - otherwise you have to modify the Owidth thing a little)

Similar Threads

  1. Right Side of Frame merge left
    By Shadeve in forum Fusion 2.5
    Replies: 5
    Last Post: 25th February 2014, 05:17 PM
  2. hold the left side of a scene
    By saipolo in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 16th September 2013, 12:29 PM
  3. Number closest to 0
    By Skyhunter in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 27th October 2012, 02:27 AM
  4. Finding the closest value...
    By ChrisBurrows in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 7th June 2012, 06:27 PM
  5. which active is closest to?
    By StingRay in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 30th July 2010, 07:13 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
  •