This function can be used to retrieve information about the current download state for the given file ID. You give the item ID and supply the index to an empty DS map which will then be populated with the following key/value pairs if the item exists:
If the item exists then the function will return true and populate the map, otherwise it will return false and the map will remain empty.
steam_ugc_get_item_update_info(published_file_id, info_map);
| Argument | Description |
|---|---|
| published_file_id | The unique file ID for the UGC to be checked. |
| info_map | A (previously created) DS map index. |
Boolean
var info_map = ds_map_create();
var info = steam_ugc_get_item_update_info(global.fileID, info_map);
if info
{
draw_text(32, 15, "needs_update: " + string(info_map[? "needs_update"]));
draw_text(32, 30, "is_downloading: " + string(info_map[? "is_downloading"]));
draw_text(32, 45, "bytes_downloaded:
" + string(info_map[? "bytes_downloaded"]));
draw_text(32, 60, "bytes_total: " + string(info_map[? "bytes_total"]));
}
The above code will query the download status of the item indexed in the global variable "fileID", using a DS Map to store the information.