Hi,
I am implementing the clan system in my game and I want the user to be able to see all the clans/groups of my game which are available to join.
The complication is I cannot find any API or cloud function to get the list and I also found some Playfab forum posts in which it is stated that "Playfab doesn't provide this feature yet" and I want to confirm the progress on it.
Thanks!
Answer by Sarah Zhang · Mar 04, 2020 at 07:13 AM
PlayFab has not provided this feature yet. However, CreateGroup is an Entity API, when it be called on CloudScript without assigning an account entity, title entity will be assigned and title will be the default Administrator of the generated Group. Then Entity API ListMembership can list all groups and roles for an entity. Hence, if all your groups are created by calling CreateGroup with title entity on CloudScript and you keep the title as the administrator of all groups, you can list these groups via ListMembership. You can try to execute the following CloudScript functions via client API ExecuteEntityCloudScript. The above content can be a possible workaround in certain situations. Besides, for any request of new features, you can navigate to Feature Requests, search for the corresponding posts to vote them or add a new feature request about listing all groups available to join. You can also track the progress of new features through the posts of feature requests.
handlers.CreateTitleGroup = function (args, context) { var createTitleGroup = entity.CreateGroup ({ // assign the groupname via args here GroupName: args.groupname }); return { createTitleGroup: createTitleGroup } } handlers.ListTitleMembership = function (args, context) { var listTitleMembership = entity.ListMembership ({ Entity: { Id: "[YourTitleId]", Type: "title", TypeString: "title" } }); return { listTitleMembership: listTitleMembership } }
Thanks @Sarah Zhang but now I am facing another problem. Please check it out
What will happen if I call the groups that this entity is all connected to. Suppose this entity member has 100000 groups.Does playfab give a error ?.When calling ListMemberShips methods for this entity ?
What will happen if I call the groups that this entity is all connected to. Suppose this entity member has 100000 groups.Does playfab give a error ?.When calling ListMemberShips methods for this entity ?
Answer by emreedemir · May 11, 2021 at 01:41 AM
What will happen if I call the groups that this entity is all connected to. Suppose this entity member has 100000 groups.Does playfab give a error ?.When calling ListMemberShips methods for this entity ?
executecloudscript unity Function Parameter 1 Answer
Getting InvalidDropTable when calling EvaluateRandomResultTable 1 Answer
Where should I write cloud script code? ,Where do I actually write cloud script code? 1 Answer
Are Epic Games Store SDK API calls available as a REST API callable by a Cloud Script? 1 Answer
How can I use the Playfab API while writing a Cloud Script with TypeScript? 1 Answer