I want to make a snake and ladders game. Currently, the player starts at “grid 0” and should keep moving to the next grid until the move count reaches 0. However, right now the player only moves to “grid 1” and then stops.
Pressing key 6 simulates rolling a 6, so the player should move step by step and stop at “grid 6”.
The Grid object has a variable called Value, which is used as an ID to differentiate each grid and is also used as the animation name.
I believe the tween is constantly being triggered so it will keep restarting. Each time it will take smaller steps because it’s closer to the target and it will never reach its target. You can add a condition to check if the tween exists or use a boolean. Your choice.
Here’s how I tested it. I used a variable named ID on the Tile objects and CurrentID and TargetID on the player. I started it with a button. You could change the TargetID to CurrentID + moves