ds_queue_copy

Copies the contents of one queue to another.

Syntax:

ds_queue_copy(id, source);


Argument Description
id The id of the NEW queue.
source The ORIGINAL queue to copy to id.


Returns: N/A


Description

This function can be used to copy the contents of one queue into another. Note that this does NOT remove the contents from the original queue, nor does it destroy the original queue. When using this function the queue being copied to must have been previously created and if it contained any items before the copy, then these will be cleared first (meaning this information will be lost).


Example:

with (instance_create(x, y, obj_Enemy))
   {
   queue = ds_queue_create();
   ds_queue_copy(queue, other.queue);
   }

The above function creates a new instance and then in that instance it creates a new ds_queue and copies the contents of the queue in the instance running the code block, into the newly created instance queue.


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