User Tag List

Results 1 to 8 of 8

Thread: Qualifier Overlap Question

  1. #1
    No Products Registered

    Join Date
    Jul 2006
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Qualifier Overlap Question

    In my game engine, the Good qualifier represents things that are mobile and the Neutral qualifier represents things that can be bounced off. I'd like the player's ship to be both mobile and bounce-offable, although I'm having some trouble with the events when that is the case, so right now the ship is just mobile.

    There are bumpers which are not mobile but are bounce-offable (They belong to Neutral but not Good), and one ship which is both mobile and bouncy (belongs to both Good and Neutral). The event for bounce detection is:
    * Group.Good is overlapping Group.Neutral
    + Only one action when event loops

    Just to make absolutely sure I know when this event is triggering, I currently have it end the application. This works fine when I run into something belonging to just Group.Neutral -- I bounce off of it (the application ends). And there aren't any issues when I run into something belonging to just Group.Good -- I clip through it. But if I run into something belonging to both Group.Good and Group.Neutral, nothing happens. The application does not end, indicating that the bouncing event above does not trigger, and the ship just stops (but that's due to other events which state that the ship can't move through bounceable objects, and are functioning correctly in this case). It seems to me that belonging to both qualifiers involved is somehow throwing off MMF's internal specific-object-picking routines, but I'm only vaguely familiar with how that's handled.

    So, what's keeping this simple event from working, and how do I fix it?

    Edit: The same behavior occurs even when I remove the *Only one actions when event loops restriction. So it seems to me that MMF won't detect a collision between group A and B if one object is part of group A and the other object is part of both group A and B.

  2. #2
    No Products Registered

    Join Date
    Jul 2006
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Qualifier Overlap Question

    Sorry to bump this, but it seems like I'm missing something fundamental here. I've even tried recreating this from a completely blank project, and still this persists.

    I've got two active objects. One has the qualifier Group.Good. The other has two qualifiers, Group.Good and Group.Neutral. How do I tell if they are colliding without referring to the specific objects?

    * Group.Good collides with Group.Neutral
    does not work unless I remove the Group.Good qualifier from the second object, but I can't do that in my actual project. So how do I get around this or do it properly?

  3. #3
    Clickteam Clickteam
    Jeff's Avatar
    Join Date
    Jun 2006
    Location
    Battle Ground Washington
    Posts
    11,825
    Mentioned
    8 Post(s)
    Tagged
    2 Thread(s)

    Re: Qualifier Overlap Question

    Might need to see your file to offer any advice.
    I have used groups colliding in the past and didn't encounter any problems but I am not sure what your doing.

    I think the main problem is you have your object in both group.good and group.neutral --- Perhaps you need a third group so you can test without 1 object being in both the groups your testing.



  4. #4
    Clicker Multimedia Fusion 2 Developer

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

    Re: Qualifier Overlap Question

    Post a file that doesn't work, I want to see this.

  5. #5
    No Products Registered

    Join Date
    Jul 2006
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Qualifier Overlap Question

    All right, I uploaded an example to http://home.comcast.net/~hammerbro/bug.mfa

    The top-left active belongs to Group.Good and is controlled by the directional arrows.
    The top-middle active belongs to both Group.Good and Group.Neutral.
    The bottom-middle active belongs only to Group.Neutral.
    The only event is:
    * Group.Good is overlapping Group.Neutral
    = Exit the Application

    You can move all over the top-middle active and the application won't quit, but it'll exit as soon as you touch the bottom-middle one.

    Also, I don't think I can logically use more qualifiers to work around this issue -- the idea is that I want the movement engine to control all of my Group.Good objects based on a few of their alterable values (a for each loop would be mighty useful here, but last I heard that was still under discussion), and I want all of them to bounce off any Group.Neutral objects they collide with. A lot of the things that move (Group.Good) are also bouncy (Group.Neutral). So I think there's going to be qualifier overlap regardless of how I set it up if I want objects to be moved by the movement engine and still be bouncy.

  6. #6
    Clickteam Clickteam
    Jeff's Avatar
    Join Date
    Jun 2006
    Location
    Battle Ground Washington
    Posts
    11,825
    Mentioned
    8 Post(s)
    Tagged
    2 Thread(s)

    Re: Qualifier Overlap Question

    Weird

    Can you use collisions?

    If I change your event to be group.good collides with group.neutral it works right.

    So I would guess some sort of bug with the overlap condition and groups.

  7. #7
    No Products Registered

    Join Date
    Jul 2006
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Qualifier Overlap Question

    That's odd... The event in question does work when I use Group.Good collides with Group.Neutral, but I don't think I can rework all of my code based on this. As far as I know, collisions only trigger on the first frame of overlap, and I have a few things to do when objects collide (start two fastloops to determine the angle of collision, and then because the vector math isn't workin' out properly for me outside of quadrant I, use a regular event to check which quadrant the bouncer is in relation to the bouncee, and then also based on that quadrant start another loop to back the bouncee out of the bouncer's collision radius), and I don't think these all occur during the first collision event. Although I could be wrong about how MMF handles events like that, it would still be a hassle to redo everything.

    It's good to know that I'm doing things right, at least. I don't know how deep this bug goes or how long it'd take to fix, but it might be in my best interests to wait on that. After all, I still have to add in the complication of having this set of routines be run once for each moving object using the same block of events, which involves an outer layer of fastloops to manually decide which object is being moved at the moment. Too much more complexity and I won't be able to understand my own code, which would be disappointing, since right now things look really smooth and polished.

  8. #8
    No Products Registered

    Join Date
    Jul 2006
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Qualifier Overlap Question

    I've got a slightly different question that falls under the same category. But first, some more background.

    I've been changing things around to try to work with the collides with event until the overlaps with bug is resolved. So I got the bounce events to work with Group.Good on Group.Neutral-only objects, but although the events were triggering they weren't working correctly with Group.Good on Group.Good&Neutral objects. I had a hunch that maybe it was because the bouncing events weren't sure which Group.Good object to focus around, so I opened up bug.mfa (from earlier) for testing.

    I changed the event from Group.Good is overlapping Group.Neutral to Group.Good collides with Group.Neutral. Then, I deleted the result of ending the application and instead told it to destroy the Group.Good object. Sure enough, when colliding a Group.Good with a Group.Neutral-only object, just the moving Group.Good was destroyed. But when colliding the Group.Good object with the Group.Good&Neutral object, both Group.Good objects were destroyed. I added a counter and told it to increase by 1 on that event, and although both Group.Good objects get destroyed the counter is only added to once, indicating that the event only triggers once but the internal object selection routines still have both Group.Good objects in mind.

    Since I only wanted one of them to be destroyed (since in the case of my game, I only want the bounce events to center around a single Group.Good object at a time), I tried to figure out how to make this happen. Oddly enough, I got it to work by adding the condition:
    + Fixed value of Group.Good = Fixed(Group.Good)
    With that addition, only the Group.Good object that was moving is destroyed. But how did MMF decide on that object to destroy? Since the event definitely has both Group.Good objects "in mind", for lack of a better term (demonstrated by the fact that previously they were both destroyed), that restriction event could refer to either of them. Furthermore, it could refer to both of them in either order.

    I guess what I'm asking for is some insight into how MMF processes this event:
    An object in Group.Good collides with an object that is in both Group.Good and Group.Neutral.
    The event is: Collision between Group.Good and Group.Neutral, with the additional restriction of Fixed Value of Group.Good = Fixed(Group.Good), and the resulting action to take is to Destroy Group.Good.
    MMF picks only one of the Group.Good objects, and destroys it.

    How does MMF pick which Group.Good object gets destroyed? How did it even decide that I wanted one of them to be destroyed? (The restriction could've logically meant that I only wanted it to happen if the fixed value of the first Group.Good object was equal to the fixed value of the second Group.Good object.) I have a sinking feeling that MMF is just picking the first Group.Good object in mind at the time, and this worries me, because I don't think it would do what I need (if the second Group.Good object ran into the first, which was stationary, the first would still bounce).

Similar Threads

  1. Impossibe to check overlap of objects of the same kind/qualifier?
    By GrayFace in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 13th November 2013, 08:04 AM
  2. Qualifier bug question
    By mobichan in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 31st October 2013, 03:02 AM
  3. Problems using Qualifier / Groups when overlap
    By AyreGuitar in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 30th January 2012, 03:20 PM
  4. overlap of 2 objects with the same qualifier
    By mobichan in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 8th April 2009, 03:28 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
  •