question

doublebytegaming@gmail.com avatar image
doublebytegaming@gmail.com asked

Giving default items to new players

I am trying to figure out how to give a default item to new users automatically.  Can anyone point me in the right direction?  I was guessing maybe this was cloud script type feature?

Any help appreciated

10 |1200

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

brendan avatar image
brendan answered

Actually, there's an easier way to do this, now. Simply create a PlayStream Event Action where the Event Type is "com.playfab.player_added_title", and give it an Action of Execute CloudScript, calling the Cloud Script that does what you want for a new player. That particular event only occurs once for a player per title, the first time they log into it (even if they have a pre-existing account due to having played another of your games).

10 |1200

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

brendan avatar image
brendan answered

You are absolutely correct - the best way to approach this is with a Cloud Script that runs when the user signs in. You can use that script to check if it's a first-time user experience, and so add specific items to the player's inventory, as well as check what version the player profile is, when you later update your game and need to make changes to players based upon that update.

10 |1200

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

Amar avatar image
Amar answered

Is there an example of this script that we can run, and check if a player is first time player?

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.