User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12

Thread: Comparing multiple instances of 2 objs - no loop?

  1. #1
    Clicker Fusion 2.5Fusion 2.5+ DLC

    Join Date
    Jun 2006
    Posts
    888
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Comparing multiple instances of 2 objs - no loop?

    Some time ago I read here a post from somebody who was saying that MMF2 is able to compare multiple instances of 2 objects without looping.
    I doubt so but I would like to ask whether I did not miss someething

    Things like:

    val A of object 1 = val A of object B //works if you have 1 A and 1 B.

    wont work if you have more than 1 instance. Workaround with looping is simple but with HWA it seems to me that looping slowdown is more noticeable, thats why Im looking for more efficient way.
    Thanks!

  2. #2
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Re: Comparing multiple instances of 2 objs - no loop?

    It will obly select the first object's instances, object A's instances in your case, if you want to select all of object B's instances swap the objects oder in the condition.

    You could also try the 'select object' extension.
    Working as fast as I can on Fusion 3

  3. #3
    Clicker Fusion 2.5Fusion 2.5+ DLC

    Join Date
    Jun 2006
    Posts
    888
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Comparing multiple instances of 2 objs - no loop?

    Of course, but this is only for testing one against more. The question is how to test:

    all instances of A against all instances of B.

    I will definitely look at the select extension (if its faster than looping ), thanks for suggestion!

  4. #4
    No Products Registered

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

    Re: Comparing multiple instances of 2 objs - no loop?

    Select Object can pick the one with the highest or lowest alt value

  5. #5
    Clicker Fusion 2.5Fusion 2.5+ DLC

    Join Date
    Jun 2006
    Posts
    888
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Comparing multiple instances of 2 objs - no loop?

    maVado: so, is it able to pick the object with certain value? Im not at my PC with MMF2 right now..thanks

  6. #6
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module
    RickyRombo's Avatar
    Join Date
    Mar 2008
    Location
    Somewhere between here and there
    Posts
    3,167
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Comparing multiple instances of 2 objs - no loop?

    If the certain value is the highest or lowest value possible

  7. #7
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export ModuleUnicode Add-on

    Join Date
    Jun 2006
    Location
    Australia
    Posts
    988
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Comparing multiple instances of 2 objs - no loop?

    Is there a reason you can't use loops? Or are you just curious to know if it can be done without loops?

  8. #8
    Clicker Fusion 2.5Fusion 2.5+ DLC

    Join Date
    Jun 2006
    Posts
    888
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Comparing multiple instances of 2 objs - no loop?

    netninja: Yeah, I have mentioned it in the original post - using fastloops (even "only" 100) slows my HWA app down about 10 FPS, so just wanted to know if there is not more efficient solution.

  9. #9
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jun 2006
    Location
    Darlington, UK
    Posts
    3,298
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Comparing multiple instances of 2 objs - no loop?

    It was probably me mentioning that you don't always need to match a SPECIFIC object B to each object A, often it only matters that each only has one.

    e.g. you can do health bars above each enemy by making sure there are enough "health bar" objects and using this one event:
    Always
    -Set position of health bar to 0,-32 from Enemy
    -Set value of health bar to alterable A("Enemy")

    You can also do homing missiles with only one loop, if you have a spare alt value on the enemies, and use the select object:
    Always
    -Spread value 0 in alt value A of Missiles
    Always
    -Start loop "Missiles"
    On Loop "Missiles"
    +Compare to alt val A of "Missiles" == loopindex("Missiles")
    -Set alt val B of "Enemy" to (X("Enemy")-X("Missile")) pow 2 + (Y("Enemy")-Y("Missile")) pow 2
    On Loop "Missiles"
    +Compare to alt val A of "Missiles" == loopindex("Missiles")
    +Select object: Select "Enemy" with lowest alt val B
    -"Missile": Set direction to 0,0 from "Enemy"

  10. #10
    Clicker Fusion 2.5Fusion 2.5+ DLC

    Join Date
    Jun 2006
    Posts
    888
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Comparing multiple instances of 2 objs - no loop?

    Dynasoft, yes, but In my case I need to pair specific object A with specific objects B,C,D.
    Those are "equipped" items in my online game - clients needs to display recieved weapon, helmet and armor (all with recieved ID) to player with specific ID.
    Also when client recieved that player with ID 20 equipped a shotgun, it creates shotgun with ID of this player and now it needs to always position this gun at this player.
    Never mind, its not so slow, just was looking for beter way

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Multiple instances
    By Windybeard in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 23rd January 2012, 02:20 PM
  2. An issue comparing specific instances of objects
    By ac3raven in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 16th May 2010, 11:53 PM
  3. Bug with comparing a var to a loop index
    By mobichan in forum File Archive
    Replies: 2
    Last Post: 6th January 2010, 04:45 PM
  4. multiple instances spawning at multiple places
    By CPW in forum Multimedia Fusion 2 - Technical Support
    Replies: 17
    Last Post: 22nd February 2009, 01:38 AM
  5. Multiple instances of app.
    By Bruto in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 16th April 2008, 05:03 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
  •