Have Grid system, how to make a limited move, and in general a Turn system?

Hello everybody! I want to make a game where the player has 3 action tokens that he can spend on different types of actions for example movement or attack. Can you tell me or send me a link to the tutorial? there is already a grid system with character movement from cell to cell.
if you need screenshots of the cell system and movement, write, I will send

the idea looks like this. the player sees in front of him: a panel of tokens (circle painted with a token, empty without a token), 3 action buttons that he chooses (move, heel, attack). When pressing one of the buttons for the movement example, the character can move 5 cells. I think the general concept is clear

Hey @DimeurgRi!

Personally I would set it up like this:

Have a variable Integer called “Actions.”
On turn start: Set Actions ->3
On any action (Move, heal, attack) as part of that code on the unit, check for “Action > 0” and do the action, then “Set Action → Action -1”.

The UI parts and the actions themselves can be cannibalized from nearly any other style of game. You are unlikely to find a tutorial giving you a Baldur’s Gate 3/Divinity style system as a whole (fire emblem maybe?) but you should be able to find bits and pieces throughout our tutorials here on the Epic Dev Community and Youtube! Try looking for specific things and going one at a time.

Don’t worry about the action economy yet- start with making the actions, then you can make a function as I outlined above (Check action count and decrement action count) for reuse!

1 Like