Page 1 of 1

[Solved] Help With Debug Console

Posted: Sun Oct 07, 2012 3:43 am
by mandoman
I'm trying to spawn a ship outside the Station, quite a way outside the Station because it is huge (behemoth size). Problem is, I don't seem to be giving the correct commands. Here is what I'm putting into the console,

Code: Select all

:spawn shipMT1012Carrier-base-for-others
I also tried,

Code: Select all

:spawn MT1012Carrier-base-for-others
The MT1012Carrier-base-for-others is what I have in shipdata.plist as the "Unique Role". It won't spawn the ship, though. I can get the ship to appear on screen when docked, spinning like any other ship by putting in,

Code: Select all

mission.runScreen({model: 'MT1012Carrier-base-for-others'})
That works fine, but I would really like to spawn it outside the Station, so I can check on the dock, and just generally inspect it. Any clues?

Re: Help With Debug Console

Posted: Mon Oct 08, 2012 10:22 pm
by Svengali
Try

Code: Select all

system.addShips("MT1012Carrier-base-for-others",1,player.ship.position.add([10000,0,0]));
You could simply use underscores instead of the minus (then you can use the :spawn macro again) and a eaaier to remember name will help too, e.g. "Mandoman_BaseCarrier_MT1012".

Edit: demysthified the missing bracket

Re: Help With Debug Console

Posted: Tue Oct 09, 2012 12:54 am
by mandoman
Svengali wrote:
Try

Code: Select all

system.addShips("MT1012Carrier-base-for-others",1,player.ship.position.add([10000,0,0]);
You could simply use underscores instead of the minus (then you can use the :spawn macro again) and a eaaier to remember name will help too, e.g. "Mandoman_BaseCarrier_MT1012".
Isn't that a Java Script command? I tried it, and the Debug Console said,

Code: Select all

Exception: TypeError.system.addships is not a funtion
It seems like I've seen what you gave me there in a test ship Java Script.

Re: Help With Debug Console

Posted: Tue Oct 09, 2012 6:03 am
by another_commander
mandoman wrote:
Svengali wrote:
Try

Code: Select all

system.addShips("MT1012Carrier-base-for-others",1,player.ship.position.add([10000,0,0]);
You could simply use underscores instead of the minus (then you can use the :spawn macro again) and a eaaier to remember name will help too, e.g. "Mandoman_BaseCarrier_MT1012".
Isn't that a Java Script command? I tried it, and the Debug Console said,

Code: Select all

Exception: TypeError.system.addships is not a funtion
You have a case sensitivity error there. You typed system.addships in the console when it should be system.add[b][size=150]S[/size][/b]hips, as provided by Svengali.

Re: Help With Debug Console

Posted: Tue Oct 09, 2012 3:50 pm
by mandoman
Okay, I tried that, changing the "s" to "S" in the word "Ship", but I still get the same error message as I posted above. One thing I noticed about that command is the "(" before

Code: Select all

("MT1012Carrier-base-for-others"
, doesn't seem to have a corresponding ")" anywhere in the command line. I don't know where it would go if that is the case, though.

Re: Help With Debug Console

Posted: Tue Oct 09, 2012 4:03 pm
by Svengali
mandoman wrote:
Isn't that a Java Script command?
Yep. The console is there to be used for JS commands. The macros (like :spawn) are just a convenient way to use JS.

*sigh* Have added the missing bracket.

Re: Help With Debug Console

Posted: Tue Oct 09, 2012 5:17 pm
by mandoman
Svengali, I didn't mean to criticize in any way. I really DON'T know where the bracket should go. I'm sorry, but for some reason (most likely stupidity) js seems to be beyond me.

Re: Help With Debug Console

Posted: Tue Oct 09, 2012 5:52 pm
by Svengali
mandoman wrote:
Svengali, I didn't mean to criticize in any way. I really DON'T know where the bracket should go. I'm sorry, but for some reason (most likely stupidity) js seems to be beyond me.
No worries, mandoman. It was my fault. I should have tested it before posting useless stuff.

Re: Help With Debug Console

Posted: Tue Oct 09, 2012 7:33 pm
by mandoman
Good, that worked perfectly. Thanks very much, Svengali. :)