Hi how do i make it so that when i touch the actor it highlights it and then when i touch a place on the screen again it moves to that to my second touch
Thanks, Brandon
Comments
tatiangMember, Sous Chef, PRO, Senior Sous-ChefPosts: 11,949
edited June 2014
The highlight can be accomplished several ways: spawn an outline image actor behind the existing actor, change the actor's image, change its color, etc.
Basically, you would create an integer attribute called self.status and set it to 0. Then:
When touch is pressed AND attribute self.status=0 change Image or change self.color.red to _____, etc.
When touch is released AND attribute self.status=0 change attribute self.status to 1.
When mouse button is down and attribute self.status=1 Interpolate self.Position.X to mouse.position.X Interpolate self.Position.Y to mouse.position.Y change attribute self.status to 2
Comments
The highlight can be accomplished several ways: spawn an outline image actor behind the existing actor, change the actor's image, change its color, etc.
Basically, you would create an integer attribute called self.status and set it to 0. Then:
When touch is pressed AND attribute self.status=0 change Image or change self.color.red to _____, etc.
When touch is released AND attribute self.status=0 change attribute self.status to 1.
When mouse button is down and attribute self.status=1 Interpolate self.Position.X to mouse.position.X Interpolate self.Position.Y to mouse.position.Y change attribute self.status to 2
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User