User Tag List

Results 1 to 8 of 8

Thread: How do I stop the player moving through objects?

  1. #1
    No Products Registered

    Join Date
    Jan 2016
    Location
    Adelaide
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How do I stop the player moving through objects?

    With previous engines, this would just be a matter of creating a collision shape around the picture and being done with it.
    It's not that simple here, and I'm hoping that I've missed something.

    Here's what I have done:

    I created a character. We'll call him Bob.
    Bob has a space ship that is next to him on a planet he crash landed on.
    Unfortunately, Bob walks all over the spaceship like it's not even there when he should obviously stop. He's not a ghost.

    To circumvent this, I created an active object called "Collider" under his feet. The "Collider" object is updated to be underneath him on an Always loop.
    I made an event that says "When collider collides with spaceship, STOP Bob."

    Simple? Not really. The "Stop" parameter works when Bob is leaving the screen, but it has no power in this scenario. I have no idea why.
    The most troubling thing is that the collider is recognized. If I use an event to teleport Bob instead of "stopping" him, he warps. The issue seems to be with the Stop command.

    What am I doing wrong?

  2. #2
    Clicker Fusion 2.5 (Steam)Android Export Module (Steam)

    Join Date
    Dec 2015
    Posts
    59
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Set the x/y positions
    If bob x => 101 position bob at x = 100

  3. #3
    Clicker Fusion 2.5Fusion 2.5+ DLC
    casleziro's Avatar
    Join Date
    Mar 2013
    Location
    United States
    Posts
    676
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    STOP and BOUNCE etc only work with the clickteam built-in movements (8 direction, platform and the like). If you're trying to move Bob with events (such as directly altering his position one pixel at a time) they won't work. If you are using the standard movements, then try to replace that "collider collides with" to a "collider is overlapping"

    Also, make sure the objects are on the same layer. Objects on separate layers can't collide.

  4. #4
    No Products Registered

    Join Date
    Jan 2016
    Location
    Adelaide
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This worked, casleziro. However, now when Bob touches the ship, he stops moving completely, unlike when I stop him at the edges of the screen and he cannot move out any further.

    As soon as he touches the ship, he is unable to move in any direction.

  5. #5
    Clicker Fusion 2.5Fusion 2.5+ DLC
    casleziro's Avatar
    Join Date
    Mar 2013
    Location
    United States
    Posts
    676
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    If you're using the default movements they will be fairly buggy like this unfortunately. Using "bounce" instead of "stop" should remedy that somewhat.

  6. #6
    No Products Registered

    Join Date
    Jan 2016
    Location
    Adelaide
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It will do for now, I guess. But there has to be a better solution. Bounce simply causes Bob to slide away from the star ship.

    When he bounces away, he just... slides, everywhere. And you can still control him, to go over the ship. I am making some puzzles, and he can simply slide over those too. :/

  7. #7
    Clicker Fusion 2.5Fusion 2.5+ DLC
    casleziro's Avatar
    Join Date
    Mar 2013
    Location
    United States
    Posts
    676
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    I recommend looking into the Platform Movement object extension. It should be available from the extension manager, and if not then floating around the forums. Very simple and intuitive, and much less buggy. Here, I made you an example engine in only 7 events, and it takes care of slopes and such for you: simple PMO platformer.mfa Double click on the PMO extension to edit the physics values.

  8. #8
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    happygreenfrog's Avatar
    Join Date
    May 2011
    Location
    I.L.T.D.O.I.R (I.L.T.D.O.I.R's Location: The Dimension Of Infinite Recursion)
    Posts
    4,303
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    FYI, the physics platform movement is significantly less buggy than the old built-in one.

Similar Threads

  1. Stop player from jumping
    By Pesto in forum Fusion 2.5
    Replies: 15
    Last Post: 30th August 2015, 07:14 PM
  2. Backdrops don't stop copied objects from moving when touching 1 but other objects do
    By D_Light in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 2nd April 2014, 05:18 AM
  3. [BUG] Objects stop moving, events stop working in Flash build only.
    By N64Mario in forum Flash Export Module 2.5
    Replies: 5
    Last Post: 13th March 2014, 06:42 AM
  4. Player moving infront and behind objects
    By Hydra in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 17th January 2013, 05:03 PM
  5. how do you stop active from moving while jumping?
    By Meegol in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 6th February 2009, 10:40 AM

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
  •