<RetVar/IF><RefObj> add pilot of ship <Var/Ship> as passenger: disable ship=<Var/...

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><RefObj> add pilot of ship <Var/Ship> as passenger: disable ship=<Var/...

Post by X2-Illuminatus » Thu, 3. Mar 11, 18:44

[skip|else] if [not]|while [not]| <RetVar/IF><RefObj> add pilot of ship <Var/Ship> as passenger: disable ship=<Var/Boolean>


[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, the command will return 1 on success and 0 on failure.
<RefObj> = The ship you want to add the pilot of <Var/Ship> as passenger.
<Var/Ship> = The ship, whose pilot you want to add as passenger to the <RefObj>.
<Var/Boolean> = A [TRUE] or [FALSE] value.

This will add the pilot of the as <Var/Ship> selected ship as passenger to the <RefObj>. Therefore the <RefObj> must have an installed Cargo Lifesupport System, at least transport class M and at least 6 units free cargo space.

If <Var/Boolean> is [TRUE] the pilot of <Var/Ship> will be stored as passenger on the <RefObj>. The <Var/Ship> will have no pilot and all scripts running on the ship will be terminated, so it can be claimed.
If <Var/Boolean> is [FALSE] the pilot is stored on the <RefObj> as well, but the <Var/Ship> will get a new pilot of the same race and continue its job.


Example:

$target = get player tracking aim
$success = [PLAYERSHIP] -> add pilot of ship $target as passenger: disable ship=[TRUE]
if $success == 1
|$target -> set owner race to Player
else
|display subtitle text: text='Pilot couldn't be added as passenger!' duration=3000 ms
end
return null

This will add the pilot of the player's target to the [PLAYERSHIP] as passenger and change the owner of that ship to the player. In case it isn't possible to transfer the pilot, an appropriate message will be displayed as subtitle.


Unknown Outcomes:

Using this command on a ship which has a pilot, who was created by a 'special' script (e.g. Sector/Universe Trader or Commercial Agent) that adds certain attributes to the pilot.
I just had some short tests with sector traders. Although the name and his experience level remained, the pilot's race was always changed (e.g. a argon sector trader was changed to a paranid passenger). When <Var/Boolean> was [FALSE] the new pilot had the same race as the passenger.


Related Commands:

<RetVar/IF><RefObj> move passenger to ship <Var/Ship>: set passenger as pilot=<Var/Boolean>


Command Location:
  • »» Trade Commands
    • »» Passengers
      <RetVar/IF><RefObj> add pilot of ship <Var/Ship> as passenger: disable ship=<Var/Boolean>

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

[TiP][49] 297763

Post by X2-Illuminatus » Sat, 26. Mar 11, 17:25

[skip|else] if [not]|while [not]| <RetVar/IF><RefObj> add pilot of ship <Var/Ship> as passenger: disable ship=<Var/Boolean>


[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 1 im Erfolgs- und 0 im Fehlerfall enthalten.
<RefObj> = Das Schiff, dem du den Piloten von <Var/Ship> als Passagier hinzufügen möchtest.
<Var/Ship> = Das Schiff, dessen Piloten du als Passagier dem <RefObj> hinzufügen möchtest.
<Var/Boolean> = Ein [TRUE] (wahr) oder [FALSE] (falsch) Wert.

Dieser Befehl wird den Piloten des als <Var/Ship> ausgewählten Schiffes dem <RefObj> als Passagier hinzufügen. Hierfür muss das <RefObj> eine installierte Lebenserhaltung für den Frachtraum, mindestens Transportklasse M sowie 6 Einheiten freien Frachtraum haben.

Wenn <Var/Boolean> gleich [TRUE] ist, wird der Pilot von <Var/Ship> als Passagier dem <RefObj> hinzugefügt. Das <Var/Ship> wird dann keinen Piloten mehr haben und alle auf ihm laufenden Scripte werden beendet, sodass es übernommen werden kann.
Wenn <Var/Boolean> gleich [FALSE] ist, wird der Pilot ebenfalls dem <RefObj> hinzugefügt, allerdings wird <Var/Ship> einen neuen Piloten der gleichen Rasse bekommen und wird seine Aufgaben fortführen.


Beispiel:

$target = get player tracking aim
$success = [PLAYERSHIP] -> add pilot of ship $target as passenger: disable ship=[TRUE]
if $success == 1
|$target -> set owner race to Player
else
|display subtitle text: text='Der Pilot konnte nicht als Passagier hinzugefügt werden!' duration=3000 ms
end
return null

Dies wird den Piloten des aktuellen Ziels des Spielers zum Spielerschiff [PLAYERSHIP] als Passagier hinzufügen und den Besitzer des Zielschiffes auf den Spieler ändern. Falls es nicht möglich ist den Piloten zu transferieren, wird eine entsprechende Nachricht als Untertitel angezeigt.


Unbekannte Ergebnisse:

Verwendung dieses Befehls auf einem Schiff, dessen Pilot von einem "speziellen" Script (bspw. Sektor-/Universumshändler oder Handelsvertreter) erstellt wurde, das gewisse Attribute dem Piloten hinzufügt.
Ein paar kurze Tests mit Sektorhändlern haben die folgenden Ergebnisse gezeigt: Obwohl Name und Erfahrungslevel stets beibehalten wurden, änderte sich das Volk des Piloten (z.B. wurde ein argonischer Händler zu einem paranidischen Passagier). Wenn <Var/Boolean> gleich [FALSE] war, gehörte der neue Pilot dem gleichen Volk wie der Passagier an.


Verwandte Befehle:

<RetVar/IF><RefObj> move passenger to ship <Var/Ship>: set passenger as pilot=<Var/Boolean>


Zu finden unter:
  • »» Trade Commands
    • »» Passengers
      <RetVar/IF><RefObj> add pilot of ship <Var/Ship> as passenger: disable ship=<Var/Boolean>

Return to “MSCI Reference”