Page 2 of 3

Posted: Tue Aug 10, 2010 8:15 am
by Killer Wolf
Cheers Eric, but i avoid JS as much as i can cos i have no clue about it :-(
all the stuff in my OXPs have been kindly provided by the likes of yourself/Thargoid etc, or butchered amateurishly by myself and probably work only by sheer luck.
would any JS people be willing to do a series of very simple "idiots' guides" to JS? from simple syntax rules/examples, to say how to pass parameters, how to stack stuff in AI etc? i know there's a bunch of coded examples on the wiki, but sometimes i can't unerstand what the code's doing.

Posted: Tue Aug 10, 2010 8:42 am
by Smivs
Request seconded. A few nice examples with explanations as to what the code is doing would be really useful, particularly if referenced to how Oolite works and uses JS.
@KW, you are not alone...there are probably many of us who would like to explore JS in more detail, but haven't got a clue where to start :(

Posted: Tue Aug 10, 2010 8:54 am
by another_commander
Smivs wrote:
Request seconded. A few nice examples with explanations as to what the code is doing would be really useful, particularly if referenced to how Oolite works and uses JS.
@KW, you are not alone...there are probably many of us who would like to explore JS in more detail, but haven't got a clue where to start :(
I recommend having a look at the Scripts folder inside oolite.app in the core game installation. All native missions are there and you can see how Nova, Constrictor and friends are done. For basic tutorials, I would try googling for "beginners javascript tutorial". Most of what you'll find will be browser-based, but will definitely give you what you need to get started.

Posted: Tue Aug 10, 2010 4:30 pm
by Commander McLane
Eric Walch wrote:
Killer Wolf wrote:
they were never intended to be in WS, though i guess the script's "thisshipwillexitfromhyperspace" thingy will trigger that. :-/
Look at the wiki. You must do an explicit check for not being in "InterstellarSpace" before adding the ship.
I think this is the oldest bug that is around and most oxp-ers have made this bug in the past.
As I had assumed. :wink:

@ KW: The remedy is easy. Just insert one line of code, right here:

Code: Select all

this.shipWillExitWitchspace = function() 
{
    if (system.isInterstellarSpace) return;
What it does is: If the system you are entering happens to be interstellar space, it stops the action right there. So no nests are spawned.

Posted: Tue Aug 10, 2010 5:24 pm
by Killer Wolf
thanks bud, i'll get working on an update when i get a spare moment.

edit : actually, summat's just struck me : to position the Nest i used the "spu" format : now, given there's no "s" in Witchspace (or "p" for that matter), what's it using in the calculation?

Posted: Tue Aug 10, 2010 7:57 pm
by Commander McLane
Killer Wolf wrote:
edit : actually, summat's just struck me : to position the Nest i used the "spu" format : now, given there's no "s" in Witchspace (or "p" for that matter), what's it using in the calculation?
It used to be that in witchspace the coordinate systems were completely ignored. Where you spawn is the origin, and where you are facing is the z-direction, regardless of the coordinate-letter-code. Oh, and everything was in meters, because there are no radii of planetary bodies, or distances between them. Thus, the nest should be spawned very much where the player exits witchspace (the engine would place him a little away from the point in order to avoid an immediate collision).

Posted: Tue Aug 10, 2010 9:52 pm
by tonyhippy
I quite like them turning up in witchspace myself.

Posted: Fri Aug 13, 2010 10:55 am
by Arexack_Heretic
Do they fire their lasers from the abdomen? :lol:

Posted: Fri Aug 13, 2010 11:51 am
by Killer Wolf
yep, underslung "sting" that faces forward :-)

Re: ** Urgent GalCop Broadcast to all pilots **

Posted: Mon May 16, 2011 10:41 am
by maik
Finally added them to the [wiki]OXP List[/wiki].

Re: ** Urgent GalCop Broadcast to all pilots **

Posted: Sun Jan 08, 2012 1:25 pm
by SandJ
Installed this a couple of days ago - I like it. Image It's sort of silly but valid in a sci-fi setting, it is fun, it is unobtrusive. I think it is a really good - albeit unusual - add-on. Thank you, Killer Wolf.

Spoilers in pale text follow - I suggest you install the OXP and go visit the nest before reading:

The way they attack was unexpected. I did not see it coming and I was dead within seconds - clever AI.

The first item for sale - genius! A genuine laugh-out-loud when I realised.

Once you've got the hang of how the swarms work, you can top up your kill count. <evil grin>

Re: ** Urgent GalCop Broadcast to all pilots **

Posted: Sun Jan 08, 2012 3:45 pm
by Killer Wolf
cheers, glad you like it :-)

the Wasp behaviour is all down to Thargoid's rather evil AI.

Re:

Posted: Sun Jan 08, 2012 5:32 pm
by Kaks
Commander McLane wrote:
Killer Wolf wrote:
edit : actually, summat's just struck me : to position the Nest i used the "spu" format : now, given there's no "s" in Witchspace (or "p" for that matter), what's it using in the calculation?
It used to be that in witchspace the coordinate systems were completely ignored. Where you spawn is the origin, and where you are facing is the z-direction, regardless of the coordinate-letter-code. Oh, and everything was in meters, because there are no radii of planetary bodies, or distances between them. Thus, the nest should be spawned very much where the player exits witchspace (the engine would place him a little away from the point in order to avoid an immediate collision).
Yep. All interstellar space coordinates, regardless of intended format, are always treated as 'abs', since any other format would be 'slightly' meaningless.

Re: ** Urgent GalCop Broadcast to all pilots **

Posted: Mon Jan 09, 2012 12:12 am
by Commander McLane
@ Kaks: Note that this particular exchange is already 1 1/2 years old. The thread was just revived from the dead. :wink:

Re: ** Urgent GalCop Broadcast to all pilots **

Posted: Mon Jan 09, 2012 12:28 am
by SandJ
Commander McLane wrote:
The thread was just revived from the dead. :wink:
My apologies if I caused any confusion.

I was told off very early on for starting a new thread on an existing subject, and I understand it is the expectation and convention that comments on a .OXP should go in the thread in which the .OXP was announced.

Hence I thought it right that I should say "Spiffy add-on" in this thread, especially since it had been so quiet for so long.

(This convention of keeping on-topic into the relevant thread is most unusual; most fora complain of raising zombies when someone does that. I happen to think this forum is right, and all the others wrong, myself.)