<RetVar/IF><RefObj> get owned ships: class/type=<Value>

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

Moderators: Scripting / Modding Moderators, MSCI Moderators

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

<RetVar/IF><RefObj> get owned ships: class/type=<Value>

Post by X2-Illuminatus » Fri, 29. Jul 11, 11:54

[skip|else] if [not]|while [not]| <RetVar/IF><RefObj> get owned ships: class/type=<Value>


[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 ships owned by the <RefObj>.
<RefObj> = A variable containing a race, ship or station.
<Value> = A ship class / type or 'null'


This command returns an array of existing ships owned by the <RefObj> of the as <Value> selected class. Entering 'null' as "class / type"-value will return all ships of the <RefObj>. If the <RefObj> is a race, the command will return all existing ships of that race. If the <RefObj> is a ship or station, it will return all ships homebased with it.


Example:

$homebase=$ship -> get homebase
$ship.arr=$homebase -> get owned ships: class/type=null
return null

Assuming the variable $ship contains a ship, this will save all ships that have the same homebase as $ship in the array $ship.arr.


Related Commands:

<RetVar> = <RefObj> get player owned ship array from sector
<RetVar> = get ship array: of race <Var/Race> class/type=<Value>


Command Location:

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

[TiP][49] 304961

Post by X2-Illuminatus » Sat, 1. Oct 11, 17:31

[skip|else] if [not]|while [not]| <RetVar/IF><RefObj> get owned ships: class/type=<Value>


[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 mit Schiffen enthalten, die dem <RefObj> gehören.
<RefObj> = Eine Variable, die ein Volk, ein Schiff oder eine Station enthält.
<Value> = Eine Schiffsklasse, ein Schiffstyp oder 'null'.


Dieser Befehl gibt alle existierenden Schiffe zurück, die das <RefObj> besitzt und der als <Value> ausgewählten Klasse (oder -typ) angehören. 'null' als Eingabe für den "class / type"-Wert wird alle Schiffe zurückgeben, die das <RefObj> besitzt. Wenn das <RefObj> ein Volk ist, so gibt der Befehl alle existierenden Schiffe dieses Volkes zurück. Wenn das <RefObj> ein Schiff oder eine Station ist, so werden alle Schiffe zurückgegeben, die dieses Schiff oder diese Station als Heimatbasis haben.


Beispiel:

$homebase=$ship -> get homebase
$ship.arr=$homebase -> get owned ships: class/type=null
return null

Vorausgesetzt die Variable $ship enthält ein Schiff, wird dieses Beispiel alle Schiffe mit der gleichen Heimatbasis wie das $ship im array $ship.arr speichern.


Verwandte Befehle:

<RetVar> = <RefObj> get player owned ship array from sector
<RetVar> = get ship array: of race <Var/Race> class/type=<Value>


Zu finden unter:

Locked

Return to “MSCI Reference”