async_load

Global variable for holding a DS map when used in the Asynchronous Events.

Syntax:

async_load;


Returns: Real


Description

This variable is global in scope and is used to hold a DS map when used in the Asynchronous Events, and -1 at all other times. The actual contents of the DS map will depend on the type of asynchronous event that it is populated in, and the function that was used to trigger the event, so refer to the individual pages for those events.


Example:

if ds_map_find_value(async_load, "id") == back
   {
   if ds_map_find_value(async_load, "status") >= 0
      {
      background_index[0] = back
      }
   }

The above code is taken from the Image Loaded Asynchrnous Event and will first check the ID of the async_load DS map that has been populated, then check the status of the callback. If the value is greater than or equal to 0 (signalling success) the result from the callback will then be used to set the background index to the newly loaded image.


Back: Global Variables
Next: score
© Copyright YoYo Games Ltd. 2018 All Rights Reserved