With this function you can check the given DS queue to see if it is empty (returns true) or not (returns false).
ds_queue_empty(id);
Argument | Type | Description |
---|---|---|
id | DS Queue | The id of the data structure to check. |
if (count == 15) && (!ds_queue_empty(command_queue))
{
ds_queue_clear(command_queue);
alarm[0] = game_get_speed(gamespeed_fps);
ai_count = 0;
}
The above code checks a variable to see if it has reached a specific value and if it has it clears the DS queue indexed in the variable "command_queue", sets an alarm, and resets the variable to 0.