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.
ds_priority_add(id, val, priority);
Argument | Type | Description |
---|---|---|
id | DS Priority | The id of the priority queue to add to. |
val | Any | The value to add to the priority queue. |
priority | Real | The priority of the value to add. |
N/A
ds_priority_add(ai_priority, AI_Search, 5);
The above code adds a script function to the priority queue indexed in the variable "ai_priority" and assigns it a priority of 5.