Download

Division for movement?

Hi there!

I have little problem. Side scroller, turn-based fights, levels are figurally divided into sections. And NPC/hero must walk from senter of one section to another. I press “D”, hero moves 100 pixels (texels, light-years, does not matter) to the left, I press “S” - hero moves 100 pixels to the right. How to do it properly? How to divide movement of characters? With Target Points, or changes in movement Blueprint?

Can you please post a video of what you are trying to achieve? Perhaps from another game.

I’ll try to show on picture

dbf90df17d75a8315d674f95e9949f2ecc9c7e5e.jpeg

As You see, level is divided into sections. White siluettes are places main hero or NPC could be in. When “A” or “D” is pressed for a single time, hero changes position and stands only at white siluette. He must not stop between them.

I’ll try to explain. Remember Fallout 1&2? Both games have hexagonal-based levels. Your character was able to move from center of one hexagon to center of another. He couldnt stand between them.

I understand now. I’m not home at the moment but I’ll do my best to assist once available.

41b4bd2f337dd66b6941d16c00e2eef14e9e1aa6.png

This is only to move right but you could do the same thing to move left by changing the World Direction.

What I’m doing is when G is pressed (let’s say our Move Right button) I trigger a set a variable indicating how far I want to move (50 units in this case), and enable a boolean that is checked per Event Tick.

When bool is true move player 1 unit, subtracting from 50 units. Once at 0 stop movement.

This method works but could definitely use some improvements. I’d recommend instead of using an event tick just do a Loop with a world delta delay per each move.