question

Nata Tooma avatar image
Nata Tooma asked

Getting Started - The Player's first session

Reference Game Design - ArchHero

It's the first run for the player. I need to grant the player - the Default Character and the Default Weapon. But first, I need to detect if this is the Players first run.

It seems like there are a lot of Player Info API calls, PlayerProfile, PlayerData, PlayerInventory. Or maybe there is a better recommended approach

Just looking for a little direction here before I try to reinvent the wheel.

If (ANSWER GOES HERE)

{

GrantDefaultStuff()

StartPlayerTutorial()

}

Player DataPlayer Inventory
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

·
Seth Du avatar image
Seth Du answered

A simple way to grant players with Character item or Weapon item first time they play the game is to use Rules.

You can create a rule in your Game Manager, then:

  1. Name the rule
  2. In the event type field, choose “com.playfab.player_added_title” (This event is triggered when a player creates a new account for a title)
  3. Choose Add action
  4. In the type field, choose “Grant item”, then you can choose the Catalog items to grant to the player.

You may also add another action in the rule that “Execute CloudScript”, while defining StartPlayerTutorial() in your CloudScript.

Please refer to Actions and rules quickstart and CloudScript to see the tutorials of Rules and CloudScript.

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.