Im having an issue with the platform movement object (leaving screen)

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 what Im trying to do is to get the player to stop leaving the screen while using the platform movement object. If I use test position and select the edeges of the screen and set x velocity to 0 nothing happens. I tried it by putting a backdrop boarder around the frame and that worked but it made the walking animation kind of go crazy if i kept trying to walk in that direction. Is there anyway to when I hit the edge of the screen to get him to stop?

  • You can do something like this - which will keep the character on the screen.

    * Repeat while "Right Arrow" is pressed
    + X position of Active < X Right Frame - OWidth( "Active" ) // X position is smaller than the right edge of the frame less the width of the character
    [INDENT] Platform Movement object : User is holding right input key[/INDENT]


    * Repeat while "Left Arrow" is pressed
    + X position of Active > X Left Frame + OWidth( "Active" ) // X position is greater than the left edge of the frame plus the width of the character
    [INDENT] Platform Movement object : User is holding left input key

    [/INDENT]

    Another option is to create an obstacle there - and a collision event when the player reaches the obstacle that stops him.

    Casual games: Please login to see this link.

Participate now!

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