question

chrystian-sil avatar image
chrystian-sil asked

Is it possible to use the SetObjects function from Cloudscript?

I want to fill the player characters with some fixed data that will be read only for the client at the moment I grant them to the user, but if I try to do it using ReadOnlyData theres a limit of 5 values, so Im thinking on setting that info as an object inside the character. However I cant find the way to access the object.SetObjects function from cloudscript. Any idea, suggestions or work arounds?

CloudScriptCharacter DataCharacters
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

·
chrystian-sil avatar image
chrystian-sil answered

Ok, just find out that the container of those functions is entity. =P

1 comment
10 |1200

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

chrystian-sil avatar image chrystian-sil commented ·
var customDataRequest = 
{
      Objects:
      [
          {
              ObjectName: "GameData",
              DataObject: customData
          }
      ],
      Entity:
      {
          Id: grantResult.CharacterId,
          Type: "character",
          TypeString: "character"
      }
                
}
            
var updateResult = entity.SetObjects(customDataRequest);

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.