User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 14

Thread: Collision Masks for every object?

  1. #1
    No Products Registered

    Join Date
    Jan 2010
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Collision Masks for every object?

    Hi, I have a problem with collision masks in MMF2. In my application I made a customized shoot system, creating objects with a 360║ engine. The problem appears when it collides with a backdrop. I made a collision system with fast loops and collision masks, but the collision works only for one of objects, specially the last object created. I tried to compare it with a Spread Value or use the "Pick an object" but it dont works too.
    Someone knows how to make Collision Masks works for every of this objects?

  2. #2
    Forum Moderator

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,761
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)

    Re: Collision Masks for every object?

    Maybe, after spreading values on your created objects, run a fastloop "number of objects" times.

    Marv
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    UltimateWalrus's Avatar
    Join Date
    Jul 2006
    Posts
    824
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Collision Masks for every object?

    This example will probably help you:

    http://ultimatewalrus.com/uwexamples/simple_enemies.mfa

    It implements collision masks without having to use a separate object.

  4. #4
    No Products Registered

    Join Date
    Jan 2010
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Collision Masks for every object?

    I think that you didn't understand.
    The bug is because the Collision Masks of MMF2 works only in one copy of created object (if has more then one in the frame), the collision is detected only in last copy created
    I want to know how to make Collision Masks works in all copies of this object.

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    UltimateWalrus's Avatar
    Join Date
    Jul 2006
    Posts
    824
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Collision Masks for every object?

    Quote Originally Posted by Alves
    I think that you didn't understand.
    The bug is because the Collision Masks of MMF2 works only in one copy of created object (if has more then one in the frame), the collision is detected only in last copy created
    I want to know how to make Collision Masks works in all copies of this object.

    Um... I don't know what else to say. The example I gave you has like ten objects all working correctly with collision masks.

    Maybe I'm having difficulty understanding what the problem is. Do you think you could upload the MFA?

  6. #6
    No Products Registered

    Join Date
    Jan 2010
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Collision Masks for every object?

    Ok, I uploaded the mfa in the 4shared: http://www.4shared.com/file/19141516...ion_Masks.html

    The events with Collision Masks are in the group "Object Engine".
    Hold the left mouse button to shoot an object.

    The problem is: If you shoot more then one at frame, the collision works only in one (the last created)

  7. #7
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    UltimateWalrus's Avatar
    Join Date
    Jul 2006
    Posts
    824
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Collision Masks for every object?

    Quote Originally Posted by Alves
    Ok, I uploaded the mfa in the 4shared: http://www.4shared.com/file/19141516...ion_Masks.html

    The events with Collision Masks are in the group "Object Engine".
    Hold the left mouse button to shoot an object.

    The problem is: If you shoot more then one at frame, the collision works only in one (the last created)

    I don't see what this has to do with collision masks! :P

    The reason that your code isn't working, however, is because the expressions X("object") and Y("object") only get the most recently created selected object. You didn't select a specific object in your obstacle events, so it just uses the most recent one. You gotta use fastloops instead.

    This seems like a bit of an advanced coding method for your level of experience. Might I suggest that you use MMF's built-in bouncing ball movement instead?
    (object properties-->movement tab-->type-->bouncing ball)
    Then, the only event you'd need is Collides with background-->bounce.

  8. #8
    No Products Registered

    Join Date
    Jan 2010
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Collision Masks for every object?

    The reason that your code isn't working, however, is because the expressions X("object") and Y("object") only get the most recently created selected object. You didn't select a specific object in your obstacle events, so it just uses the most recent one.
    but even using a spread value system to select a specific object, or using the "Pick an object", the collision masks ALWAYS will do the events for the last object created, this is what I don't understand, I think that it maybe a bug in Collision Masks of MMF. :|

    This seems like a bit of an advanced coding method for your level of experience. Might I suggest that you use MMF's built-in bouncing ball movement instead?
    (object properties-->movement tab-->type-->bouncing ball)
    Then, the only event you'd need is Collides with background-->bounce.
    I dont wanna use pre-defined MMF2 movement :/
    I made this 360 degrees engine of bounce and I want to use it, a pre-defined bounce only have 32 directions, is too limited for my game style.

  9. #9
    Clicker Multimedia Fusion 2
    Retriever2's Avatar
    Join Date
    Jun 2006
    Location
    United States
    Posts
    502
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Collision Masks for every object?

    The MMF selection system is a complex system with unintuitive behaviors that I could probably write a book on.

    However it doesn't look like you're being bit by the more obscure subtleties of selection. Spreading values should absolutely work here. There's several articles written on the subject if you need help with it.

  10. #10
    No Products Registered

    Join Date
    Nov 2009
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Collision Masks for every object?

    I actually need help understanding 'spread value'
    I literally have no idea how to use it and I think my current game now needs it.
    Could someone maybe point me to a tutorial or something similar to help me with spread value?

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Images And Masks?
    By Atom in forum Hardware Accelerated Runtime
    Replies: 6
    Last Post: 3rd September 2009, 03:06 PM
  2. Collision Masks?
    By Atherton in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 25th June 2009, 05:43 PM
  3. Alpha masks
    By uprize in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 11th February 2009, 11:36 PM
  4. Messing with collision masks
    By Ben2theEdge in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 7th January 2007, 03:32 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
  •