Hello, guys!
I am trying to close the issue. Currently i am trying to increase the logic nodes functionality, but always based in already existent nodes. In this case, i don’t find any node similar to this. Arrays looks very confuse for a beginner (i never touched in any script since the last week).
I am trying to follow Armory API and this page (https://code.haxe.org/category/beginner/arrays.html) to clear some doubts.
The problem is that this part of the page show me a simple example of array usage, that is:
var strings:Array = [“Apple”, “Pear”, “Banana”];
trace(strings);
It works as i want (trace all content of the array) but don’t work for my purpose.
In Armory API there is a variable called children
. The steps i do is:
Define the objectChildren variable:
var objectChildren: Array = object.children;
First problem: I trace the value of objectChildren
. The value is confuse, but if i use trace(object);
, i can see that both values are very similar. The problem is: if i try to set the visibility of the objectChildren
, i got an error (something like: “objectChildren don’t have field children”) but when i set the object.visible it works fine (why if it is a similar value?)
Second problem: how do i get the entire content of an array and apply what i want (that is the object visibility)? Did i need to loop the array using its indexes or there is some direct method?
If someone could provide some example for me about this… because i don’t find nothing this specific around Haxe Foundation site. I also appreciate links.