2023-09-11 16:08:58 +02:00
|
|
|
function Node_PCX_var(_x, _y, _group = noone) : Node_PCX(_x, _y, _group) constructor {
|
|
|
|
name = "Variable";
|
|
|
|
|
2024-08-18 06:16:20 +02:00
|
|
|
newInput(0, nodeValue_Text("Name", self, ""));
|
2023-09-11 16:08:58 +02:00
|
|
|
|
2024-08-20 10:15:53 +02:00
|
|
|
newInput(1, nodeValue("Value", self, CONNECT_TYPE.input, VALUE_TYPE.any, -1));
|
2023-09-11 16:08:58 +02:00
|
|
|
|
2024-09-04 03:57:11 +02:00
|
|
|
newOutput(0, nodeValue_Output("PCX", self, VALUE_TYPE.PCXnode, noone));
|
2023-09-11 16:08:58 +02:00
|
|
|
|
|
|
|
static update = function() {
|
2023-10-02 08:57:44 +02:00
|
|
|
var _name = getInputData(0);
|
|
|
|
var _val = getInputData(1);
|
2023-09-11 16:08:58 +02:00
|
|
|
|
2024-08-08 06:57:51 +02:00
|
|
|
outputs[0].setValue(new __funcTree("=", _name, _val));
|
2023-09-11 16:08:58 +02:00
|
|
|
}
|
|
|
|
}
|