Most of the expressions I have completed so far have been trial and error or lucky guesses based on my limited knowledge. I can't seem to figure this one out though. I have attached a CAPx of this problem to the post.
I have an object (Hero) that is pinned to another object (Anchor). Currently Hero unpins and moves to the right of the anchor 50 pixels whenever you click/touch the screen. Super simple.
Is in Touch > Hero> Set position (Anchor.X +50 , Anchor.Y + 0)
I only want the hero to move 50 pixels in X. But I'd like it to move in a negative or positive 50 pixels based on where the mouse clicks. Mouse clicks anywhere to the left of the anchor, Hero goes left 50 pixels. Click anywhere to the right, Hero moves right 50 pixels. Obviously, my current setup only allows a +50 in X, regardless of mouse position. I have tried a lot of different setups, but have failed miserably.
Can any of you more experienced people help me figure this out? I'm sure it's really easy, but my expression skills are lacking! Thanks!!