How do I stop the player moving through objects?

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • 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?

  • 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.

    Best person at writing incomprehensible posts. Edits are a regularity.

  • 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.

  • If you're using the default movements they will be fairly buggy like this unfortunately. Using "bounce" instead of "stop" should remedy that somewhat.

    Best person at writing incomprehensible posts. Edits are a regularity.

  • 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. :/

  • 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: Please login to see this attachment. Double click on the PMO extension to edit the physics values.

    Best person at writing incomprehensible posts. Edits are a regularity.

  • FYI, the physics platform movement is significantly less buggy than the old built-in one.

    My Please login to see this link. (which I actually use), my Please login to see this link. (which I mostly don't use), and my Please login to see this link. (which I don't use anymore pretty much at all really). If there are awards for "'highest number of long forum posts", then I'd have probably won at least 1 by now. XD

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!