question

bitemeads avatar image
bitemeads asked

entity policy and get entity of other player

Hi there

For our guild system i have a couple of questions , when a player wants to join a created guild it says that the claim was not allowed. the error suggest that the policy needs to be changed of the guild ,how do i do this for every newly created guild?

Second question , when trying to invitea player i require a groupid and a entity. How would i get the entity of another player? since i need this to invite them?


i use unity but just the calls i need for this alone would already help me alot.

Thanks!

unity3d
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

·
pfnathan avatar image
pfnathan answered

You have to handle the player passing its identifier around just like you would the PlayFabID.

To join in this case would be "create a request to join" and everyone should be able to do that so the player that is attempting to join should call CreateGroupApplication.

In detail it would be like this:

Group applications = some random player can request to join a group, group administrator "approves" the application which puts the user into the group

Group invitations = a group administrator invites some random player, the random player "accepts" the invitation, which puts the user in the group

Please note that they're effectively the same thing with the actors reversed.

4 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

bitemeads avatar image bitemeads commented ·

i realise that this is the way to go, but when i get a player their playfabid and try to invite him to the group ,i need an entity , so i made a method to create one with type titleplayerid (since normally joining says its that type) , but when i do that there is a problem.

i looked at it and my entity id i use is not my playfabid ,i know this is normal but lets say i searched with displayname for the playfabid, and then want to get the entity key of that playfabid. how would i do that? what call needs to be made?

thanks

0 Likes 0 ·
brendan avatar image brendan bitemeads commented ·

I've updated the tutorial (https://api.playfab.com/docs/tutorials/entities/getting-started-entities) to clarify this.

The Master Player ID is the PlayFab ID you get back from calls to log in or to GetAccountInfo. The Entity ID for the player at the title level (which was referred to as "titlePlayerId" in the docs - I've removed that, as it was confusing) is returned from any login call where you set LoginTitlePlayerAccountEntity to true.

1 Like 1 ·
brendan avatar image brendan brendan commented ·

GetPlayerCombinedInfo has now been updated to provide the EntityKey for the user. You can find it in AccountInfo.TitleInfo.TitlePlayerAccount in the GetPlayerCombinedInfoResultPayload.

1 Like 1 ·
pfnathan avatar image pfnathan ♦ bitemeads commented ·

We have not built that yet, please look for an update in later date.

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.