How to create enemies that change directions after bumping into a wall?

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.
  • If the goombas turn around when they hit the wall, maybe the pictures for one of the directions is lower than the other.

    Sent from my SM-T280 using Tapatalk

    I checked and they seem to be in the same spot.

    I currently have it so if the goomba is overlapping a backdrop, then the game will subtract 1 from the Y-position of the goomba.

    I have this here so that the goomba doesn't constantly switch directions.

    He would switch directions constantly because his flag is toggled while he is overlapping a backdrop, and the game is subtracting 1 from the Y-position of the goomba when he's on a backdrop to fix this.

    This will prevent him from always being in the floor and switching directions as the flag is toggled on and off.

    When the goomba collides with a wall and switches directions, it runs the event of subtracting 1 from the Y-position of the goomba again because:

    + Goomba is overlapping a backdrop -> Subtract one from Y-position of goomba.

    So basically, it runs the event of moving the goomba up a pixel when standing on the backdrop when the goomba touches the side of a backdrop.

  • write your own gravity.

    Alt. Value A could be X Position
    Alt. Value B can be Y position
    Alt. C could be Fall strength (always set to 0 when walking on ground)
    Alt. D could be gravity, which could be set to something like 0.25
    - Actually, you prob don't need an alt. value for gravity if there won't be any change.

    Then something like this:
    Always -> [Goomba] Add 0.25 to alt. value C of [Goomba]

    X [Goomba] is overlapping backdrop -> Add Alt Value C of [Goomba] to Y position.

    Something like that, I think.

  • write your own gravity.

    Alt. Value A could be X Position
    Alt. Value B can be Y position
    Alt. C could be Fall strength (always set to 0 when walking on ground)
    Alt. D could be gravity, which could be set to something like 0.25
    - Actually, you prob don't need an alt. value for gravity if there won't be any change.

    Then something like this:
    Always -> [Goomba] Add 0.25 to alt. value C of [Goomba]

    X [Goomba] is overlapping backdrop -> Add Alt Value C of [Goomba] to Y position.

    Something like that, I think.

    Thanks, I did what you suggested and tweaked it a bit to get something I'm comfortable with :)

Participate now!

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