User Tag List

Results 1 to 7 of 7

Thread: Collision of object into same object???

  1. #1
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export Module
    Konidias's Avatar
    Join Date
    Aug 2009
    Posts
    1,546
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Collision of object into same object???

    Having a real nightmare trying to figure out how to do this... Basically I've set up a custom movement system and I'm trying to implement the player pushing crates of different sizes around. I've got the pushing down pretty good, the only problem I'm having is the detection of a crate pushing against another crate. All of the crate objects are of various sizes and belong to the same qualifier group. I tried doing something like detecting if group 1 is overlapping group 1 then stop pushing the crate... but this freezes the crate from ever being pushed again, since it's overlapping another one.

    I'm thinking have it detect something like if Top Y of the object being pushed is 1 pixel under the Bottom Y of something above it, that it will stop. Is this even possible? How am I supposed to have MMF tell the two Group.1 objects apart?

  2. #2
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)

    Re: Collision of object into same object???

    Do you have some condition that makes sure the crate you pushed is not overlapping once it collides with another crate? How exactly are you moving the crates (fastloops, MMF default movements, etc)? It might help if you could post a file.

  3. #3
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export Module
    Konidias's Avatar
    Join Date
    Aug 2009
    Posts
    1,546
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Re: Collision of object into same object???

    Using fastloops. I've tried both moving the pushed crate's position +1 from itself and also tried moving the crate's position by setting it's x/y in relation to the player's x/y (which resulted in very smooth movement, since it's pretty much attached to the player instead of being pushed and then having the player bump into it)

    That works fine and good, but getting it to stop when it hits another crate is the problem. I tried adding a "not overlapping" condition but like I said, it will let me push the crate into another crate by 1 pixel and then it's stuck. Since in order for the crate to not move it needs to detect that it's already on top of another crate. I need to be able to have it detect the obstacle BEFORE it overlaps the obstacle.

    I can post a file if it will help, but I figured someone might just have a general solution for this as I'm sure it's a pretty common problem with custom movement.

    I haven't used collisions, just overlaps... might that be the problem? I've never really understood the difference other than collisions only detect once and overlaps are constant.

  4. #4
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export Module
    Konidias's Avatar
    Join Date
    Aug 2009
    Posts
    1,546
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Re: Collision of object into same object???

    Okay, I managed to get it working fine with backdrop objects by using the collision mask "is obstacle" event and then doing a fastloop to check if there is an obstacle anywhere along the width/height of the pushed object (depending on if it's being pushed horizontally or vertically)

    That works fine now... But how am I supposed to simulate this condition for active objects? Can I somehow tell MMF they are also obstacles?

  5. #5
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Mar 2009
    Location
    Bethesda, MD
    Posts
    234
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Collision of object into same object???

    Uh, I wouldn't know much about this, but if you ID the crates, you could say:
    Collision between Crate and crate
    +ID of crate <> ID of crate

  6. #6
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export Module
    Konidias's Avatar
    Join Date
    Aug 2009
    Posts
    1,546
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Re: Collision of object into same object???

    Posted an example file here:

    http://www.clickteam.com/epicenter/ubbthreads.php?ubb=showflat&Number=158184&#Post158 184

    It's got what I have made so far, minus any sort of detection for crates pushing against other crates... If someone could step in and set it up or at least throw me some ideas, I'd be grateful. Thanks!

  7. #7
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export Module

    Join Date
    Mar 2007
    Location
    Canada,Québec
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Collision of object into same object???


    you will find the answer there.

    http://www.clickteam.com/epicenter/ubbthreads.php?ubb=showflat&Number=158422#Post1584 22

Similar Threads

  1. How to Delete Right-Most Object Upon Collision?
    By pinacoladaxb in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 3rd August 2012, 03:17 AM
  2. Help collision with another object
    By ASD in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 13th February 2010, 03:00 PM
  3. Collision Masks for every object?
    By Alves in forum Multimedia Fusion 2 - Technical Support
    Replies: 13
    Last Post: 17th January 2010, 10:53 AM
  4. Collision with an active object
    By Rabagast in forum File Archive
    Replies: 3
    Last Post: 3rd November 2007, 01:09 AM
  5. Collision Object?
    By Clicktastic in forum Extension Development
    Replies: 4
    Last Post: 11th August 2006, 03:33 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
  •