ds_priority_delete_max

Returns the value in the priority queue with the largest priority, and deletes it.

语法:

ds_priority_delete_max(id);


参数 描述
id The id of the priority queue to use.


Returns: Real or String


描述

This function will return the value that has the highest priority in the queue and then remove the value (and priority) from the data structure. If more than one value has the same priority, the one that was added to the priority queue first will be the one to get removed, but all other values with the same priority will still be in the queue.


例如:

if ai_move
   {
   script_execute(ds_priority_delete_max(ai_priority));
   }

The above code checks an instance variable and if it returns true it will execute a script indexed in the priority queue with the highest priority value and then remove that script from the queue.


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