-
From what I can tell, it doesn't seem possible to programmatically end the stage for players other than the one taking an action ( The scenario I have is a vote, where everyone is put into the same stage to allow them to vote out of turn order. If anyone says no, I need to end that stage for everyone else, as the vote has already failed. Another use-case I was considering is where the first player to do something in a stage would win that stage and so the stage should end for everyone else too. As this can happen in the middle of other stages, I'm using the revert option with Is there a known workaround to achieve something like this, or is it something new that needs support? Do subsequent |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I think there may be some limitations with how stages work currently for this scenario. As you mentioned, You can obviously end the stage for everyone using // Enter the voting stage
setActivePlayers({
all: 'vote',
// Store the current active players as the next value
next: {
value: ctx.activePlayers,
// `next` can also be nested if you need a revert-style stack
// next: ctx._nextActivePlayers
},
});
// End the voting stage, using the stored “next” value early
setActivePlayers(ctx._nextActivePlayers); This could also be accomplished by storing next/revert values in
Yes, each subsequent call stacks on top of the previous one. These are stored in the |
Beta Was this translation helpful? Give feedback.
I think there may be some limitations with how stages work currently for this scenario. As you mentioned,
revert
(and also thenext
option) are only activated onceactivePlayers
becomes empty, so to trigger them you need to callendStage
for each player. Perhaps the missing API is something like anendAllStages
event, to trigger that next/revert step early.You can obviously end the stage for everyone using
setActivePlayers
, but this doesn’t play well with therevert
option. You can possibly workaround this by usingnext
instead ofrevert
. The only limitation is that this won’t work co…