Collisions with sub-pixel like movement

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.
  • So I just begun making a game I've been planning for months now, and the beginning is suposed to be like inside of a computer, so I wanted the movement to be choppy, so I made this: (imagine this is the event editor)


    every 0.70 seconds (player active object)
    upon pressing (all of the wasd and arrow keys here in different events) Set position at (+/- 15 in the x/y axis in different events)

    And I want to make it like some kind of maze, but with the things I know about normal movement with collisions in ctf don't work with this, the player object just goes through the backdrops that are meant to be barriers.

    If you have any solutions, it would be really apreciated if you shared them with me.

    Thanks

  • You can create your own barriers and collisions.

    I've attached an example - in the example I've left the barriers visible - but in your game you can make them invisible and just place them along the edges of your graphics.

    Move the player using arrow keys - the player in this example is the default active object.

    It's important that the barriers are thick enough that the player can't run through them quickly.

    Casual games: Please login to see this link.

  • You could use a small sensor that positions itself in the direction you are heading. So, for example, if move right is pressed, position the sensor +15 pixies to the right of your player. If the sensor does not detect any obstacles, move right by 15 pixies

  • Thank you, but the active I have for the player object doesn't have eight directions type movement, the movement it has it's the one in the description of the thread.


    every 0.70 seconds (player active object)
    upon pressing (all of the wasd and arrow keys here in different events) Set position at (+/- 15 in the x/y axis in different events)


    So the thing you showed me won't work with the kind of character I have, so maybe a similar technique could be used and it might just work

  • I think I just figured it out, by making it so that when the object player collides with the barriers, which each were made along with their position on the frame (up barrier, left barrier, right barrier, and down barrier), the player object teleports 9 in the direction you want the model to stay, (for the up barrier is y 9, down barrier is y -9, and the same is for the side barriers, but this time in the x axis.

    You can edit the values I put there, 9 can be replaced with the number you need

    Edited once, last by coogart07 (June 26, 2019 at 7:15 PM).

Participate now!

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