User Tag List

Results 1 to 7 of 7

Thread: Help with object Id's, something to do with loops?

  1. #1
    No Products Registered

    Join Date
    Feb 2007
    Location
    Sydney, Australia
    Posts
    1,654
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help with object Id's, something to do with loops?

    Ok so I have 2 bouncy balls and I'm using the advanced direction object to calculate the distance between the balls and the player. I made it so if the distance of the ball is at a certain point with the player then it stops moving.

    The problem is that if one ball is at that point where it stops, all the other balls stop.
    I'm guessing I need to use a loop or something to change each balls value so the specific ball stops if it is in the certain distance, not all the balls.

    So how do I do that?

  2. #2
    No Products Registered

    Join Date
    Oct 2006
    Location
    Sweden
    Posts
    1,141
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Help with object Id's, something to do with loops?

    You can try always setting one of the balls alterable values to the distance and check that value instead. Should get around the object picking issue with doing it directly in a condition.

  3. #3
    No Products Registered

    Join Date
    Feb 2007
    Location
    Sydney, Australia
    Posts
    1,654
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Help with object Id's, something to do with loops?

    Nope, doesn't work. They still all stop at the same time.

  4. #4
    No Products Registered

    Join Date
    Dec 2006
    Posts
    1,332
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Help with object Id's, something to do with loops?

    Quote Originally Posted by Dynamite
    Nope, doesn't work. They still all stop at the same time.
    Post an example, it doesn't seem like it would be too hard to fix.

  5. #5
    No Products Registered

    Join Date
    Feb 2007
    Location
    Sydney, Australia
    Posts
    1,654
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Help with object Id's, something to do with loops?

    I can't post an example due to important reasons.

  6. #6
    Clicker Fusion 2.5 DeveloperHTML5 Export Module

    Join Date
    Jun 2006
    Posts
    1,469
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)

    Re: Help with object Id's, something to do with loops?

    Are these object duplicates or clones? If duplicates they will all stops. If clones they look similar but act independently. I like the idea of setting the alterable value and then the event to stop moving if alterable value is x.

  7. #7
    Clicker Multimedia Fusion 2

    Join Date
    Sep 2006
    Location
    Britain, South Coast
    Posts
    1,030
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Help with object Id's, something to do with loops?

    Like Werbad said:

    Create an alterable value inside the balls, and call it something like "Distance"

    then:

    Code:
    ALWAYS
    --- Ball: Set "Distance" to:
    
    sqr(
          ( x("Ball") - x("Player") )
                                     pow 2
                      +
          ( y("Ball") - y("Player") )
                                     pow 2  )
    
    Ball: "Distance" > '200'
    --- Ball: Stop Moving
    That'll work if done as above.

    MMF needs to have it clearly spelled out which ball it's referring to. In this case, it's the ball whose distance value is greater than 200. Even MMF can't mess that one up, LOL

Similar Threads

  1. Do the PMO object use loops?
    By Outcast in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 26th May 2012, 05:13 PM
  2. Problem with object linking and fast loops
    By the_raven in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 28th March 2009, 12:23 PM
  3. little confused abouts loops inside loops!
    By Gibbon in forum Multimedia Fusion 2 - Technical Support
    Replies: 10
    Last Post: 30th January 2007, 06:37 PM
  4. Need help with loops and object picking
    By Isbeorn in forum File Archive
    Replies: 8
    Last Post: 3rd September 2006, 05:17 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
  •