User Tag List

Results 1 to 4 of 4

Thread: Compare two general values = 0 not work

  1. #1
    Clicker

    Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    Fusion 2.5 (Steam)
    ASD's Avatar
    Join Date
    Feb 2007
    Location
    Japan
    Posts
    1,846
    Mentioned
    11 Post(s)
    Tagged
    1 Thread(s)

    Question Compare two general values = 0 not work

    Build 257.28
    The "Compare two general values" condition not work if it using object's alt-value comparing with 0.
    But, it worked if it compared with 1.

    Is this normal?
    Attached files Attached files

  2. #2
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    If I change it so Active has value 0 and Active 2 has value 1, then all are destroyed. This definitely seems like a bug. I can confirm in 257.28.
    Working as fast as I can on Fusion 3

  3. #3
    Clicker Multimedia Fusion 2SWF Export Module

    Join Date
    Sep 2006
    Posts
    1,544
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Its not a bug. "Compare two general values" in the special conditions does not scope objects when you use it, unlike the "compare to object's alterable value" condition
    Right now in your example, its only comparing the value of the first object, because it is scoping all 4 of them and needs to choose one to resolve the singular condition, and chooses the first.
    If you reverse the object to have 0/0/1/1 instead of 1/1/0/0, it would work and comparing to 1 would fail, for that same reason.

    Remember, comparing two general values lacks specificity, it works only on the currently scoped objects and doesn't scope new ones according to its results, it merely returns true or false. If you want to refer to object values of objects with multiple instances in a two general value condition, make sure you have scoped those objects. If you want to check each one, one by one, then try using the ForEach object for example, iterating through the list of objects and checking each one in turn.

    For conditions where you want to run a complicated piece of math on one or more alterable values of each object which has instances and would rather not iterate through them, one thing you can do is have one alterable value set to the result of this math in a way you can compare it to a number and then check this value. Say you wanted to check for each object if A+B > 5.
    Your naive condition would be

    (compare two general values) (val A + val B) > (5)

    instead you have a line of code just above it that says
    Always: set val C to val A + val B
    (compare objects alterable value C) > (5)

    Which would scope each object and compare to its value C, iterating through the list implicitly.

  4. #4
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    I feel silly for not remembering that...haven't used MMF2 for ages

Similar Threads

  1. '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
  2. 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
  3. 'Compare General Values' with OINC
    By Asholay in forum Lacewing
    Replies: 3
    Last Post: 29th January 2009, 10:30 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
  •