question

Konrad Kozaczenko avatar image
Konrad Kozaczenko asked

Rewarded Ads with characters support

Hi, I successfully implemented playfab rewarded ads system in my game, but I found out that the rewards are granted to master player account instead of character which is what I want. Is there any way to change this, or is it possible to transfer rewards from master player to specific character?

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

·
Sarah Zhang avatar image
Sarah Zhang answered

Yes, you can grant the item to characters in the reward action. Since the predefined “Grant item” action doesn’t support to grant the item to characters, you need to write the custom CloudScript function for it. Then you can change the Action Type to “Execute Cloud Script” and choose the corresponding function as the reward action to achieve your requirement.

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

Konrad Kozaczenko avatar image Konrad Kozaczenko commented ·

Hi, I thought about custom CloudScript function but I need to award specific character.

0 Likes 0 ·
Sarah Zhang avatar image Sarah Zhang Konrad Kozaczenko commented ·

You can use the API call GetAllUsersCharacters to retrieve one player's all characters. Then you can choose the character you need, and call the server API GrantItemsToCharacter to grant items to characters. You can write this logic in the CloudScript.

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.