User Tag List

Results 1 to 5 of 5

Thread: How do I make an object stop in collision?

  1. #1
    No Products Registered

    Join Date
    Dec 2006
    Posts
    319
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How do I make an object stop in collision?

    Sorry for the noob-ish question, but everyone's got to start off from somewhere, right?

    So, I'm using two active objects, one of them is invisible. I have a collision event between the two. I don't know what to do to make the first object (which is my character) stop when it hits the second object (which stands for a house). They are both marked as static objects, so the movement options are all greyed out but even when I made the character a bouncing ball and used "stop", it still didn't work. So what do I do?

  2. #2
    Clicker Fusion 2.5 DeveloperSWF Export Module

    Join Date
    Jun 2006
    Location
    Turku, Finland
    Posts
    1,023
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How do I make an object stop in collision?

    If they are static, they don't move so they can't collide. Unless you are using a custom movement. If you are, it would help to know how do you move the objects.

  3. #3
    No Products Registered

    Join Date
    Dec 2006
    Posts
    319
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How do I make an object stop in collision?

    Ok I took a pic of my screen to show you what I'm doing with the movement:



    I'm trying to learn more about custom movements, the presets aren't enough to do what I have in mind so if you have any suggestions, it would be very nice.

    Btw some of these conditions (epsecially in the start of frame event) are just left outs of failed attempts.

  4. #4
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How do I make an object stop in collision?

    If you're using a custom movement that involves manipulating the X and Y positions of an object directly (which I think you are, judging from the events) then, further down the event list than any event that moves the objects, you have to check whether the two objects are overlapping and, if so, move them away from each other again so that they are no longer overlapping by the time the frame updates.

    From what I can gather, you're using Alterable Value B as a flag to detect when the player is moving? You could change the value it's set at to distinguish between the left and right keys being held, and insert events like:

    + Player Object is overlapping Wall
    + Alterable Value B("Player") == 4 [Or some other condition to check that the player is heading left]
    -> Add 3 to Alterable Value X [To set the player back to the right by the same number of pixels that he moved to the left].

    And a similar event for the movement to the right.

  5. #5
    No Products Registered

    Join Date
    Dec 2006
    Posts
    319
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How do I make an object stop in collision?

    Ha that works, you make me so happy, thank you so much! I've been working on the graphics for days now and I can't wait to start putting them into action.

Similar Threads

  1. How to make an object fall on another instance of the object and stop?
    By Outcast in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 20th June 2013, 09:42 PM
  2. Stop on collision problem
    By Reckless_Cowboy in forum The Games Factory 2 - Technical Support
    Replies: 2
    Last Post: 9th June 2011, 05:08 AM
  3. How to make a object's motion stop at the start of
    By Lillmissthang in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 21st February 2010, 09:27 PM
  4. How do you make an object stop in custom movement
    By fish20 in forum The Games Factory 2 - Technical Support
    Replies: 9
    Last Post: 18th December 2007, 09:30 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
  •