actor move to specific fixed area
barbaraaaaaa
Member Posts: 11
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?
Comments
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...?
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
i want to click the player and the player automatically move to the area. i'm sorry i'm very new to this
i have it works now. Thank you
You're welcome.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User