question

Sebastien Lachapelle avatar image
Sebastien Lachapelle asked

Title Objects from CloudScript

Hi,

I have a few questions.

1) How to get the Title Object via CloudScript(Legacy). I have created a Title object with the Key: Loots & Value: "Hello".

I see a lot of documentation to retrieve Player Objects but not Title Objects.

2) Where can I find the documentation for all classes/functions available on Cloud script?

I can't find it here: https://docs.microsoft.com/en-us/gaming/playfab/features/automation/cloudscript/tutorials

I see a lot of posts where people write server.GetTitleData(some string), entity.GetObjects( some struct in here). etc How can I be aware of all those classes and functions?

Thank you, :D

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

·
Gosen Gao avatar image
Gosen Gao answered

For question 1, You can use API entity.GetObjects and set the parameter Entity with your title to get Title Objects.

handlers.CTsGetTitleObjects = function (args, context) {
    let request = {
        Entity: {
                "Id": "xxxxx",
                "Type": "title"
            }
    }
    let res = entity.GetObjects(request);
    return res;
};

For question 2, CloudScript (Legacy) has three defined classes which are server, multiplayer and entity. APIs that interact with entities are contained in the entity class. To learn more about entities, here are the Available built-in entity types, you can have a look.

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.