Pixel-Composer/scripts/node_PCX_var/node_PCX_var.gml

16 lines
549 B
Plaintext
Raw Normal View History

2023-09-11 16:08:58 +02:00
function Node_PCX_var(_x, _y, _group = noone) : Node_PCX(_x, _y, _group) constructor {
name = "Variable";
inputs[| 0] = nodeValue("Name", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, "");
inputs[| 1] = nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, -1);
outputs[| 0] = nodeValue("PCX", self, JUNCTION_CONNECT.output, VALUE_TYPE.PCXnode, noone);
static update = function() {
var _name = inputs[| 0].getValue();
var _val = inputs[| 1].getValue();
outputs[| 0].setValue(new __funcTree("=", _name, _val));
}
}