actor move to specific fixed area

hi everyone. i have an area actor. i want my player actor to move to the area (player actor on pressed) and overlap with the area. the problem here is, my player actor is not placed fix inside the box area. when i click the top area of the area actor, the player is placed too top and outside of boundary. how can i make the player place at the center of the area box?


  • tatiangtatiang Posts: 10,782Member, Sous Chef, PRO, Senior Sous-Chef
    edited December 2016

    Make two attributes that are type "real" and call them game.areaX and game.areaY.

    Area actor rules:
    When touch is released
         Change attribute game.areaX to self.Position.X
         Change attribute game.areaY to self.Position.Y

    Player actor rules:
    When [some condition]
         Change self.Position.X to game.areaX
         Change self.Position.Y to game.areaY

    I didn't understand if you were supposed to click on the area or the player to move the player...?

  • barbaraaaaaabarbaraaaaaa Posts: 11Member

    i want to click the player and the player automatically move to the area. i'm sorry i'm very new to this

  • barbaraaaaaabarbaraaaaaa Posts: 11Member

    i have it works now. Thank you :)

  • tatiangtatiang Posts: 10,782Member, Sous Chef, PRO, Senior Sous-Chef

    You're welcome.

Sign In or Register to comment.