question

Raf avatar image
Raf asked

How to create a custom Group system using CloudScript?

Hi there,

I'm trying to create a custom Guild/Clan system where new players could find and auto-join already created guilds. I see that the Group search functionality is not yet supported so I'm trying to work on a possible solution using the current Groups API via CloudScript.

The idea is to save some of the owner's clan data as statistics so that the owner could be found in the leaderboards and therefore I could fetch the clan’s EntityKey along with some info about the clan from the owner's UserData. Does that sound like a good workaround?

Another question: how would a Group API call work using CloudScript? Did I miss something or is the Group API not exposed to CloudScript?

Thanks!

Raf

apissdksCloudScript
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

·
Citrus Yan avatar image
Citrus Yan answered

>>Does that sound like a good workaround?

I don’t think it’s an efficient way since you’ll need additional APIs (out of the Groups API scope) to manage your Group system, for instance, delays in other systems may also affect your system’s performance. And, there will be too many API calls needed to get all info, which may exceed the limit of CloudScript. Therefore, for now, I would still suggest that you manage a queryable list outside of PlayFab to make it more realiable.

>> how would a Group API call work using CloudScript?

You can use entity.xxx to access Group APIs in CloudScript, for instance:

entity. CreateGroup (xxx)

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.