I have some ship names defined in my Controller.js script that I’d like to access from other scripts. So in my Controller script I have, for example
static var ship1 : String="Bounty";
In my other script I can use
print ("Ship is "+Controller.ship1);
or print it to my GUI window and it will print “Ship is Bounty” as required.
But how can I store this String into another String variable, like so…
var newShip : String;
so I can use i.e
newShip=Controller.ship1;
print ("Ship is "+newShip);
resulting in “Ship is Bounty”.
As it is it remains blank .e “Ship is …”
Appreciate any help on Strings, it’s an area I’ve neglected and now I really need them.