ds_queue_enqueue

Adds the given value (or values) into the given queue.

Syntax:

ds_queue_enqueue(id, val [, val2, ... val15]);


Argument Description
id The id of the queue to add to.
val The value to add to the queue.
[val2, ... val15] Optional values to be added to the queue.


Returns: N/A


Description

This function will add a value (real or string) onto the tail of the ds_queue. The function can take a further 14 optional arguments (making a total of 15 possible additions), permitting you to add multiple values consecutively to the tail of the queue in a single call.


Example:

move_queue = ds_queue_create();
ds_queue_enqueue(move_queue, x + 200);
ds_queue_enqueue(move_queue, y);
ds_queue_enqueue(move_queue, x + 200);
ds_queue_enqueue(move_queue, y + 200);
ds_queue_enqueue(move_queue, x);
ds_queue_enqueue(move_queue, y + 200);
ds_queue_enqueue(move_queue, x);
ds_queue_enqueue(move_queue, y);

The above code creates a new ds_queue and stores its index in the variable "move_queue". It then pushes a number of values onto the queue for future use.


Back: Queues
Next: ds_queue_dequeue
© Copyright YoYo Games Ltd. 2018 All Rights Reserved