User Tag List

Results 1 to 6 of 6

Thread: Dear all, (Why are my collisions not working?)

  1. #1
    Clicker Multimedia Fusion 2Android Export ModuleXNA Export Module
    Cyberbeard's Avatar
    Join Date
    Aug 2012
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Dear all, (Why are my collisions not working?)

    Hi,

    I'm a budding designer using MMF2 as my tool to prototype games for university coursework.


    There's a issue with collision detection (or execution upon collision) in my latest game, and while I'm decent with MMF2, I sometimes fail to see the obvious issues right in front of me.

    Problem:

    Five balloons are slowly drifting upwards (placeholder event is simply adding Y to balloon's current Y), and whenever I near either of them with a player-controlled fan, they will get pushed in other directions before ascending again once the fan is removed.

    As these balloons collide, they are meant to simply stop, or bounce off each other. I have tried a dozen ways of implementing this very simple event, but no matter what I do, they eventually stack up on top of each other once I've pushed them around for a bit with my player-controlled fan.

    Why do think they aren't recognizing the collision, and executing the appropriate event?

    Thanks!

  2. #2
    Clicker Multimedia Fusion 2

    Join Date
    Jul 2010
    Location
    Yonkers, New York, USA
    Posts
    123
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Which movement type are your balloons set to? Static, bouncing or something else? I don't have MMF 2 handy at the moment, but my guess is that the other movement types, especially static, don't work well with the bounce action.

    If you think an event is not being recognized, have a sound play for the event. If the sound plays, the collision is being recognized, but it is unable to do the remaining actions for some reason.

  3. #3
    Clickteam Clickteam
    Danny's Avatar
    Join Date
    Aug 2007
    Location
    United Kingdom
    Posts
    3,016
    Mentioned
    21 Post(s)
    Tagged
    2 Thread(s)
    If you're using a static movement the action 'bounce' won't work at all. If you're using a static movement and you're coding a custom movement you'll have to detect and code the manual bounce yourself.

    If this is the case, I think Vector movement might be the best in your case for more flexibility. If not, the bouncing ball movement should do it!

    As Grim_Jester said, the best way to detect if the collision is working at runtime is to play a sound to test.
    Want to learn Clickteam Fusion 2.5?




  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    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
    Apr 2007
    Location
    Australia
    Posts
    1,152
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Cyberbeard View Post
    Hi,

    Problem:

    Five balloons are slowly drifting upwards (placeholder event is simply adding Y to balloon's current Y), and whenever I near either of them with a player-controlled fan, they will get pushed in other directions before ascending again once the fan is removed.
    If you always adding to the Y coordinate then the collision checks are going to be ignored. Try adding another part to your Y movement event that checks if a balloon is overlapping another balloon, and then negate that event (right click it and go to negate).

  5. #5
    Clicker Multimedia Fusion 2Android Export ModuleXNA Export Module
    Cyberbeard's Avatar
    Join Date
    Aug 2012
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've tried using both static and bounce movements.

    The negated upon overlapping condition suggested by RhysD did not work unfortunately. It only stopped the balloons whenever the fan wasn't near, which isn't what I'm looking for I'm afraid.

    The sound file did play upon collision between balloons, so I suppose it's detecting the collision but won't play out my bounce or stop commands.

    Any other suggestions?

    Thanks!

    Edit:

    Since the balloons aren't allowed to move anywhere but UP for as long as the fan isn't near, and only in the direction the fan pushes it when it is near, could the issue be caused by the fan movement simply winning over other movements, prohibiting them from starting?

  6. #6
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Francois's Avatar
    Join Date
    Jul 2006
    Location
    Montpellier, France
    Posts
    6,920
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    The problem with the collision condition (I'm not talking about the Overlapping condition), is that if it is true in one loop, it will NOT be true in the next loop. As you say you are moving your balloons by hand (by changing their Y coordinate), the problem must come from that.

    As Danny says, I suggest you test the Bouncing ball movement. Restrict to the minimal number of directions (8), and make sure the directions of the object is always either 4 (45° right), 8 (top) or 12 (45° left), like this :

    * Collision between Balloon and Balloon
    Balloon bounce
    * Direction of Balloon=16
    Set direction of Balloon to 12
    * Direction of Balloon=20
    Set direction of Balloon to 12
    * Direction of Balloon=24
    Set direction of Balloon to 8
    * Direction of Balloon=28
    Set direction of Balloon to 4
    * Direction of Balloon=0
    Set direction of Balloon to 4

    Not tested, but worth a try.

Similar Threads

  1. Collisions simply aren't working
    By mussashimits in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 19th July 2007, 06:25 AM
  2. Dear Clickteam, please fix frame editor rotation
    By dustingunn in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 6th September 2006, 04:36 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
  •