question

galichakristoffer avatar image
galichakristoffer asked

how to update Currency (Coins / Gem) i have created a quiz game everytime the player got a correct answer they will be earning coins. how can i update the virtualcurrency?

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

·
brendan avatar image
brendan answered

The short answer would be: https://api.playfab.com/documentation/server/method/AddUserVirtualCurrency. There's also a Client API version available, if you want to turn that on, but I'd advise against that. Making the client authoritative about VC is a guarantee that players will cheat. So the general answer is that you'd use server-authoritative logic to process the answers and reward the VC. If the player can only do a few of these per minute, you could potentially process this via Cloud Script, but you may want to consider using a custom game server, if you want to have tighter control over the experience.

4 comments
10 |1200

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

galichakristoffer avatar image galichakristoffer commented ·

thank you sir got this working !!!

0 Likes 0 ·
galichakristoffer avatar image galichakristoffer commented ·

sorry for folow up question ,, but how can i update the UI/ Text without restarting the app?

0 Likes 0 ·
brendan avatar image brendan galichakristoffer commented ·

We don't interfere in the display layer of your game in any way, so how you want to display the information to the player is entirely up to you.

1 Like 1 ·
galichakristoffer avatar image galichakristoffer brendan commented ·

my problem now is i need to stop and play again to update the text. tnx!

0 Likes 0 ·

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.