This function will return the value that has the lowest 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.



Argument Description
id The id of the priority queue to use.


Real or String


if ai_move

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