A Construct 3 plugin to store and retrieve data in a priority queue data structure.
Author: piranha305
Website: https://piranha305.itch.io/
Addon Url: https://www.construct.net/en/make-games/addons/1091/queue
Download Latest Version : Version: 1.0.0.1
Made using c3ide2-framework
To build the addon, run the following commands:
npm i
node ./build.js
To run the dev server, run
npm i
node ./dev.js
The build uses the pluginConfig file to generate everything else. The main files you may want to look at would be instance.js and scriptInterface.js
| Property Name | Description | Type |
|---|
| Action | Description | Params |
|---|---|---|
| Enqueue | Adds a value to the end of the queue. | Value (any) |
| Enqueue with priority | Adds a value to the end of the queue with a priority. | Value (any) Priority (number) |
| Dequeue | Dequeues a value. (can access item from LastDequeuedValue expression) | |
| Clear | Clears the queue. | |
| Shuffle | Randomly shuffles queue. | |
| Load from JSON | Loads the queue from a JSON string. | JSON (string) |
| Condition | Description | Params |
|---|---|---|
| Is empty | Returns true if the queue is empty. | |
| Has items | Returns true if the queue has items. | |
| On last item dequeued | Triggered when the last item is dequeued. | |
| On item queued | Triggered when an item is queued. (can access item from LastQueued expression) | |
| On item dequeued | Triggered when an item is dequeued. (can access item from LastDequeuedValue expression) | |
| Loop queue | Loop through the queue. | Pop items (boolean) |
| Expression | Description | Return Type | Params |
|---|---|---|---|
| LastDequeuedValue | Returns the last dequeued value. | any | |
| Size | Returns the size of the queue. | number | |
| Peek | Gets the value at the front of the queue without removing it | any | |
| Pop | Dequeues a value and returns it. | any | |
| PeekLast | Returns the last item in the queue. (does not remove it from queue) | any | |
| LastQueued | Returns the last queued value. | any | |
| AsJSON | Returns the queue as a JSON string. | string | |
| LoopItem | Returns the current item in the queue. (while looping) | any |