Join us at the Oolite Anniversary Party -- London, 7th July 2024, 1pm
More details in this thread.

Search found 471 matches

by dertien
Mon Aug 18, 2014 6:22 pm
Forum: Expansion Pack
Topic: Split: Deployable subentities
Replies: 99
Views: 37831

Re: Split: Deployable subentities

Those log errors suggest that your current OXP combination has entirely undefined all ships with "hunter" or "pirate" roles. I assume you've undefined every ship except your Cobra variants for easier testing? Yes I have :) As for the other issue, the only events in your script w...
by dertien
Mon Aug 18, 2014 4:17 pm
Forum: Expansion Pack
Topic: Split: Deployable subentities
Replies: 99
Views: 37831

Re: Split: Deployable subentities

So here are 2 screenshots of the "HPCcobramk3_trader_hauler" each with a different role. In the first example : roles = "trader-courier(2) shuttle"; Drops its gear and executes the code http://s21.postimg.org/9067xwrf7/oolite_173.jpg File for testing: here: https://app.box.com/s/...
by dertien
Mon Aug 18, 2014 3:41 pm
Forum: Expansion Pack
Topic: Split: Deployable subentities
Replies: 99
Views: 37831

Re: Split: Deployable subentities

One piece of code that is also needed in shipscripts that use timers: this.entityDestroyed = function () { this.$cleanupTimers(); } And in this.$cleanupTimers you have the code to stop and delete the timer. This is to prevent errors when the ship explodes while there is still a timer running. Done!
by dertien
Mon Aug 18, 2014 3:30 pm
Forum: Expansion Pack
Topic: Split: Deployable subentities
Replies: 99
Views: 37831

Re: Split: Deployable subentities

Indeed that takes care of the log error, thx Norby. Now all the code issues have been resolved, I have another question gameplay wise which I do not fully understand. I have a few copies of the same ship in the shipdata.plist, but depending on their role they have different subentities and weapons w...
by dertien
Mon Aug 18, 2014 1:31 pm
Forum: Expansion Pack
Topic: Split: Deployable subentities
Replies: 99
Views: 37831

Re: Split: Deployable subentities

I don't fully grasp what you mean Norby, But here's the complete log : Opening log for Oolite version 1.81 (x86-32 test release) under Windows 6.1.7601 Service Pack 1 64-bit at 2014-08-18 15:28:49 +0200. 8 processors detected. Build options: OpenAL, new planets, JavaScript console support, OXP verif...
by dertien
Mon Aug 18, 2014 12:31 pm
Forum: Expansion Pack
Topic: Split: Deployable subentities
Replies: 99
Views: 37831

Re: Split: Deployable subentities

Aah, ok thank you A_C, will keep it in mind for the future.
by dertien
Mon Aug 18, 2014 11:37 am
Forum: Expansion Pack
Topic: Split: Deployable subentities
Replies: 99
Views: 37831

Re: Scripters cove

Ok, changed that too thanks Cim. The code up until now does everything right, but I still keep getting an error in the log I want to get rid of; beeing a perfectionist and all.... this.name = "HPC Cobra Mk3 ship scripts"; this.author = "Cim, Dertien"; this.copyright = "Attri...
by dertien
Mon Aug 18, 2014 3:30 am
Forum: Expansion Pack
Topic: Split: Deployable subentities
Replies: 99
Views: 37831

Re: Scripters cove

Getting there slowly I was getting a whole lot of these in the log: 04:20:18.135 [script.javaScript.exception.unexpectedType]: ***** JavaScript exception (HPC Cobra Mk3 ship scripts 1.00): TypeError: player.ship.target is null 04:20:18.135 [script.javaScript.exception.unexpectedType]: ../AddOns/ZZ_H...
by dertien
Sun Aug 17, 2014 7:08 pm
Forum: Expansion Pack
Topic: Split: Deployable subentities
Replies: 99
Views: 37831

Re: Scripters cove

Thank you Cim that did it. Following up on what Neelix said and using code I found from Commander Mc Lane's oxp here's what I was able to put together: Selecting station and then the buoy for example does not retract the gear... this.name = "HPC Cobra Mk3 ship scripts"; this.author = "...
by dertien
Sun Aug 17, 2014 2:33 pm
Forum: Expansion Pack
Topic: Split: Deployable subentities
Replies: 99
Views: 37831

Re: Scripters cove

Yes I did test the extend and retract with planetfall and both work. Another little question I have is this: I would like to switch the nav flashers off once a ship has entered a wormhole, or has exited one: however: this.shipExitedWormhole = function() { this.switchFlashersOff(); } or this.playerWi...
by dertien
Sun Aug 17, 2014 2:04 pm
Forum: Expansion Pack
Topic: Split: Deployable subentities
Replies: 99
Views: 37831

Re: Scripters cove

Okay, I've commented the autopilot code so it doesn't interfere with the two functions I would like to test: I am running 1.81 now and have tested this also on 1.80, with the player ship. I used a savegame. I have put both "if" clauses (correct?) in the shipEnteredStationAegis function to ...
by dertien
Sun Aug 17, 2014 3:26 am
Forum: Expansion Pack
Topic: Split: Deployable subentities
Replies: 99
Views: 37831

Re: Scripters cove

Well, this is just for testing purposes, as the script is not complete yet; The first script would have to be continuously checked since it will apply to players (with EQ_DOCK_COMP) and NPC's The second one needs an extra if clause that should checking the player has EQ_DOCK_COMP. If the answer is n...
by dertien
Sat Aug 16, 2014 10:35 pm
Forum: Expansion Pack
Topic: Split: Deployable subentities
Replies: 99
Views: 37831

Re: Scripters cove

The test file if it is of any help can be found here:

https://app.box.com/s/n6a61qarmglemfwce1ak
by dertien
Sat Aug 16, 2014 10:17 pm
Forum: Expansion Pack
Topic: Split: Deployable subentities
Replies: 99
Views: 37831

Re: Scripters cove

This it the complete code as I have tested on 1.8 this.name = "landing_gear"; this.author = "griff"; this.copyright = "� 2008 griff."; this.version = "1.01"; this._findSubEntity = function(key) { for (var i = this.ship.subEntities.length - 1 ; i >=0 ; --i) { i...
by dertien
Sat Aug 16, 2014 9:58 pm
Forum: Expansion Pack
Topic: Split: Deployable subentities
Replies: 99
Views: 37831

Re: Scripters cove

Oh, sorry about your earlier question:

Code: Select all

if (this.ship.dockingInstructions)
{
this.ship.commsMessage("Received dockinginstructions");
this.retractGear();
this.extendGear();
}
I run this, when switching on the autopilot, after launch. Pressing the C key with autopilot equipped of course.