GameSalad

How to stop an actor at his location upon collision?

Dell7730Dell7730 Posts: 388Member, PRO
edited March 2015 in Community Tutorials

How can I make an intended actor to stop at his X, Y position upon whatever trigger I set it to like on collision or clicking of another actor?

Answers

  • AJaymzAJaymz Posts: 164Member, PRO

    @dellagarpo make a self attribute boolean called Stop.

    -When "collision or whatever" happens, change self.Stop to true.
    -when self.Stop is false ( have your movement method in this rule)

    That way it will not be moving if collision or whatever trigger happens.

  • Dell7730Dell7730 Posts: 388Member, PRO

    @AJaymz said:
    dellagarpo make a self attribute boolean called Stop.

    -When "collision or whatever" happens, change self.Stop to true.
    -when self.Stop is false ( have your movement method in this rule)

    That way it will not be moving if collision or whatever trigger happens.

    Thanks for the response but I already figured it out

Sign In or Register to comment.