User Tag List

Results 1 to 9 of 9

Thread: Collisions failing for some cursed(?) objects

  1. #1
    Clicker Fusion 2.5 Developer

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

    Collisions failing for some cursed(?) objects

    OK, to the best of what I can figure out, there are certain objects that are cursed with not registering collisions. However, they are cursed only relatively to the frame I'm working on.

    I'm talking about the "OBJ1 collides with OBJ2" condition, as well as the "OBJ1 overlaps OBJ2" condition.

    I got this big game project, all sorts of stuff going on in one frame. For most objects, these conditions will work. But for some, which seem to be randomly chosen at the time they are created, these collision events will never get triggered, no matter with what other object I test for them colliding with.

    I figured, maybe it was the properties of the object.
    So I took the cursed object (here an active picture object, but my other cursed object is a normal active object, but that's another matter), and the other object that the cursed active picture was to collide with. I took these two objects, and I dragged them into a new frame. I kept all their properties the same, and I set them up so they would collide in the same way that they were in the cursed frame. Surprisingly, there was no problem is the new frame! The collision was registered just as it should.

    The other thing I thought of was that maybe the group that the collision was being tested in was inactive. That was not the case however, since other events in the same group got triggered.
    Oh, and I am very sure that the collision event was not triggered, because I told MMF2 to Exit if collision occurred.

    I'm using MMF2 Dev - build243 (downloaded last week, since there is no better way to tell which 243 it is :P).

    So does anyone have any ideas why some objects seem to be cursed with the fate of not triggering collisions, but only in the apparently also cursed frame I'm working on?

    I'm using a bunch of extensions, nothing too obscure though. heh

    If a ClickTeam staff member would care to look at the source, I'll send it, but I'm not releasing it out for just anyone to see. Sorry. :P

    I'll try downgrading to b242...maybe it's the new build or something. No idea...none at all....

    Edit: Nope, build242 doesn't make anything better. haha

  2. #2
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module
    Tiles's Avatar
    Join Date
    Jun 2006
    Posts
    1,359
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Collisions failing for some cursed(?) objects

    I had a similar problem. Seems to be something with layering the objects in frame. Not talking about layering while runtime. But the order of objects in Frame Editor.

    Try this to check if its the same bug: open the Frame Editor with your trouble frame. Top menu. Go to Arrange/Order/Order by / X / Decreasing to change the order of your objects in frame. Now run the app. When now other objects are affected by not reacting to overlapping or colliding then it's the same bug

    In this case Francois still has the example file for this bug. And he should work at it. I keep my fingers crossed that he can catch the bug

  3. #3
    Clicker Fusion 2.5 Developer

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

    Re: Collisions failing for some cursed(?) objects

    I'm an idiot.... Seems that things will only register collision if they are in the same layer. Sorry, this whole layer thing is new to me. :P

    However, I found another bug while frantically deleting objects so I could post the bug that seems to be a features...

    Although, I have to say. Checking for collision between things in different layers could be useful. I think if something in layer 1 collides with something in layer 2, it SHOULD register. Why not? If you didn't want to check for collision...you wouldn't have made an event to do something in this case, no? :P

    Anyway, it seems after I frantically deleted things, some objects turned into ghosts. That is, in the frame editor, they were listed, but they are nowhere on the frame, and they are also not listed in the event editor.
    Furthermore, if you click on them (either in the frame editor's side-panel list, or in the app's list of objects), NO PROPERTIES are displayed. Ghost objects! Crazy. hehe

    I'll upload that cca as an example...

  4. #4
    Clicker Fusion 2.5Fusion 2.5+ DLC

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

    Re: Collisions failing for some cursed(?) objects

    Code6:
    I feel the same when after a few hours I found out that overlapping works just in the same layer..its MMF1.5 habbit to think that all you see can collide or overlap

  5. #5
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Collisions failing for some cursed(?) objects

    To check for collisions between objects in different layers, you can create detector objects that always follow the first object but exist on the same layer as the second one. It's not perfect, but it works.

  6. #6
    No Products Registered

    Join Date
    Dec 2006
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Collisions failing for some cursed(?) objects

    For a while there, Code6, I thought you were talking about a problem that has been plaguing me: collisions not detecting.

    Except that in my case, I understand layers and they're not the source of the problem.

    In my game, every time you hit Control, your guy fires a bullet. Now, he's flying over a rock, also an active object. The bullets are supposed to be destroyed when they collide with the rock.

    Simple enough.

    Except that, intermittently, this doesn't happen. The collision is not detected.

    I think it has something to do with the movement. I've noticed the problem seems to crop up when the guy is heading at the rock, and the rock is heading at the guy, and you're firing many bullets. Out of, say, 12 bullets, 11 will be stopped.

    But one will "get through." And it looks so bad!

    To make sure, I also coded "if the bullet is overlapping the rock, destroy bullet," but the same problem happens. For a long time, I thought the problem was with my coding. But after re-tooling the command in various ways, I'm now convinced it has something to do with MMF's mysterious inner workings.

    Does anybody have any insight into this?

    (Using MMF II Dev, build 243 with all bonus packs installed.)

  7. #7
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Collisions failing for some cursed(?) objects

    Is it because the rock and bullet are moving a sufficient number of pixels each to pass right through each other rather than ever overlapping?

    If that's the cause, this can be solved using fastloops and moving the object(s) one pixel at a time on each loop, attempting to detect a collision each time. There are a couple of tutorials around to get the basic idea of them.

  8. #8
    No Products Registered

    Join Date
    Dec 2006
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Collisions failing for some cursed(?) objects

    DavidN, would you be so kind as to explain how to detect for a collision on a fastloop?

    I have rudimentary familiarity with fastloops: I can make a functioning one, and I've been through a couple of tutorials.

    But how would you code "detect for collision"?

    Thanks.

  9. #9
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Collisions failing for some cursed(?) objects

    You'd have to set up a fastloop to run (x) amount of times, and on each pass of the fastloop ("On loop" event), move an object by one pixel in the direction that it's supposed to be going. Then set up another "On loop" event:

    + On loop nameofloop
    + Rock is overlapping Bullet
    -> Put collision handling actions here.

    I think you'd have to run two separate fastloops for moving the rocks and the bullets.

Similar Threads

  1. Object registering collisions, but failing to do certain events
    By Storsorgen in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 29th April 2012, 02:46 PM
  2. Collisions Between Active Objects & Image Objects?
    By mkj5025 in forum The Games Factory 2 - Technical Support
    Replies: 3
    Last Post: 18th February 2009, 08:58 PM
  3. Collisions between 2 objects on different layers
    By Del_Duio in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 3rd December 2008, 04:06 AM
  4. Phizix - Objects out of collisions
    By MechatheSlag in forum Multimedia Fusion 2 - Technical Support
    Replies: 12
    Last Post: 30th January 2008, 05:02 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
  •