User Tag List

Results 1 to 5 of 5

Thread: Messing with collision masks

  1. #1
    Ben2theEdge
    Guest

    Messing with collision masks

    Here's a good one for you MMF gurus: Let's say I want to create an enemy which is, say, 40x40 pixels, but I want the collision detection to only detect it as being, say, 32x32 pixels. Basically, I need to make an enemy which is 40x40 able to walk through a space that is only 32 pixels high. It would have to work even when there are more than one of these enemies on the screen. Maybe all I need to do is attach two objects together but usually when I have attempted that with multiple copies of the same object on the playfield at once, it's just been a disaster. Any advice?

  2. #2
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jun 2006
    Location
    England
    Posts
    3,536
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)

    Re: Messing with collision masks

    Try to use two objects.
    [events]
    *Always
    -Set position of Collision Object to position of Visible Object.
    [/events]
    Remember: Hotspots are important. You can cross-link alterable value A's with the fixed value of the pair.
    .:::.Joshtek.:::.

  3. #3
    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: Messing with collision masks

    You should dive into fastloops to nail instances together. First spread value in an Alterable Value of all involved objects. Then start loop Number of Objects times. And on Loop when the Alt Val is the same you set the position relative to each other.

    Could look like this:

    Start of Frame: Spread Value Alt Val A in Object A + Spread Alt Val A in Object B

    Always: start Loop "nail"

    On Loop "nail" + Alt Val A of Object A is equal Loop Index "nail" + Alt Val A of Object B is equal Loop Index "nail" : set position of Object A to 0/0 of Object B

  4. #4
    Clicker Multimedia Fusion 2 DeveloperiOS Export Module
    Nifflas's Avatar
    Join Date
    Jul 2006
    Posts
    2,613
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Messing with collision masks

    I think this question opens up for another question. Would the feature to draw a custom collision mask for an object in the picture editor be useful (we can draw the alpha channel now, drawing the collision mask would work a similar way)? I'd say yes, I'd use that feature all the time.

    Yeah, there's ways involving linked objects and fastloops to get around the problem now too But my suggestion would sure be useful, and simplify the process a lot.

  5. #5
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jun 2006
    Location
    England
    Posts
    3,536
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)

    Re: Messing with collision masks

    Quote Originally Posted by Tiles
    You should dive into fastloops to nail instances together.
    Before going into fast loops just try using the always event as I stated. This should work fine so long as the number of objects is equal and if you want to destroy one of them you also destroy its pair. There may be co-ordination which will require fast loops, tho.
    .:::.Joshtek.:::.

Similar Threads

  1. Any way to move layers down without messing up events?
    By Outcast in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 27th February 2012, 09:38 PM
  2. Collision Masks for every object?
    By Alves in forum Multimedia Fusion 2 - Technical Support
    Replies: 13
    Last Post: 17th January 2010, 11:53 AM
  3. Collision Masks?
    By Atherton in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 25th June 2009, 05:43 PM
  4. MMF2 messing up when I divide by a counter's value
    By Delmore in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 21st February 2008, 10:37 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
  •