Pixel-Composer/scripts/node_iterate/node_iterate.gml

18 lines
529 B
Text
Raw Normal View History

2023-06-01 10:32:21 +02:00
function Node_Iterate(_x, _y, _group = noone) : Node_Iterator(_x, _y, _group) constructor {
name = "Loop";
2022-01-23 10:08:16 +07:00
2024-08-18 14:13:41 +07:00
newInput(0, nodeValue_Int("Repeat", self, 1 ))
2023-07-25 20:12:40 +02:00
.uncache();
2022-01-23 10:08:16 +07:00
2024-08-08 11:57:51 +07:00
custom_input_index = array_length(inputs);
2022-01-23 10:08:16 +07:00
2024-09-07 17:48:57 +07:00
if(NODE_NEW_MANUAL) {
2022-12-13 15:20:36 +07:00
var input = nodeBuild("Node_Iterator_Input", -256, -32, self);
var output = nodeBuild("Node_Iterator_Output", 256, -32, self);
2022-12-12 15:08:03 +07:00
2024-08-08 11:57:51 +07:00
input.inputs[2].setValue(4);
output.inputs[1].setFrom(input.outputs[1]);
2024-09-07 17:48:57 +07:00
}
2022-12-13 15:20:36 +07:00
static getIterationCount = function() { return getInputData(0); }
2022-01-23 10:08:16 +07:00
}