setAllPlayersMultiactive

Game development with Board Game Arena Studio
Post Reply
User avatar
shapeshifter999
Posts: 27
Joined: 18 January 2018, 02:23

setAllPlayersMultiactive

Post by shapeshifter999 »

Ho Ho Community!

Curiosity, in a game like 7 wonders or Dice Hospitals, all players play their turn at the same time.

When an action occurs:

1) how do we know which player did the action?
2) how do we stop his hourglass spinning for this player?

Thank you!
Sebastien
User avatar
thoun
Posts: 1621
Joined: 10 December 2020, 22:25

Re: setAllPlayersMultiactive

Post by thoun »

There is a getcurrentplayerid method or something like that, just check studio docs. Same for making a player inactive in multiplayer state ;)
User avatar
shapeshifter999
Posts: 27
Joined: 18 January 2018, 02:23

Re: setAllPlayersMultiactive

Post by shapeshifter999 »

Ho Ho Thoun!

You were right:

getCurrentPlayerId()
Get the "current_player". The current player is the one from which the action originated (the one who send the request).
Be careful: It is not always the active player.
In general, you shouldn't use this method, unless you are in "multiplayer" state.
I never make the link between inactive -> stop the hourglass.

Thank you!
Post Reply

Return to “Developers”