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

Search found 471 matches

by dertien
Sat Aug 16, 2014 9:56 pm
Forum: Expansion Pack
Topic: Split: Deployable subentities
Replies: 99
Views: 37838

Re: Scripters cove

also tested

Code: Select all

if (this.ship == player.ship && this.ship.target.isStation)
{
    this.ship.target.explode();
}
no fireworks
by dertien
Sat Aug 16, 2014 9:53 pm
Forum: Expansion Pack
Topic: Split: Deployable subentities
Replies: 99
Views: 37838

Re: Scripters cove

I have tested the latest code in 1.8 I launch Oolite I load a saved game pressing F1 then turning the ship around and targeting the station (r) key on windows It targets the station, but no explosion. Used this code as you said now: if (this.ship.isPlayer && this.ship.target.isStation) { thi...
by dertien
Sat Aug 16, 2014 9:37 pm
Forum: Expansion Pack
Topic: Split: Deployable subentities
Replies: 99
Views: 37838

Re: Scripters cove

The best way to test in 1.80 if a ship is trying to dock is this: if (this.ship.dockingInstructions) { This works whether it's using an old AI or a new AI, and even works for the player if they're using the docking computer. (Player without docking computer is not reliably testable) But testing if ...
by dertien
Sat Aug 16, 2014 12:19 am
Forum: Expansion Pack
Topic: Split: Deployable subentities
Replies: 99
Views: 37838

Re: Scripters cove

@ Eric, Dank U, maar dit is echt wel chinees voor mij. :D I can follow the stuff that Cim pointed out, but this is beyond me. However, I got it to work fairly well like this, using the code that Cim posted, and tried to construct my first function on my own: this.name = "landing_gear"; thi...
by dertien
Fri Aug 15, 2014 9:15 pm
Forum: Expansion Pack
Topic: Split: Deployable subentities
Replies: 99
Views: 37838

Re: Scripters cove

So basically I want to show the landing gear subentities when the docking sequence is going on, or when the ship launches, (which shows the landing rear extended or retracted at its place) and remove them and show them in their retracted state when the ship is not in its docking/undocking sequence....
by dertien
Fri Aug 15, 2014 7:06 pm
Forum: Expansion Pack
Topic: Split: Deployable subentities
Replies: 99
Views: 37838

Re: Scripters cove

using something like this in javascript actuators.position = [0,-5,0,1,0,0,0]; That would really be handy. It's possible, but it needs two steps. actuators.position = [0,-5,0]; actuators.orientation = [1,0,0,0]; Obviously, a subentity as large as the LCB on the Cobra Mk3 cannot be repositioned to b...
by dertien
Thu Aug 14, 2014 10:17 pm
Forum: Expansion Pack
Topic: Split: Deployable subentities
Replies: 99
Views: 37838

Re: Scripters cove

Thank you ! exactly what I needed
:lol:
by dertien
Thu Aug 14, 2014 10:07 pm
Forum: Expansion Pack
Topic: Split: Deployable subentities
Replies: 99
Views: 37838

Re: Scripters cove

Thanks for the lesson Cim, And it does indeed work now, so I should be able to make a few more changes now to other parts like the gunbaydoors and position of the guns as well, being able to have an aggressive and a passive stance for both NPC's and Player. Meaning guns and weapon launcher would be ...
by dertien
Thu Aug 14, 2014 9:20 pm
Forum: Expansion Pack
Topic: Split: Deployable subentities
Replies: 99
Views: 37838

Re: Scripters cove

cim wrote:
Only NPCs can have subentity lasers (and subentity lasers can only be forward lasers)
ok
by dertien
Thu Aug 14, 2014 9:14 pm
Forum: Expansion Pack
Topic: Split: Deployable subentities
Replies: 99
Views: 37838

Re: Scripters cove

Hm,

the

Code: Select all

this.ship.dataKey;
is at the right place ? or does it need anything else to make it work, all the other code seems to be correct, and I checked for typos.

I cannot see the subentities moved...

I am testing this with the player ship leaving the station, that should work ?
by dertien
Thu Aug 14, 2014 8:39 pm
Forum: Expansion Pack
Topic: Split: Deployable subentities
Replies: 99
Views: 37838

Re: Scripters cove

Yes, I should be able to hide them inside the hull, without too much problems I believe. I will have a go at that, thank you. I tested this with the player ship :oops: but not having bought another laser I assumed that would have worked since the subentity carries the laser and not the ship itself. ...
by dertien
Thu Aug 14, 2014 8:13 pm
Forum: Expansion Pack
Topic: Split: Deployable subentities
Replies: 99
Views: 37838

Re: Scripters cove

Another question I have is this, I have 4 different weapon models (nozzles) as subentities, that carry the 4 different weapons. And they seem to work fine, meaning they fire as they should. So basically, the ship entry has no weapons whatsoever forward_weapon_type = "WEAPON_NONE"; but the ...
by dertien
Thu Aug 14, 2014 7:59 pm
Forum: Expansion Pack
Topic: Split: Deployable subentities
Replies: 99
Views: 37838

Re: Scripters cove

Well' I'm back with my next hurdles I would like to solve the landing gear up and down problem with about the same code as the one I used on the destroyed subentities; So basically I want to show the landing gear subentities when the docking sequence is going on, or when the ship launches, (which sh...
by dertien
Wed Aug 13, 2014 9:40 pm
Forum: Expansion Pack
Topic: Split: Deployable subentities
Replies: 99
Views: 37838

Re: Scripters cove

Yepeeeee, it works Cim, it works :)))))) I feel like a kid with both hands in the candyjar. thanks. At least now I can start to take care of the NPC's already Will probably be back for some more pain, when that is done, so keep the mace ready. Do you know how I could get rid of the griff cobras with...
by dertien
Wed Aug 13, 2014 9:25 pm
Forum: Expansion Pack
Topic: Split: Deployable subentities
Replies: 99
Views: 37838

Re: Scripters cove