User Tag List

Results 1 to 3 of 3

Thread: Advanced Movement Object: Finding Distance

  1. #1
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Nov 2006
    Posts
    696
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Advanced Movement Object: Finding Distance

    Sorry for 2 posts in 1 day,

    I have been experimenting with the Advanced Movement Object. i like the find distance n=between two objects function but there seems to be something wrong. If there are more than 1 instance of the object it is comparing then it chooses a random one.

    If I have 3 "bad" and 1 good and when the distance from Bad to Good is less than 300 than have bad stop.

    But the thing is that if I am 300 away from object 1 and 2 nothing happens but if I am less than 300 away from object 3 then all 3 stop! This doesn't really make sence to me, I have spread values, used fastloops and nothing seems to work.

  2. #2
    No Products Registered

    Join Date
    Sep 2006
    Location
    Germany
    Posts
    861
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Advanced Movement Object: Finding Distance

    check http://www.tpub.com/math2/2.htm for distance between two points, there is no need for any extension.

    to solve the issue use a trigger, like on = "in range" (1) and off = "off range" (0) on the "bad" objects

    make a fastloop and as you run throught the bad objects 1 by 1 compare the distance between the "Bad" object and the Player and if it less then 300 make the trigger switch to 1

    Add a few events for the trigger and make sure that when it turns to 1 that the object stops. If it's 0 it is out of range and should continue on whatever it is doing.

    This should work.

  3. #3
    No Products Registered

    Join Date
    Jul 2006
    Location
    Umeň, Sweden
    Posts
    1,090
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Advanced Movement Object: Finding Distance

    You could set the distance in an alterable value of the bad objects, then it will do it for each and every one of them

    + Condition
    - Set Alterable Value A("Bad") to (Distance between Bad and Good)

    EDIT:
    Then check use a normal comparsion

    + Alterable Value A("Bad") < 300
    - Actions...

Similar Threads

  1. I can not find the Advanced Path Finding object
    By kromblite in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 26th April 2012, 08:39 PM
  2. Advanced Path Finding Object
    By legocacher in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 7th January 2011, 07:47 PM
  3. Advanced Path Finding object: Public testing
    By Ross in forum Extension Development
    Replies: 23
    Last Post: 31st December 2007, 04:18 AM
  4. Advanced Path Finding object
    By Ross in forum Released Extensions
    Replies: 1
    Last Post: 23rd December 2007, 02:44 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
  •