question

adrianvergara avatar image
adrianvergara asked

Instantiating Player Statistics or Data on Account Creation?,How to instantiate UserStatistics on Account Creation?

How would we go about instantiating default custom player statistic/data fields for things like currentXP = 0, currentAcctLevel = 1 etc. upon an account creation? Any tips would be greatly appreciated. Additionally, would account-level fields such as these be better suited to title/player data or player statistics?

,

How would we go about instantiating certain player statistics that we then want to call in-game upon an account creation (e.g. being currentXP = 0, userLevel = 1 etc.) Any tips would be greatly 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.

1 Answer

·
brendan avatar image
brendan answered

The simplest way would be by setting up an Action trigger in PlayStream that calls a Cloud Script in which you set up the base statistics and data, when the player_added_title event occurs.

As to when to use a statistic instead of data, the rule of thumb to go by is, do you want a leaderboard for the value, or will you want to drive segmentation based upon the values? If so, then use statistics. If not, data works.

1 comment
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 commented ·

Additional: You could also use this method to add inventory items to the player. However, triggered scripts in our legacy Cloud Script service have very limited runtime. If you need to do many operations for player "setup", we would recommend using Azure Functions. We will be providing integration with Functions later this quarter, so that you will be able to trigger them from PlayStream events, as well.

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.