Page 1 of 1

When exactly is send game progression?

Posted: 10 September 2014, 22:08
by daikinee
Hi,

I wish to update the game progression in a game state that is the end of a turn. I've configured that state with "updateGameProgression" => true

I don't understand exactly when the new progression is send to the web clients. On each notification that i send in the state and on the leaveGameState for that state?

I see strange things in the input/output debug panel. Sometimes i see "updateGameProgression":NN (NN = progression), other times i see "updateGameProgression":true (this is the case for leaveGameState).

If i update my turn number before sending my notifications, the game progression (which is based on turn number) is right, but i update my turn number after my notifications, the game progression is not updated.

Is is a bug or should i update all the variables that are used to compute the game progression before sending my last notification for this state?

Thanks

Re: When exactly is send game progression?

Posted: 24 September 2014, 13:17
by sourisdudesert
Hi,

The update is done when entering in the state with "updateGameProgression = true", before calling the "st" method (action method) for this state.

If you need to have your action method called before game progression, you can add another empty state or move your "updateGameProgression = true" to another state.

Cheers,