question

eayaz avatar image
eayaz asked

How can I keep a global variable that is updated by player actions?

In my game I need to keep two variables that is updated by all players' actions. There are two states, one is heads and the other is tails. When a player toss a coin and get head I need to update global count of heads and vice versa. The reason I need to do this is that, these counts will be presented to players in the main screen.

Player DataTitle Data
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Gosen Gao avatar image
Gosen Gao answered

PlayFab has the feature to store global data which is called Title Data. But it's not suitable for your situation, since it is not designed for frequent changes. For your case, you may need to use an external database to achieve this function.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.