question

petarivancek avatar image
petarivancek asked

Help with Playstream executing cloud script

Hello, I am having a hard time setting up a newly registered user. Basically, I am running into a catch 22 situation and whatever solution I try, something doesn't work. Here is the desired behaviour: new user registers I want to give him a display name I want to give him a bundle with items Some items in a bundle (Hero class) need custom data transfered to item instance

Now, each of these "steps" work on their own. I can setup the name, give a bundle, transfer data - but I just can't seem to get it working all at the same time. The reason I want it done on registration and inside the server environment is to prevent exposing a call like this on client.

I've tried using Rules - with one action, or multiple stringed actions...there is always something missing.

For instance - CopyCustomData function - if I run it from the client - works like a charm. If I run it through the web API (Run Script), it also works.

But if I try to execute it in player_added_title event - it only partially executes - only 2 of 6 items get custom data updated.

Please, could you explain why is this happening or point me to some documentation.

Thank you!

CloudScriptPlayStream
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.

Gosen Gao avatar image Gosen Gao commented ·

From what I understand, you're using the event player_added_title to trigger an Azure function to set the display name, grant the item, and modify the item's custom data. May I know your code to do all the steps in one action so I can do some research?

0 Likes 0 ·

0 Answers

·

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.