User Tag List

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

Thread: How Do I Make Collision Masks For Active Objects?

  1. #1
    Clicker Fusion 2.5
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Mar 2016
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How Do I Make Collision Masks For Active Objects?

    I'm currently making a top-down rpg game, and need to make collision masks for my character and other objects. Is there any easy way to make collision masks for active objects? A visual explanation would be helpful, thanks!

  2. #2
    Clicker Fusion 2.5 Developer
    PBarwick's Avatar
    Join Date
    Jul 2014
    Posts
    390
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Make a second active object and use an event to always position it directly on top of the first object.

    You can then make it whatever shape you need. Register all collisions using the second object instead.

    When you are happy it works well, you can then make it invisible on the object properties.

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCiOS Export ModuleInstall Creator Pro
    Julian82's Avatar
    Join Date
    May 2012
    Location
    outbuddies.com
    Posts
    936
    Mentioned
    46 Post(s)
    Tagged
    0 Thread(s)
    The method of PBarwick is the way to go if you only have to handle one instance of an object, however it can get very tricky if you have to handle a lot of instances of the same object, as you will have to use for each loops to handle the correct assignment of the collision objects to their parents.
    I strongly recommend this tutorial about setting up so called "embedded" collision detectors.

    http://www.diybandits.com.au/MMF/tut...embedded1.html

    What it basically means is that you have your active object --> switch to an embedded detector animation (the shape you want) and check for collision --> switch back to your displayed animation before the renderer triggers (end of your frame loop). If you really learn how to use it will allow advanced AI programming and a lot of other fancy stuff!
    Unfortunately there is one big problem: The method is broken since build 285.0 (beta). It seems that CT changed the way animations are restored causing animations to freeze if you switch to an embedded detector and back within one frame loop. I posted it in the bugbox, but I don´t expect to get this fixed soon.. However you are fine if you use the last official release build 284.10
    Hope that helps!

    http://bugbox.clickteam.com/issues/3421

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,155
    Mentioned
    27 Post(s)
    Tagged
    1 Thread(s)
    @ Julian82: that cool method still works if you keep track of animation frame number also (i.e. in a value)
    and restore that after collision mask switching
    but yeah - would be cool if this was automatic!

    ///////EDIT: cancel that ^^ sorry -- just read your bugbox call -seems like it is happening nevertheless of frame stored now??
    Sorry - wasn't aware of this. Going to check in depth!
    Idea - maybe you can use your own frame-change timings and restore (last frame + timings) mod (number of animation frames)
    but would need using additional two values per object (at least) and storing all number of animation frames (...)
    Definitely would be cool if fixed (I'm on release build so can't actually see the issue here)

    another quite simple way, can be useful or not depending on situations,
    is using "collision boxes" made by checking X,Y coordinates of player against X,Y coordinates of obstacles
    it's a bit limited (without using fancy math) and for being really handy needs obstacles to be actives
    but doesn't need for additional objects nor animations / animations switching

  5. #5
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCiOS Export ModuleInstall Creator Pro
    Julian82's Avatar
    Join Date
    May 2012
    Location
    outbuddies.com
    Posts
    936
    Mentioned
    46 Post(s)
    Tagged
    0 Thread(s)
    @schrodinger: I found this in the change log of build 285.0, which I think is causing the problem.
    Changes in Windows Runtime:
    - Active object: the current frame duration was not reset after animation changes causing the first frame of the next animation being played too quickly

    Your are right, setting up a custom frame timing would surely fix it, but would be a lot of work... I think for now I will stick to the last release build :P

  6. #6
    Clicker Fusion 2.5Fusion 2.5+ DLC
    casleziro's Avatar
    Join Date
    Mar 2013
    Location
    United States
    Posts
    643
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    This was news to me lmao. I haven't used this method for an actual animated object for a while so I never noticed. After opening some older projects they seem to be suffering from the same problem :/

  7. #7
    Clicker Fusion 2.5
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Mar 2016
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've tried this, but it still doesn't work properly. when it tell the character to stop whe the mask hits an objects, the character just slowly walks through the object. I'm exceptionally confused!

  8. #8
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCiOS Export ModuleInstall Creator Pro
    Julian82's Avatar
    Join Date
    May 2012
    Location
    outbuddies.com
    Posts
    936
    Mentioned
    46 Post(s)
    Tagged
    0 Thread(s)
    @KryFuZe: We would need an mfa to see what´s wrong with your code!

    There´s good news on the embedded detection topic, in the latest beta a new option has been added to make it work again. Anyway, don´t upgrade to the latest beta now, it suffers from a severe array writing bug (has already been posted to the bug box).

    Here quote from the change log file: A new "Do not reset frame duration after animation change" option has been added in the Active object's properties (Run options tab), as some applications have been affected by a previous fix that was done in the build 285.0 ("the current frame duration was not reset after animation changes causing the first frame of the next animation being played too quickly"). By default this option is not checked, i.e. the frame duration is reset, you have to check it if you want to keep the old behavior.

  9. #9
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,155
    Mentioned
    27 Post(s)
    Tagged
    1 Thread(s)
    Interesting thing to know, thanks Julian82!

  10. #10
    Clicker Fusion 2.5Fusion 2.5+ DLC
    casleziro's Avatar
    Join Date
    Mar 2013
    Location
    United States
    Posts
    643
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    Checking that new option seems to gray out all Collision testing for the object, defeating the point

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Collision Masks for every object?
    By Alves in forum Multimedia Fusion 2 - Technical Support
    Replies: 13
    Last Post: 17th January 2010, 10:53 AM
  2. Collision Masks?
    By Atherton in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 25th June 2009, 04:43 PM
  3. Messing with collision masks
    By Ben2theEdge in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 7th January 2007, 02:32 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •