Forum Discussion
adjusting the amount of animations (motion path) to left or right percisely not manually?
I am planning to make a snake and ladder program with a hundred houses. For the object, I have planned to move to the right, left and up by one house(animations..direction=none.....relative start point). Depending on the number that each dice brings, this movement in one house will turn into a movement in several houses. Because the adjustment of these movements is manual, if it deviates slightly up or down, after ten or twenty movements, the amount of this deviation will increase and the nut will come out of its house. How can you be sure that the movement adjustment is the same amount to the left as it is to the right, so that the imbalance does not cause a large amount of deviation after ten or twenty moves?
- MichaelHinzeCommunity Member
You can use the Size and Position dialog for a motion path to precisely set its parameters.
- mahbag-e8b66d7eCommunity Member
Hi thanks
- PhilMayorSuper Hero
You can also set ups a relative path for each direction for 1 pixel and then whenever the dice rolls create a loop function to repeat the path until the number is reached.
- mahbag-e8b66d7eCommunity Member
- PhilMayorSuper Hero
I am not sure the board is distributed vertically and horizontally, it should be simple to create the paths, if you get up and down working as relative paths and I would set the ladders and snakes as normal paths so they align directly with centres. There is often a 1 pixel drift, I often use a non relative path to fix the drift.
- mahbag-e8b66d7eCommunity Member
Hello, thanks.I have sent you my project, please review it and provide the necessary guidance. Thank you
Hi Mah,
Thanks for sharing a copy of your project file. I took a look at it and saw that the endpoints of some of the animations weren't directly centered, which might explain the deviation your objects are experiencing.
It might take some trial and error to correct, but you'll want to make sure that the game piece lands dead center on the squares each time, otherwise the position of the object will start to deviate the more it moves up the board.