User Tag List

Results 1 to 8 of 8

Thread: Hi guys. How far from A to B?

  1. #1
    No Products Registered

    Join Date
    Jan 2007
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Hi guys. How far from A to B?

    That's right ladies and gents. I'm wondering if you guys know an extension free method of finding the distance between two points. All I have so far is that I think it has something to do with pythagora's theorem. What do you guys think? thanks for the assist!

  2. #2
    No Products Registered

    Join Date
    Jun 2006
    Location
    Texas
    Posts
    1,002
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Hi guys. How far from A to B?

    d=sqrt((x2-x1) pow 2+(y2-y1) pow 2)

  3. #3
    No Products Registered

    Join Date
    Jan 2007
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Hi guys. How far from A to B?

    cant quite get it to work, here's the exact formula i have in mmf2

    Sqr(( X( "Active 2" )-X( "sprSonic" )Exp( 2 )+(Y( "Active 2" )-Y( "sprSonic" )Exp( 2 ))

    active2 is pointb and sprSonic is pointa. I promise this isn't a sonic fangame people

  4. #4
    No Products Registered

    Join Date
    Jun 2006
    Location
    Texas
    Posts
    1,002
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Hi guys. How far from A to B?

    I didn't say Exp, I said pow which is exactly how it is in MMF 2.

    Sqr(( X( "Active 2" )-X( "sprSonic" )) pow 2+(Y( "Active 2" )-Y( "sprSonic" )) pow 2)

    or something like that.

  5. #5
    No Products Registered

    Join Date
    Jan 2007
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Hi guys. How far from A to B?

    ah, i just didnt see a pow button.

    EDIT: It seems to always equal 90..

  6. #6
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jun 2006
    Location
    England
    Posts
    3,546
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)

    Re: Hi guys. How far from A to B?

    The Clickteam Movement Object (comes with build 243) has a distance expression.
    .:::.Joshtek.:::.

  7. #7
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module
    Tiles's Avatar
    Join Date
    Jun 2006
    Posts
    1,359
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Hi guys. How far from A to B?

    That's the formula i use since eons to get distances:

    Sqr((( X( "hero" ) - X( "enemie" )) * ( X( "hero" ) - X( "enemie" ))) + (( Y( "hero" ) - Y( "enemie" )) * ( Y( "hero" ) - Y( "enemie" ))))

    No pow


  8. #8
    No Products Registered

    Join Date
    Aug 2006
    Location
    Westcountry, UK
    Posts
    862
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Hi guys. How far from A to B?

    You can use it in any number of dimensions which is useful

Similar Threads

  1. Hey guys, help me out? :)
    By DistantJ in forum iOS Export Module Version 2.0
    Replies: 13
    Last Post: 9th November 2012, 12:37 AM
  2. Well Done Guys
    By Steven in forum Click Convention 2011 (archived)
    Replies: 14
    Last Post: 25th August 2011, 01:00 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
  •