<RetVar/IF><RefObj> get planet array

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: 25128
Joined: Sun, 2. Apr 06, 16:38
x4

<RetVar/IF><RefObj> get planet array

Post by X2-Illuminatus »

[skip|else] if [not]|while [not]| <RetVar/IF><RefObj> get planet array


[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 an array of all planets in the selected sector
<RefObj> = A variable containing a sector.


Returns an array containing all planets in the as <RefObj> selected sector. Note that small planets and moons are classified as planets, as well.


Example:

$sector=[PLAYERSHIP] -> get sector
$planet.arr=$sector -> get planet array
return null

This will save all planets in the current player sector in the array $planet.arr.


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

[TiP][49] 304914

Post by X2-Illuminatus »

[skip|else] if [not]|while [not]| <RetVar/IF><RefObj> get planet array


[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 Array gefüllt mit den Planeten im gewählten Sektor enthalten.
<RefObj> = Eine Variable, die einen Sektor enthält.


Gibt ein Array gefüllt mit allen Planeten im als <RefObj> gewählten Sektor zurück. Beachte, dass kleine Planeten und Monde auch als Planeten klassifiziert sind.


Beispiel:

$sector=[PLAYERSHIP] -> get sector
$planet.arr=$sector -> get planet array
return null

Dies speichert alle Planeten im aktuelle Spielersektor im Array $planet.arr.


Zu finden unter:

Return to “MSCI Reference”