question

haoshi avatar image
haoshi asked

Reward as prompting several items for user to unlock, each has a different price

So, there are bundles and containers that can hold multiple items, but everything inside would be granted to the user all at once. What I want is the ability to grant them a reward, which consists of 3 different items with different prices, and the user can pick one to unlock, say one costs 50 gems, one an ad, and one for free. How would this be approached?

pricing
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

·
Citrus Yan avatar image
Citrus Yan answered

Hey, according to your description, the effect you are trying to reach sounds more like a store to me. You could create a store that contains different items with different prices, then grant the players access to it when they have reached a certain stage you set. In this way, you may achieve the effect you are looking for. If you have any problems when using PlayFab, please feel free to discuss it with us.

By the way, here is the doc you need to refer to: https://docs.microsoft.com/en-us/gaming/playfab/features/commerce/stores/

3 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.

haoshi avatar image haoshi commented ·

That makes a lot sense, thank you for the quick reply! Another thing is about ads, I don't see any documents on managing ads, how to make a store item's price an ad?

0 Likes 0 ·
haoshi avatar image haoshi commented ·

Actually, nvm, I figured out a way to do it, basically, set a currency for ads, whenever an ad is successfully played, I use cloud script to add 1 to that currency, and consume it by calling purchaseItem.

0 Likes 0 ·
Citrus Yan avatar image Citrus Yan haoshi commented ·

Hey, your approach sounds good to me. However, every time when a user is trying to unlock the ad item, you’ll need to check if the ad is successfully played, execute CloudScript to grant him 1 ad currency and then consume it by calling purchaseItem, in this way you doubled PlayFab execution time and maybe more. Anyway, what I am saying is that you could also set this ad item’s currency to be the free currency, when the player hasn’t watched the ad, disable the interactivity of the unlock button, in this way, you’ll only need to call purchaseItem and no ad currency is needed. This approach is more economical but is less safe than yours. You can think about both of them and come up with a better one.

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.