User Tag List

Results 1 to 6 of 6

Thread: compare two values from different objects not working

  1. #1
    Clicker Fusion 2.5
    troshinsky's Avatar
    Join Date
    Jun 2010
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    compare two values from different objects not working

    Hello,

    Hereīs something I donīt understand: I have a series of computer controlled characters, each one with their own hitboxes. Each character and hitbox have an alterable value to identify them (by spreading a value through them) so I can associate each hitbox with its character so they move together.

    The point is if I express it as "if Hitbox ID = Character ID then position Hitbox relative to Character" it dosenīt work.

    It does work though if I express it as "if Hitbox ID = 1 and Character ID = 1 position Hitbox relative to Character"

    Why is there a difference?

    Itīs quite unpractical to have to set manually conditions for all posible characters, as I want to keep open the posibility of having lots of them.

    Any ideas?


    Thanks a lot.

  2. #2
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleXNA Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    gkinfinity's Avatar
    Join Date
    May 2011
    Location
    USA
    Posts
    284
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    There are 2 ways to compare alterable values that look very similar but yield different results. For what you need...

    Incorrect way: Create new event > right click on object > Alterable Values > Compare to one of the alterable values (Then select the alt values for both objects)

    Correct way: Create new event > Special > Compare 2 general values (Then select the alt values for both objects)

    The 'incorrect' way will have parentheses and quotes around the second object in the condition but not the first, and the 'correct' way will have parentheses and quotes around both objects

    You should see (for example): Alt Value A ("Active") = Alt Value A ("Active2")


    Hope this helps

  3. #3
    Clicker Fusion 2.5
    troshinsky's Avatar
    Join Date
    Jun 2010
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Allright, thanks!

    Id does work like this. I did not know the difference between these two ways of comparing values. I still donīt really understand what is the use of what in this case is the "incorrect" way. What does the parenthesis and quotes mean and how does that change the way the comparison ov values is done?

    Thanks again!

  4. #4
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleXNA Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    gkinfinity's Avatar
    Join Date
    May 2011
    Location
    USA
    Posts
    284
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Haha yeah it took me forever to figure that out. I'm not sure what the other way would be good for actually (assuming there are multiples copies of both objects that you are comparing).

  5. #5
    Clicker Multimedia Fusion 2
    Algul's Avatar
    Join Date
    Feb 2008
    Posts
    230
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Actually the "Correct way" is incorrect. Compare 2 general values condition does not change object selection so you may as well replace it with "always" condition. The fact that it will position hitboxes on characters is inbuilt feature of action loops in MMF.
    Condition "Create new event > right click on object > Alterable Values > Compare to one of the alterable values" will select only those object that fulfill that condition and if you comparing altvalue to value of different object then you will be comparing ALL OBJA.altval with ONE OBJB.altval => in case of comparing ID it will usually select only ONE OBJA and ALL OBJB(actually it will not change selection of OBJB=>no selection=all selected) => all hitboxes will be positioned on one character.

  6. #6
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleXNA Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    gkinfinity's Avatar
    Join Date
    May 2011
    Location
    USA
    Posts
    284
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Oh yeahhhhh, I forgot about that. Just use Always lmao

Similar Threads

  1. Fastest way to compare values?
    By StingRay in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 13th December 2013, 03:51 PM
  2. 'Compare to one of the alterable values' VS 'Compare two general values'
    By King_Cool in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 1st January 2012, 06:26 PM
  3. For each and compare two general values
    By Popcorn in forum Multimedia Fusion 2 - Technical Support
    Replies: 13
    Last Post: 29th April 2010, 05:03 AM
  4. Compare Multiple Values?
    By Dynamite in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 2nd June 2009, 12:31 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
  •