Could someone please tell me the Oolite coordinate system as it pertains to the view screen? Thanks
If I get this right you are talking about custom_views? If so then
[wiki]Shipdata.plist[/wiki] (custom_views), view_position is X,Y,Z - [0,0,0] should be the center.
[wiki]Quaternion[/wiki]
Could someone please tell me the Oolite coordinate system as it pertains to the view screen? Thanks
If I get this right you are talking about custom_views? If so then
[wiki]Shipdata.plist[/wiki] (custom_views), view_position is X,Y,Z - [0,0,0] should be the center.
[wiki]Quaternion[/wiki]
Thanks for your reply. Should have been more specific as I was referring to the Forward, rear, left and right views. But I figured it out by studying the hud.plist. I have made a copy of that file to the Add Ons folder to tinker with.
Made me ask two questions:
1) How is this procedure executed / handled?
2) How many draw procedures are there other than drawing rectangles, circles, and ellipses that a scripter could use?
You can call any world script function from any other script by pre-fixing the world script name.
Example: this.$setUpSystem() in the Anarchies-script can be called from anywhere (including the JS-console, which is particularly useful for playtesting) with worldScripts.Anarchies.$setUpSystem().
The prefix for world scripts is worldScript (see here), which is followed by the script name (the one specified in this.name at the top of your world script). There are some special rules if your script name contains a SPACE.
Anyone know if the variable ship_trade_in_factor in the save file is visible to JS and if so what's the property to access it (player.ship.something???).
Both go without a "this". Writing down as string is only needed when the string contains special characters. A scriptname might contain such characters, but a function never.
"Capt Murphy"]Anyone know if the variable ship_trade_in_factor in the save file is visible to JS and if so what's the property to access it (player.ship.something???).
Both go without a "this". Writing down as string is only needed when the string contains special characters. A scriptname might contain such characters, but a function never.
foo.bar is purely shorthand for foo["bar"]. There is no difference in behaviour. As such, foo["Fred Bloggs"] = function () {} is perfectly valid.
But foo.fred bloggs = function() isn't due to the space (an example of the special characters).
Personally I always tend to use worldScripts["name"] rather than worldScripts.name even when name doesn't include a space or somesuch, just for consistency. But as Eric says, the functions themselves never will have such characters in them by definition.