Page 1 of 1

setAllPlayersMultiactive

Posted: 22 November 2021, 15:30
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

Re: setAllPlayersMultiactive

Posted: 22 November 2021, 15:42
by thoun
There is a getcurrentplayerid method or something like that, just check studio docs. Same for making a player inactive in multiplayer state ;)

Re: setAllPlayersMultiactive

Posted: 22 November 2021, 16:09
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!