How to start on a turn based rpg system

How would i start with a turn based rpg system like final fantasy/persona 5.

Elaborate. Explain the systems you want in place and I will see if I can help you out

for example 3v3, one of your team members gets to go first, you can choose it’s abilties or use items and choose someone to use it on, after you did that, it will be one of the enemies’s turn, and they can do as you can do. then repeat to other characters. basically pokemon but there are multiples characters

Well, to start off I recommend creating a countdown timer and rounds system. Start with this first as that is the core component of a turns based pvp system. Here is a simple rounds system loop that you can use .

local roundlength = 10

for count = roundlength, 1, -1 do
wait(1)
if count == 10 then
–dostuff
end
end)

Now, the next step would be to account for all players in the match. Say we use magnitude to detect the enemy player. once he gets detected, the battle takes place. We can create a table for both teams, and place the npc and the player in the correct table. This will allow us to easily access the npc or other player that we want to attack. We also need to set the positions of the players, that is easy i am sure you know how. We also need some values for each player and npc. When the player joins, add a bool value that will determine if the player is in a battle. then we will check this value to make sure it is false and then start the match. You can use if statements to check inside the loop we created earlier to get what attack each player is using. Anyways, you get the jist of it and good luck.

3 Likes