question

emea avatar image
emea asked

Add Character Data after character creation

Hi,

I want to add custom character data, like experiencie, level or another things, after GrantCharacterToUser().
Is possible to do it in the server side? with Cloud Script? without the player need to be call anything, only request GrantCharacterToUser()

Thanks

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

Yes, you are able to make use of Rule feature, which is located at [Game Manager] -> [Automation] - > [Rules]. However, currently it doesn’t support being triggered by character related events. A feasible work around solution is to add WritePlayerEvent API call , which will read the character ID in the callback response of GrantCharacterToUser so that Rules can be triggered to execute specified Cloud Script function.

Also note that to read data inside the playstream event, please add context at method parameter list, then it can be retrieved via:

context.playStreamEvent.[the variable you defined in WritePlayerEvent]

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.