How would I go about accessing a variable in an/multiple objects in an array. JS script
The game object Unit will be placed will be placed inside the seleectedUnits array. How would I get the variable targetLocation in Unit to equal movementOrders in Commander. There will be multiple Units inside the array.
Commander Script
var selectedUnits : Array = new Array();
var movementOrders : float;
Unit Script
var targetLocation : float;
Thanks