4 "x" Positions - How to Move "x" to Position 3 if "x" is in Position 2?
I have tried searching for an answer within the forums but couldn't seem to find anyone who has the same dilemma as I have. My objective is relatively simple - I want to move an Actor from one X position to 3 other positions on "touch" so I created a 0 Alpha Right Hemisphere and a 0 Alpha Left Hemisphere on the Scene and did the following commands:
(Sorry, I can't figure out for the life of it how to attach imgur images on this forum!)
Below are my "x" integer attributes which are X Positions: _Game.PanPosX1 = 162 Game.PanPosX2 = 310 Game.PanPosX3 = 480 Game.PanPosX4 = 570 also, Game.PanX is my actor's X_ **_RULE for moving to PanPosX2: (When All conditions are valid) Actor receives event - touch - is pressed Change Attribute > game.PanX to Game.PanPosX2_**
Code above will make my Actor move to Position 2, which is x=310. Works so far.
In order for you to get to position 2, you need to be in either position 1 or 3 and to move to position 4, you need to be in position 3; you can't jump more than one position but needs to be in ascending or descending sequence 1-2-3-4 position.
So my question is, can someone kindly help me make a code to move from position 2 to 3? The code I've used below (made sense in my head) doesn't work unfortunately:
RULE for moving to PanPosX3: _(When All Conditions are valid) If Attribute game.PanX = game.PanPosX2 & Actor receives event - touch - is pressed Change Attribute > game.PanX to Game.PanPosX3_
When I enable the 2nd code above, Actor just moves straight to PanPosX3 and skips PanPosX2 completely. Please help. Thank you!