There seems to be a problem when reusing the node Array within the same node tree… , i.e. you have to associate a kind of Array Clear node with it before reusing it in the same node tree to be sure to have an empty Array.
(Thus I use a simple clear node whose code is as follows until a correction of the Array node is applied. This could also be useful for you too.
package armory.logicnode;
class ArrayClearNode extends LogicNode {
var ar:Array<Dynamic>;
public function new(tree:LogicTree) {
super(tree);
}
override function run(from:Int) {
ar = inputs[1].get();
while (ar.length > 0){
ar.pop();
}
runOutput(0);
}
}