Page 1 of 1
mission.markSystem question
Posted: Wed Jul 09, 2014 5:37 pm
by Smivs
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.
Re: mission.markSystem question
Posted: Wed Jul 09, 2014 6:18 pm
by Eric Walch
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"
});
Re: mission.markSystem question
Posted: Wed Jul 09, 2014 6:20 pm
by Smivs
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.
Re: mission.markSystem question
Posted: Wed Jul 09, 2014 6:27 pm
by Eric Walch
Sounds like a bug although I don't see any weird in the code.
Re: mission.markSystem question
Posted: Wed Jul 09, 2014 6:32 pm
by Smivs
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.
Re: mission.markSystem question
Posted: Wed Jul 09, 2014 6:42 pm
by Eric Walch
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.)
Re: mission.markSystem question
Posted: Wed Jul 09, 2014 6:57 pm
by Smivs
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').
Re: mission.markSystem question
Posted: Wed Jul 09, 2014 7:06 pm
by Eric Walch
(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]
Re: mission.markSystem question
Posted: Wed Jul 09, 2014 7:10 pm
by Smivs
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]
Re: mission.markSystem question
Posted: Wed Jul 09, 2014 7:20 pm
by Smivs
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
Re: mission.markSystem question
Posted: Wed Jul 09, 2014 7:21 pm
by Cody
Smivs wrote:Using a virgin jameson, I just get the diamonds
Damned useful, those virgin Jamesons! Go Holland!