http://wiki.alioth.net/index.php/Catego ... _ReferenceSmivs wrote:Am I the only person who finds the js sections almost impossible to navigate? Is there an index page or something I've missed?
And for all plist stuff http://wiki.alioth.net/index.php/Catego ... _scripting (the JS_reference is the first subcategory of this page). The scripting index page itself is among the subcategories of http://wiki.alioth.net/index.php/Category:Oolite.
If you have a look at the first page, the only thing you need to know is which JS object you want to manipulate. In your case a ship, because it's a ship which spawns the boulder. Therefore the reference page you need is http://wiki.alioth.net/index.php/Oolite ... ence:_Ship, and indeed that's where you find the
spawn()
method. The hint is in the word you type at the beginning of your command (in this case it's this.ship.
).If you follow Thargoids advice, you may consult two pages. As indicated by the word
system.
at the beginning of the command, it manipulates the system object. The reference page for that is http://wiki.alioth.net/index.php/Oolite ... ce:_System. That's where you find everything about the addShips()
method. Later you see the word ship.
again, which indicates that position
is again a property of the ship, so you would search for it on http://wiki.alioth.net/index.php/Oolite ... ence:_Ship again. Only that this time you wouldn't find it there. It happens that ship is one of the sub-classes of entity (other sub-classes are for instance sun or planet), and all entities have a position. Therefore you find the position
property in http://wiki.alioth.net/index.php/Oolite ... ce:_Entity.If you would want to manipulate the player ship, your starting point would be http://wiki.alioth.net/index.php/Oolite ... PlayerShip. However, this covers only all things which are
unique
to a player ship. For all other aspects a player ship is only a sub-class of ship, which is only a sub-class of entity. Therefore you would have to consult one of those pages if you want to manipulate for instance the player ship's speed
(shared by all ships) or position
(shared by all entities).