<RetVar> = <RefObj> get ship array from sector/ship/station

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> = <RefObj> get ship array from sector/ship/station

Post by X2-Illuminatus »

<RetVar> = <RefObj> get ship array from sector/ship/station


<RetVar> = A variable where the requested information is stored as an array.
<RefObj> = A variable containing a sector, ship or station.


This commands returns an array of ships that are currently in or docked to the as <RefObj> selected object. If the <RefObj> is a sector, it will return all ships that are currently in the sector but not docked to any ship or station. If the <RefObj> is a ship or a station, the command will return all ships that are docked to it.


Example:

$sector= get sector from universe index: x=1, y=3
$ship.arr=$sector -> get ship array from sector/ship/station
return null

This will save all ships that are currently in Argon Prime ( coordinates 1/3 ) and not docked to any ship or station in the array $ship.arr.


Related Commands:

<RetVar/IF><RefObj> get owned ships: class/type=<Value>
<RetVar> = get ship array: of race <Var/Race> class/type=<Value>


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

[TiP][49] 304963

Post by X2-Illuminatus »

<RetVar> = <RefObj> get ship array from sector/ship/station


<RetVar> = Eine Variable, in der die geforderte Information gespeichert wird.
<RefObj> = Eine Variabe, die einen Sektor, ein Schiff oder eine Station enthält.


Dieser Befehl gibt ein Array von Schiffen zurück, die zurzeit an das als <RefObj> ausgewählte Objekt angedockt sind. Wenn das <RefObj> ein Sektor ist, werden alle Schiffe zurückgegeben, die sich in diesem befinden und nicht angedockt sind. Wenn das <RefObj> ein Schiff oder eine Station ist, so gibt der Befehl alle an diese(s) angedockten Schiffe zurück.


Beispiel:

$sector= get sector from universe index: x=1, y=3
$ship.arr=$sector -> get ship array from sector/ship/station
return null

Dies wird alle Schiffe, die sich zur Zeit in Argon Prime ( Sektorkoordinaten 1/3 ) befinden und nicht angedockt sind, im Array $ship.arr speichern.


Verwandte Befehle:

<RetVar/IF><RefObj> get owned ships: class/type=<Value>
<RetVar> = get ship array: of race <Var/Race> class/type=<Value>


Zu finden unter:

Return to “MSCI Reference”