Finds and returns the priority of the given value in the priority queue.


ds_priority_find_priority(id, val);

Argument Description
id The id of the priority queue to use.
val The value to find the priority of.

Returns: Real or undefined


With this function you can retrieve the priority of any given value. If the value does not exist in the priority queue then undefined will be returned.


p = ds_priority_find_priority(ai_priority, "intelligence");

The above code will store the returned priority for the given value in the instance variable "p".

Back: DS Priority Queues
Next: ds_priority_copy
© Copyright YoYo Games Ltd. 2018 All Rights Reserved