Discussion and information relevant to creating special missions, new ships, skins etc.
Moderators: winston , another_commander
Smivs
Retired Assassin
Posts: 8408 Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:
Post
by Smivs » Wed Jul 09, 2014 5:37 pm
The wiki states
Multiple systems may be marked at once, as in mission.markSystem(4, 54, 222).
and gives this code
Code: Select all
mission.markSystem({
system: 55,
name: "my_oxp",
markerColor: "cyanColor",
markerScale: 1.5,
markerShape: "MARKER_DIAMOND"
});
but how do you mark more than one?
I tried this format
Code: Select all
mission.markSystem({
system: (55, 100),
name: "my_oxp",
markerColor: "cyanColor",
markerScale: 1.5,
markerShape: "MARKER_DIAMOND"
});
but while it marked both systems with a red cross, only the second got the cyan diamond. Does each system need to be coded separately to get the markers working?
Edited to add:- Coding both separately does work, although you still get the red cross as well as the diamond, which I wasn't expecting.
Eric Walch
Slightly Grand Rear Admiral
Posts: 5536 Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands
Post
by Eric Walch » Wed Jul 09, 2014 6:18 pm
try every system as a separate object:
Code: Select all
mission.markSystem({
system: (55),
name: "my_oxp",
markerColor: "cyanColor",
markerScale: 1.5,
markerShape: "MARKER_DIAMOND"
},
{
system: (100),
name: "my_oxp",
markerColor: "cyanColor",
markerScale: 1.5,
markerShape: "MARKER_DIAMOND"
});
Smivs
Retired Assassin
Posts: 8408 Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:
Post
by Smivs » Wed Jul 09, 2014 6:20 pm
Yes, I have and that does work.
Edited to add:- Actually, having just tried that, it doesn't work. What does work is
Code: Select all
mission.markSystem({
system: 55,
name: "my_oxp",
markerColor: "cyanColor",
markerScale: 1.5,
markerShape: "MARKER_DIAMOND"
});
mission.markSystem({
system: 100,
name: "my_oxp",
markerColor: "cyanColor",
markerScale: 1.5,
markerShape: "MARKER_DIAMOND"
});
The only surprise is that you get the red cross as well - I was expecting just the diamond.
Eric Walch
Slightly Grand Rear Admiral
Posts: 5536 Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands
Post
by Eric Walch » Wed Jul 09, 2014 6:27 pm
Sounds like a bug although I don't see any weird in the code.
Smivs
Retired Assassin
Posts: 8408 Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:
Post
by Smivs » Wed Jul 09, 2014 6:32 pm
I did wonder about a possible bug, not that I can help much if it is.
Just to be clear by the way, when I refer to a red cross it is an 'X' rather than a crucifix-type cross.
Eric Walch
Slightly Grand Rear Admiral
Posts: 5536 Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands
Post
by Eric Walch » Wed Jul 09, 2014 6:42 pm
I can't reproduce.
Code: Select all
mission.markSystem({
system: 55,
name: "my_oxp",
markerColor: "orangeColor",
markerScale: 1.1,
markerShape: "MARKER_DIAMOND"
},
{
system: 100,
name: "my_oxp",
markerColor: "orangeColor",
markerScale: 1.1,
markerShape: "MARKER_DIAMOND"
})
shows 2 orange diamonds. (My code from the first message has wrong () around the system numbers.)
Smivs
Retired Assassin
Posts: 8408 Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:
Post
by Smivs » Wed Jul 09, 2014 6:57 pm
Eric Walch wrote: (My code from the first message has wrong () around the system numbers.)
Ah, I hadn't spotted that either. I just did a c&p. Yes, the above is working fine, (albeit with the red 'X').
Eric Walch
Slightly Grand Rear Admiral
Posts: 5536 Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands
Post
by Eric Walch » Wed Jul 09, 2014 7:06 pm
(albeit with the red 'X').
Is there not other code in your script that also places a red cross at the same time?
Or did you test it by pasting the code directly into the console.
[off-topic](Im just mentally preparing for the match of the orange against the blue/white that starts in a hour)[on-topic]
Smivs
Retired Assassin
Posts: 8408 Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:
Post
by Smivs » Wed Jul 09, 2014 7:10 pm
Eric Walch wrote: (albeit with the red 'X').
Is there not other code in your script that also places a red cross at the same time?
Or did you test it by pasting the code directly into the console.
[off-topic](Im just mentally preparing for the match of the orange against the blue/white that starts in a hour)[on-topic]
No other code as far as I know. I'm actually checking that at the moment but am pretty sure there's not. Somehting must be causing it though, so I'll keep looking. I'm tweaking the script and re-starting rather than using the console.
[Off topic] Yes, me too. I hope it's a bit more two-sided than last night!
[/off topic]
Smivs
Retired Assassin
Posts: 8408 Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:
Post
by Smivs » Wed Jul 09, 2014 7:20 pm
Mystery solved!
I was using a Commander who had tested this mission before, and the save-file is the culprit. i'm getting a load of
like this
Code: Select all
<dict>
<key>markerColor</key>
<string>redColor</string>
<key>markerScale</key>
<real>1</real>
<key>markerShape</key>
<string>MARKER_X</string>
<key>name</key>
<string>__oolite_legacy_destinations</string>
<key>system</key>
<integer>100</integer>
</dict>
Using a virgin jameson, I just get the diamonds
Cody
Sharp Shooter Spam Assassin
Posts: 16081 Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:
Post
by Cody » Wed Jul 09, 2014 7:21 pm
Smivs wrote: Using a virgin jameson, I just get the diamonds
Damned useful, those virgin Jamesons! Go Holland!
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!