ds_priority_add

Adds a prioritized value to the queue.

Syntax:

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:

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.


Back: DS Priority Queues
Next: ds_priority_change_priority
© Copyright YoYo Games Ltd. 2019 All Rights Reserved