I like your
Next jump
solution and think that's the most elegant for this application. That said, I believe this would be the correct way to use
RouteDetails()
to achieve a similar result:
- From the
Next jump
script, use {RouteDetails("set", event.system)}
- This will generate a
Route details
event. From that generated event, utilize the documented variables made available for that event.
(This call and response system is designed to work best when integrated with VoiceAttack)
Ah, this is exactly what I tried first, so at least it seems I was using
RouteDetails()
correctly, thank you.
The reason this doesn't work, is because in the 'Next jump' event,
event.system
is set to the first system in the route (which is correct, as it's literally the "next jump"), not the final destination. I had tried the following code in the 'Next jump' event script:
Code:
{set trip to RouteDetails('set', event.system)}
{trip.routetype}.
{trip.destination}.
{trip.distance}.
{trip.count}.
{trip.routedistance}.
For a 3 jump route (for testing I made it work with >1 jump), I got this result:
Course laid in, for 3 jumps......
Destination set to the Eol Prou SS-W b17-15 system, 52.4 lightyears away.
The route I had selected ended at 'Eol Prou GG-Z B16-9', 141.91LY away (from Colonia as a start point). As you can see, none of the
RouteDetails()
variables were set (hence the row of dots in the output). Or am I still using it incorrectly? I'd also like to note that '.destination' didn't color-code like the other variables did (is it light green? Sorry, I'm a bit colour-blind).
Once I realised what
event.system
was, I then tried the
destinationsystem.name
as I mentioned above, but that wasn't populated either. I wasn't sure I was using it correctly, but from the help doc (when editing a script), I think I was doing it right. After some more testing today, I realised that it would get populated if 'route' was used for
RouteDetails()
, but a route couldn't be set as I had no missions.
From what I can gather, the
RouteDetails()
event is only generated after the calling event has finished, and that's why those variables are not populated at the time I tried to use them in the 'Next jump' script. Does this mean I'd have to add them to the end of the
RouteDetails()
script, and set them as State variables in order to use them?