User Tag List

Results 1 to 5 of 5

Thread: [BUG/Unexpected Behaviour] NOT Overlapping an object

  1. #1
    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)

    [BUG/Unexpected Behaviour] NOT Overlapping an object

    I noticed what I believe to be a bug with the condition "[Negated] Overlapping an object" in all recent builds of MMF2. I tried it in 253 and 254, but I'm not sure how long it has existed for. I only realised it on the weekend in Ludum Dare.

    I have the condition:
    "[Negated] Object A is overlapping Object B" > Set counter to 1.

    If there are no instances of Object A or B then the event does not trigger, and the counter remains at 0.

    If there are instances of both Object A and B, or the condition "Number of object A > 0 AND number of Object b > 0" then the event does trigger as expected, and the counter is set to 1.

    My expected behaviour for when there are no instances of one of the objects, is that the event "[Negated] Overlapping an object" > Set counter to 1, should still set the counter to 1.

    I can understand why this is happening, but I don't think it is intuitive and I don't think anyone would expect it to work this way.

    Here is my simple example file that isolates the issue: Not overlapping unexpected behaviour.mfa

  2. #2
    Clicker

    Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF 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)

    Join Date
    Jun 2006
    Location
    Killeen, TEXAS
    Posts
    1,037
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    it seems because the object isnt created, the associated instructions will be ignored. this is what happens with [.Qualifiers] - i normally put a dummy object offscreen with the the qualifiers i use in it, so if there are no objects with that qualifier, the condition still be be read by MMF.
    in your case, another active2 off screen(created at startup), and it works as it should. does that make sense andy?

  3. #3
    Clicker Multimedia Fusion 2SWF Export Module

    Join Date
    Sep 2006
    Posts
    1,537
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Yep, this has existed forever, its a problem with how the logic for object scoping works- its trying to iterate over the class of objects to test a property, against the collision masks. When you have the negated condition "A is not overlapping B", what it will try to do is scope every instance of the object A that isn't overlapping an object B; so the condition could be true, false, or partially true, depending on how many objects fit that description. So if you had 2 A's that were overlapping a B, and 2 A's that were not overlapping, then having the "isn't overlapping" negated conditon will scope the two that aren't, and the regular unnegated condition will scope the two that are. The problem, when neither exist, is that it will then count the entire condition as false instead of proceeding on

    Its debatable whether this is logically intended or not. It makes sense in a way. If you check for any other property of an object, like "is flag 4 on" vs "is flag 4 off", it will be false if no instances of that object exist either way, despite being a seeming boolean based on that object's conditions. So if you're checking for the property of whether its overlapping something or not, shouldn't that be false if none exist? The real bug I think is that the latter object not existing still returns false even if none exist- that should logically probably be a 'true'.


    Like danjo was saying, just having a dummy object offscreen or ensuring there will never be 0 instances of that object makes it pretty simple to work around. But if thats not good enough, you can specify flags for whether a class of objects exists or not and use two different lines of code based on that. I use that same logic in my engine, for whether a certain kind of platform (enemies that can be frozen in time) exists, and duplicate the lines that would test for their collisions;


  4. #4
    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)
    I understand the logic of why it happens, but I guess I was just saying it's not intuitive. It's just another one of MMF2's esoteric nuances, and now I know about it I'll look out for it! :P I was surprised though that I've never really noticed it. I can solve it quite easily using "Number of objects > 0", so I'm happy with that solution.

  5. #5
    Clicker Multimedia Fusion 2Android Export Module
    Corlen's Avatar
    Join Date
    Mar 2007
    Location
    Your House
    Posts
    848
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes this creates a big problem I've run into when you have like 10 different active objects you have to test for in the global events or behaviors and you have to test if something isn't overlapping them all individually, since qualifiers don't work in global events or behaviors, and it's not practical to have them off screen so I try to find alternate methods besides using if object is not overlapping object.

Similar Threads

  1. Behaviour of the ini object?
    By seripa in forum The Games Factory 2 - Technical Support
    Replies: 3
    Last Post: 20th January 2012, 08:26 AM
  2. Unexpected crash
    By Nifflas in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 25th February 2009, 03:23 PM
  3. Object Panel Behaviour Bug
    By Tiles in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 20th January 2007, 07:16 AM
  4. Behaviour marked Objects and deleting Behaviour
    By Tiles in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 14th January 2007, 09:14 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
  •