How to go about these mechanics in board game?

hello, i have been making a board game in gdevelop, the players have free movement and choose on where they wanna start (3 spots) and the objective is to get to the singular last spot at the top of the mountain, making shure nobody else gets the same, and i got many things figured out already, but there is one very important mechanic that i still have not figured out and need some suggestions on.

how could i go about making a turn sistem(note: game will be played locally, always 4 players), the way i am imagineing it is, each player rolls a d6, highest number goes first lowest goes last, and then each player gets theyr turn, this has been difficult as im not shure how i could disable them in a variable way, and also how certain items whould freeze them for a set number of turns, only “simple way” i can think of is have a shared “next turn” button, that since its always gonna be 4 players, i could make it determine the amount of times it is pressed, the only way can think for disabling player movement is replacing them by a indetical looking object than returning them at their turn, and even then im not shure how to store the random order they will go on.

as i need to present this game in school quite soon i whould apreciate a suggestion by tomorrow :slightly_smiling_face:

I am not sure replacing the player object every time would be a great idea.

I’d suggest something like;

Object for each player with top down behaviour
Scene start disable the behaviour for all objects
Have a variable to work out who’s turn it is.
Set the camera position to that object and only turn on their top down behaviour.
Once that players turn is over, disable the top down behaviour and move on to the next person.

You don’t have to use top down behaviour, you can use the same logic when using physics 2.0/forces etc.

Here’s a very rough example.

oh, i have been using the move y position and x position instead of a behaviour or a force, i thought it whould be to hard to control the movement on the grid otherwise, how could i do the same thing as shown in your example with the way im handling movement?
(note: the “blockr” objects are there for the ocasional bug where pressing into a wall horizontally whould teleport you)

also if i shouldnt be doing movement like this how could i achieve the same effect using a force, and also do de deactivation/reactivation of theyr movement?

I used behaviours as it was the quickest way to use an example. You would still use the logic in the same way even with updating positions.

Wrap the logic within a variable that only allows the movement for X person. Using your above image, here is an example.

You would still need to work out a way to set the players turn, in the above example I set it randomly when pressing F1.

Since all the logic is the same for each player, you can make this more efficient/easier to maintain by using groups and functions, but that might be an idea for another day :smiley:

1 Like

ended up leaving the dice idea for later if enough time remains
someone in the discord gave a really good idea on how to use array tools plugin to do dice
you helped alot with player turn tho, thank you

1 Like