question

Brian Choi avatar image
Brian Choi asked

PlayStream action for login first time.

Hi, I have question for automatic action in PlayStream.

What I want to do is I want to give user default character when they login first time. so I tried used Rules to grant item and character but It seems after finished login, granted item and character were not included on login response. so It means I should call API to get inventory item or make code on server side as custom cloud api and make it together in same API. But I was wondering.

Brian Choi

game managerPlayStream
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.

Sarah Zhang avatar image Sarah Zhang commented ·

>> so It means I should call API to get inventory item or make code on server side as custom cloud api and make it together in same API. But I was wondering.

Could you please tell us what’s your detailed demand? You have granted the items and characters to the players successfully via Rules and CloudScript, is it right? Do you mean you want to write a CloudScript function that can return the Player’s inventory and characters?

0 Likes 0 ·
Brian Choi avatar image Brian Choi commented ·

Yeah, It does. but what I thought is I set 'Rules' as 'com.playfab.player_added_title' with grantItem and logged and created account. so when I get data from the server by login response. is item should be on my inventory?

0 Likes 0 ·
Brian Choi avatar image Brian Choi commented ·

I though, created Item will be in login response or there is option to get item that created by rules 'com.playfab.player_added_title' because we don't want to do ping-pong many times.

0 Likes 0 ·

1 Answer

·
brendan avatar image
brendan answered

No, the login event only contains information about the login. In fact, it is generated at the same time as the player_added_title event, which means the Rule to add the item/character to the player will not actually run until the login response has already been sent.

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.

Brian Choi avatar image Brian Choi commented ·

Thank you for clarify

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.