ds_priority_add

Adds a prioritized value to the queue.

Syntax:

GML Code Example

ds_priority_add(id, val, priority);


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


Returns: N/A


Description

With this function you can add a value (either a real number or a string) to a priority queue, at the same time assigning it a priority value.


Example:

GML Code Example

ds_priority_add(ai_priority, scr_AI_Search, 5);

The above code adds a script to the priority queue indexed in the variable "ai_priority" and assigns it a priority of 5.





No Examples Submitted

Does this page need better examples? Be the first to Submit

No Edits Suggested

Is this page unclear or not descriptive enough? Suggest an edit to the page and with enough upvotes your changes will be made.

No Questions Have Been Ask

Do you have a question about this page? Ask it Here