steam_ugc_subscribe_item

Syntax:

steam_ugc_subscribe_item(published_file_id);


Argument Description
published_file_id The unique file ID for the UGC to subscribe to.


Returns: Async ID


Description

This function can be used to subscribe to a UGC item. You supply the published file ID and then the function returns a unique async ID value which can be used to check when the subscribed item has been downloaded in the Steam Async event. This event will have the async_load DS map which will be populated with the following key/value pairs:

  1. "id" - The async ID returned by the function that triggered the event

  2. "result" - The result of the operation (a real value). This will either be the GML constant ugc_result_success or some other real number. So you should check for this constant to ensure that the call was successful, and if otherwise somthing has not worked correctly. The rest of the possible values returned are shown as the result of the Steam "EResult" value and you should see steamclientpublic.h in the SDK headers for all 89 possible values.

  3. "event_type" - The string "ugc_subscribe_item".

  4. "published_file_id" - The unique ID for the published item.


Example:

steam_sub = steam_ugc_subscribe_item(global.pubFileID);

The above code will subscribe (and download) the item with the file ID stored in the global variable "pubFileID".