question

Jonathan Veit avatar image
Jonathan Veit asked

Access event properties in cloud script?

Hi,

I'm trying to acess the properties of the "player_inventory_item_added" event in a cloud script. I know how to trigger it using Rules but how can I access these properties:

->

https://docs.microsoft.com/de-de/gaming/playfab/api-references/events/player-inventory-item-added#properties

I need the ItemID and the InstanceID in order to create custom item data for the added Item.

Thanks!

,

Hi,

Im trying to implement a cloud script function which creates custom item data to an item which was added to the inventory of a player.

I've made a function in my cloud script and now I trigger it using the "player_inventory_item_added" event. In order to change the items custom data, I need its ItemID and InstanceID which should be a property of the event (if i understood this right?).

But how can I access the properties of an event?

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.

1 Answer

·
Sarah Zhang avatar image
Sarah Zhang answered

You can access such PlayStream event properties via the context input parameter of the CloudScript function. Please check this section The context input parameter for the reference.

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.

Jonathan Veit avatar image Jonathan Veit commented ·

Thanks a lot! Worked perfectly :)

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.