End a turn before time expires?
Options
Hi there!
I'm working in a turn based questions & answers game. This game has 5 turns of 10 seconds each, where two players (one in each internet side) have to answer a question. If time passes, they loose the opportunity to answer the actual question and a new question appears.
The game uses PUN 2 and now ends turns based on the 10 seconds premise. But I want to end the turn ALSO when the two players answered the question. (Think that the two players resolve the question in 4 seconds. It's a waste of time that they must wait for another 6 seconds...).
How can I achieve that?
Thank you so much for reading
I'm working in a turn based questions & answers game. This game has 5 turns of 10 seconds each, where two players (one in each internet side) have to answer a question. If time passes, they loose the opportunity to answer the actual question and a new question appears.
The game uses PUN 2 and now ends turns based on the 10 seconds premise. But I want to end the turn ALSO when the two players answered the question. (Think that the two players resolve the question in 4 seconds. It's a waste of time that they must wait for another 6 seconds...).
How can I achieve that?
Thank you so much for reading
0
Comments
-
Hi @BreynartStudios,
Thank you for choosing Photon!
PUN1 has a TurnBased demo.
While the demo is not in PUN2, the UtilityScripts used are available in PUN2:PunTurnManager
,TurnExtensions
,IPunTurnManagerCallbacks
You can get inspiration fromPunTurnManager
or even use it as is or modified.-1 -
Thank you so much!! I'll have a look this same afternoon0
-
I fail to see how that bit of documentation can be seen as a demo nor does it answer the question.0
-
If other people find this, you can end a turn with PhotonNetwork.LocalPlayer.SetFinishedTurn(Turn);0