Doing it in one function gives:
Code: Select all
globalPosition = this.ship.position.add(localPosition.rotateBy(this.ship.orientation));
localPosition
being the position in ship coordinates and globalPosition
the position in system coordinates.Moderators: winston, another_commander
Code: Select all
globalPosition = this.ship.position.add(localPosition.rotateBy(this.ship.orientation));
localPosition
being the position in ship coordinates and globalPosition
the position in system coordinates.Which normally works, but because of the way exhaust display is calculated might be more troublesome. Making the sub-ent types scriptable seems better to me, at least in so far as allowing remove/restore, but probably not for 1.77/8.Thargoid wrote:Or as an alternative (as I think exhausts are a special kind of sub-ent themselves, and so you'd end up with the sub-ent of a sub-ent question)
Can you testGGShinobi wrote:We want the equipment to be automatically awarded to the players ship if the ship has an [wiki]Advanced Space Compass[/wiki] (ASC) installed.
Code: Select all
player.ship.equipmentStatus("EQ_???")
this.playerHasLoadedGame
is otherwise known as [url=http://wiki.alioth.net/index.php/Oolite_JavaScript_Reference:_world_script_event_handlers#startUp]this.startUp[/url]
.That is exactly what I've been looking for! I didn't get that from the description in the wiki - there it sounded to me like that event is run (only once) after the game has been started. And I already wondered why no one else has been missing such an event.Thargoid wrote:Alternativelythis.playerHasLoadedGame
is otherwise known as[url=http://wiki.alioth.net/index.php/Oolite_JavaScript_Reference:_world_script_event_handlers#startUp]this.startUp[/url]
.
Yes, OXPs are reloaded when you load a new game.GGShinobi wrote:Question : Does this mean that everytime I load a new game, all OXPs are reloaded? If so, the entry in the wiki should be edited, e.g. by changing the sentence to "This also means that it is also called after the player has loaded a game."
Code: Select all
11:16:19.359 [shipData.load.begin]: Loading ship data.
11:16:20.535 [script.javascript.init]: JavaScript reset successful.
11:16:20.670 [script.load.world.listAll]: Loaded 39 world scripts:
BGS-M 1.6
Cabal_Common_Briefing 1.7
Cabal_Common_Comms 1.7
Cabal_Common_Functions 1.7
Cabal_Common_Keyboard 1.7
Cabal_Common_MissionHandling 1.7
Cabal_Common_Music 1.7
Cabal_Common_Overlay 1.7
Cabal_Common_OXPStrength 1.7
Cabal_Common_SpecialMarkets 1.7
Famous Planets 2.5.1
genericHUDswitch - MilHUD.js 1.05, modified by Wyvern for MilHUD
long_way_round
Missile Spoof 1.02 - for Oolite 1.75
oolite-cloaking-device 1.77
oolite-constrictor-hunt 1.77
oolite-contracts-cargo 1.77
oolite-contracts-helpers 1.77
oolite-contracts-parcels 1.77
oolite-contracts-passengers 1.77
oolite-nova 1.77
oolite-thargoid-plans 1.77
oolite-trumbles 1.77
OXPConfig 2.0.14
Povray Planets 1
Povray Planets Galaxy1 Textures 1.1
Povray Planets Galaxy2 Textures 0.1
Povray Planets Galaxy3 Textures 0.1
Povray Planets Galaxy4 Textures 0.1
Povray Planets Galaxy5 Textures 0.1
Povray Planets Galaxy6 Textures 0.1
Povray Planets Galaxy7 Textures 0.1
Povray Planets Galaxy8 Textures 0.1
randomshipnames 1.2
Repair system 2.08
Shield Cycler 0.30.3
Shield Cycler External Events 0.30.3
shieldequalizercapacitors 1.3
targetAutolock 1.11
11:16:23.726 [Povray Planets]: Startup
11:16:23.727 [Povray Planets]: Povray Planets Galaxy1 Textures
11:16:23.727 [Povray Planets]: Monkey patch Povray Planets Galaxy1 Textures
11:16:23.727 [Povray Planets]: Povray Planets Galaxy2 Textures
11:16:23.727 [Povray Planets]: Monkey patch Povray Planets Galaxy2 Textures
11:16:23.727 [Povray Planets]: Povray Planets Galaxy3 Textures
11:16:23.727 [Povray Planets]: Monkey patch Povray Planets Galaxy3 Textures
11:16:23.727 [Povray Planets]: Povray Planets Galaxy4 Textures
11:16:23.727 [Povray Planets]: Monkey patch Povray Planets Galaxy4 Textures
11:16:23.727 [Povray Planets]: Povray Planets Galaxy5 Textures
11:16:23.727 [Povray Planets]: Monkey patch Povray Planets Galaxy5 Textures
11:16:23.727 [Povray Planets]: Povray Planets Galaxy6 Textures
11:16:23.727 [Povray Planets]: Monkey patch Povray Planets Galaxy6 Textures
11:16:23.727 [Povray Planets]: Povray Planets Galaxy7 Textures
11:16:23.727 [Povray Planets]: Monkey patch Povray Planets Galaxy7 Textures
11:16:23.727 [Povray Planets]: Povray Planets Galaxy8 Textures
11:16:23.727 [Povray Planets]: Monkey patch Povray Planets Galaxy8 Textures
11:16:23.882 [startup.complete]: ========== Loading complete in 5.49 seconds. ==========
11:16:28.058 [script.javascript.init]: JavaScript reset successful.
11:16:28.078 [script.load.world.listAll]: Loaded 39 world scripts:
BGS-M 1.6
Cabal_Common_Briefing 1.7
Cabal_Common_Comms 1.7
Cabal_Common_Functions 1.7
Cabal_Common_Keyboard 1.7
Cabal_Common_MissionHandling 1.7
Cabal_Common_Music 1.7
Cabal_Common_Overlay 1.7
Cabal_Common_OXPStrength 1.7
Cabal_Common_SpecialMarkets 1.7
Famous Planets 2.5.1
genericHUDswitch - MilHUD.js 1.05, modified by Wyvern for MilHUD
long_way_round
Missile Spoof 1.02 - for Oolite 1.75
oolite-cloaking-device 1.77
oolite-constrictor-hunt 1.77
oolite-contracts-cargo 1.77
oolite-contracts-helpers 1.77
oolite-contracts-parcels 1.77
oolite-contracts-passengers 1.77
oolite-nova 1.77
oolite-thargoid-plans 1.77
oolite-trumbles 1.77
OXPConfig 2.0.14
Povray Planets 1
Povray Planets Galaxy1 Textures 1.1
Povray Planets Galaxy2 Textures 0.1
Povray Planets Galaxy3 Textures 0.1
Povray Planets Galaxy4 Textures 0.1
Povray Planets Galaxy5 Textures 0.1
Povray Planets Galaxy6 Textures 0.1
Povray Planets Galaxy7 Textures 0.1
Povray Planets Galaxy8 Textures 0.1
randomshipnames 1.2
Repair system 2.08
Shield Cycler 0.30.3
Shield Cycler External Events 0.30.3
shieldequalizercapacitors 1.3
targetAutolock 1.11
11:16:29.071 [Povray Planets]: Startup
11:16:29.071 [Povray Planets]: Povray Planets Galaxy1 Textures
11:16:29.071 [Povray Planets]: Monkey patch Povray Planets Galaxy1 Textures
11:16:29.071 [Povray Planets]: Povray Planets Galaxy2 Textures
11:16:29.071 [Povray Planets]: Monkey patch Povray Planets Galaxy2 Textures
11:16:29.071 [Povray Planets]: Povray Planets Galaxy3 Textures
11:16:29.071 [Povray Planets]: Monkey patch Povray Planets Galaxy3 Textures
11:16:29.071 [Povray Planets]: Povray Planets Galaxy4 Textures
11:16:29.071 [Povray Planets]: Monkey patch Povray Planets Galaxy4 Textures
11:16:29.071 [Povray Planets]: Povray Planets Galaxy5 Textures
11:16:29.071 [Povray Planets]: Monkey patch Povray Planets Galaxy5 Textures
11:16:29.071 [Povray Planets]: Povray Planets Galaxy6 Textures
11:16:29.071 [Povray Planets]: Monkey patch Povray Planets Galaxy6 Textures
11:16:29.071 [Povray Planets]: Povray Planets Galaxy7 Textures
11:16:29.072 [Povray Planets]: Monkey patch Povray Planets Galaxy7 Textures
11:16:29.072 [Povray Planets]: Povray Planets Galaxy8 Textures
11:16:29.072 [Povray Planets]: Monkey patch Povray Planets Galaxy8 Textures
11:16:33.148 [exit.context]: Exiting: Exit Game selected on options screen.
11:16:33.162 [gameController.exitApp]: .GNUstepDefaults synchronized.
Closing log at 2013-01-16 11:16:33 +0100.
Lone_Wolf, thanks for the info. I've updated the wiki accordingly.Lone_Wolf wrote:Yes, OXPs are reloaded when you load a new game.