Ship orientation...

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

Post Reply
User avatar
drew
---- E L I T E ----
---- E L I T E ----
Posts: 2190
Joined: Fri May 19, 2006 9:29 am
Location: In front of a laptop writing a book.
Contact:

Ship orientation...

Post by drew »

I'm making progress, but another question ... :P

When I add ships with the addShipsAtPrecisely.... they appear in the right place, but they end up pointing in random directions.

I'm trying to create what looks like a 'parking lot' and need the ships to all be aligned in the same direction - is there a way of doing this?

Cheers,

Drew.
Drew is an author of SF and Fantasy Novels
WebsiteFacebookTwitter
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: Ship orientation...

Post by Eric Walch »

drew wrote:
When I add ships with the addShipsAtPrecisely.... they appear in the right place, but they end up pointing in random directions.
| see three ways to solve this.

1) With AI: Let them search for the systemStation, just a station or the witchpoint. All these are fount beyond scanner range. Then do a "setTargetToDestination", followed by a "faceDestination".

2) With a JS world script: Copy the orientation of one object and give it to all others. With such a script you could even rearrange the ships into a fixed pattern.

3) With a JS ship script. Let it orientate itself in a fixed with a startup script.
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Post by Commander McLane »

There is actually a fourth way, which is the legacy way: use the spawnShip-method.

Although on the other hand it isn't a way, because this method never worked correctly. :?
Post Reply