<RetVar/IF> get next gate on route from <Var/Sector> to <Var/Sector>

This forum serves as MSCI Reference at EGOSOFT. It's Read-Only for non MSCI Group members.

Moderators: Scripting / Modding Moderators, MSCI Moderators

User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 24969
Joined: Sun, 2. Apr 06, 16:38
x4

<RetVar/IF> get next gate on route from <Var/Sector> to <Var/Sector>

Post by X2-Illuminatus » Mon, 1. Aug 11, 13:19

[skip|else] if [not]|while [not]| <RetVar/IF> get next gate on route from <Var/Sector> to <Var/Sector>


[skip|else] if [not]|while [not]| = The possible 'Conditional' statements that can be used with this command.
<RetVar/IF> = Use a variable, if the command should return information. If a variable is used, it will contain a gate.
<Var/Sector> = A sector or variable containing one.
<Var/Sector> = A sector or variable containing one.


Returns the next gate on the route from the as <Var/Sector> selected sector to another as <Var/Sector> selected sector.
Note that the route, that is used by the command to determine the next gate, is based on the shortest distance in meters and not in jumps. For example while the sectors 'Montalaar' and 'New Income' are only two jumps away from each other (so the next gate would be east gate to the Unknown sector), the next gate from Montalaar to New Income returned by this command will be the south gate to Rolk's Legacy.
If start and target sector are the same, the command will return 'null'.


Example:

$gate=get next gate on route from Montalaar to New Income
write to player logbook $gate
return null

This will return the next gate on the route from Montalaar to New Income and writes it to the logbook.


Related Commands:

<RetVar/IF> get jumps from sector <Var/Sector> to sector <Var/Sector>
<RetVar/IF> get next sector on route from sector <Var/Sector> to sector <Var/Sector>


Command Location:

User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 24969
Joined: Sun, 2. Apr 06, 16:38
x4

[TiP][49] 305125

Post by X2-Illuminatus » Sun, 2. Oct 11, 22:48

[skip|else] if [not]|while [not]| <RetVar/IF> get next gate on route from <Var/Sector> to <Var/Sector>


[skip|else] if [not]|while [not]| = Die möglichen bedingten Anweisungen, die mit diesem Befehl genutzt werden können.
<RetVar/IF> = Nutze eine Variable, wenn der Befehl eine Information zurückgeben soll. Wenn eine Variable genutzt wird, wird sie ein Sprungtor enthalten.
<Var/Sector> = Ein Sektor oder eine Variable, die einen enthält.
<Var/Sector> = Ein Sektor oder eine Variable, die einen enthält.


Gibt das nächste Sprungtor auf der Route von dem als <Var/Sector> ausgewählten Sektor zu einem anderen als <Var/Sector> ausgewählten Sektor zurück.
Beachte, dass die Route, die von dem Befehl benutzt wird, um das nächste Sprungtor zu ermitteln, auf der geringsten Entfernung in Metern und nicht in Sprüngen basiert. Zum Beispiel befinden sich die Sektoren "Montalaar" und "Neuer Verdienst" nur zwei Sprünge voneinander entfernt (das nächste Tor wäre ausgehend von dieser Betrachtung das Osttor in Montalaar zum Unbekannten Sektor). Dennoch wird dieser Befehl das Südtor zu Rolks Vermächtnis als nächstes Sprungtor zurückgeben.
Wenn Start- und Zielsektor gleich sind, wird 'null' zurückgegeben.


Beispiel:

$gate=get next gate on route from Montalaar to Neuer Verdienst
write to player logbook $gate
return null

Dies ermittelt das nächste Tor auf der Route von Montalaar nach Neuer Verdienst und schreibt es ins Logbuch.


Verwandte Befehle:

<RetVar/IF> get jumps from sector <Var/Sector> to sector <Var/Sector>
<RetVar/IF> get next sector on route from sector <Var/Sector> to sector <Var/Sector>


Zu finden unter:

Return to “MSCI Reference”