Download

Can't Get smooth movement in Turn-Based Game

Hey guys!

I’m making a game like Monopoly, with pawns moving in a linearly square board. I have a Player Controller moving two Pawns. They’re moving in the right logic, advancing one house at a time according to Action Points (there’s a ‘Play Dice’ button that each player gets in the beginning of a turn and the result is stored in AP and used for movement). I’ve researched how to do that and I was pointed to Timeline, AI Move To, Simple Move to Location, but appareantly I’m doing something wrong because nothing is working properly.

I managed to get stepped/teleport movement with Add Actor Local Offset, getting Actor Location and adding 100 units to the location (100 is the size of each tile). While trying to get a smooth movement, I’ve added a simple Timeline that gets 0 to 1 value in 0 to 1 seconds. The current behavior is that the Pawn is moving crazily way more than it should and it is not respecting the action points, advancing the right number of houses.

Ideally I need the pawns to move smoothly in local X, advancing one house per AP, and in local Z, going up and down to simulate a boardgame pawn movement.

Any ideas?

Thanks a lot!

Here are some screens:

The Game

Movement logic
81ba08829b0dd55096072841cdf9e91bd75a94f8.jpeg

Manual While Loop (I call the Move Pawn function for each AP the player gets)
0703564d8a5d8b2036b8993ff8f420bfc3678b57.jpeg

Update: Found my way to the solution. The issue was I was concentrating too much logic in the Player Controller. The movement logic works best inside the pawn itself.