Closed pociej closed 4 years ago
This is available in ctx.activePlayers
, which will either be null
(no-one is in a stage) or a map of player IDs to stage names, e.g. { '1': 'stage-name' }
.
@delucis thx for quick reply. Problem is that it is always null. I see no way to have game setup that says what is start stage for player, and also even after manual call events.setActivePlayers(['0'])
or events.setAvtivePlyers({all : 'myStageName' })
or whatever it stays null.
Where are you calling setActivePlayers
? You can initialise the stages at the start of the turn using turn.activePlayers
as described here.
Okay if setup turn.activePlayers
like this i see what should be there btu still events dosnt work. I can call setActivePlayers
or endStage
nothing happened.
EDIT: IT is somehow related with SocketIO server with Local multiplayer it works. Will investigate deeper.
I used to use
phases
and now im trying to migrate to newest, i replaced phases by stages, but now im unable to read current stage. Phase field is presented in ctx object by stage is not. How then one can know what is current stage? I understand that moret han one player can be in given stage but its esential to be able to know if given player is in given stage when rendering game board.