thanks
but now the line console.log("hello"+this.Objects[i].script.PositionThis.myIndex); throws an error “cannot read property index of undefined”.
i went by this post
where you wrote this.otherEntity.script.script2.printCount.
where is the diference?
the caller script has SelectionMouseInput.attributes.add ('Objects', { type: 'entity', array: true, title: 'Objects to select' });
the array is assigned with entities that each has the PositionThis script.
position this has this attribute PositionThis.attributes.add('myIndex', { type: 'number' });
looks a bit foolish on my side to bother you, it seems it was a typo mistake, i need to check my typo closer (though i did and still missed it) - it should have been positionThis and not PositionThis.