How to stop an actor from accelerate after x-y position

Lets say that we have an actor:

Accelerate
Direction: 90
Acceleration: 20

When the actor has reached a certain x and y position, I would want it to stop moving, how can I do it?

Thanks in advance

Comments

  • UtopianGamesUtopianGames Member Posts: 5,692
    edited March 2014

    @Abdilatti The best method i have found is to make a self boolean lets call it Moving set to true (check the box) now if self.position.y > 290 for e.g. change self.Moving to false and simply use a rule if self.Moving is false move direction 0 speed 0.

    I used to use constrain motion linear x & y to 0 but this works better imo as the code is lighter.

    Demo project attached…

    Darren.

  • AbdilattiAbdilatti Member Posts: 43

    @DeepBlueApps Thank you man :) i will try this out

  • UtopianGamesUtopianGames Member Posts: 5,692

    Let me know how you get on.

    Darren.

  • AbdilattiAbdilatti Member Posts: 43

    @DeepBlueApps Yeah it worked, thanks alot! :)

  • UtopianGamesUtopianGames Member Posts: 5,692

    Glad I could help gl with your game.

    Darren.

Sign In or Register to comment.