Returns whether the given priority queue is empty or not.



参数 描述
id The id of the data structure to check.

返回: 布尔值


With this function you can check the given ds_priority queue to see if it is empty (returns true) or not (returns false).


if count == 15 && !ds_priority_empty(command_queue)
   alarm[0] = room_speed;
   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_priority queue indexed in the variable "command_queue", sets an alarm, and resets the variable to 0.

上一页: Priority Queues
下一页: ds_priority_size
© Copyright YoYo Games Ltd. 2018 All Rights Reserved