<RetVar/IF><RefObj> get amount of ware <Var/Ware> in cargo bay

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

Moderators: Scripting / Modding Moderators, MSCI Moderators

mark_a_condren
Posts: 1468
Joined: Wed, 3. Aug 05, 05:05
x3tc

<RetVar/IF><RefObj> get amount of ware <Var/Ware> in cargo bay

Post by mark_a_condren » Thu, 4. Nov 10, 14:16

[skip|else] if [not]|while [not]| <RetVar/IF> = <RefObj> get amount of ware <Var/Ware> in cargo bay


[skip|else] if [not]|while [not]| = The possible 'Conditional' statements that can be used with this command.
<RetVar/IF> = RetVar is if you want to save the quantity to a variable. IF will check to see if the ware exists in the cargobay and return True / False.
<RefObj> = The 'Object' (Ship/Station) that the command is to be run on.
<Var/Ware> = What you want to know how much there is of.


Use this command to check how much of an item is present in the cargobay or if it present at all. This command will find wares that are 'Installed' on a ship, eg: guns or shields.


Example:

$target = get tracking aim
If $target is of class ship
| skip if not = $target get amount of ware Jumpdrive in cargo bay
|| display subtitle text: text='Jumpdrive Installed' duration=5000 ms
end

This will get the players tracking aim and if it is a ship it will check to see if a jumpdrive is aboard. If a jumpdrive is found it will display the subtitle 'Jumpdrive Installed' for 5 seconds.


Command Location:
  • »» Trade Commands
    • »» for Ships and Stations
      <RetVar/IF><RefObj> get amount of ware <Var/Ware> in cargo bay

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

[TiP][49] 290594

Post by X2-Illuminatus » Sat, 6. Nov 10, 16:45

[skip|else] if [not]|while [not]| <RetVar/IF> = <RefObj> get amount of ware <Var/Ware> in cargo bay


[skip|else] if [not]|while [not]| = Die möglichen bedingten Anweisungen, die mit diesem Befehl genutzt werden können.
<RetVar/IF> = Nutze RetVar, wenn du die Anzahl in einer Variable speichern möchtest. IF hingegen wird überprüfen, ob eine Ware im Frachtraum existiert und TRUE / FALSE (wahr / falsch) zurückgeben.
<RefObj> = Das 'Objekt' (Schiff / Station), auf dem der Befehl ausgeführt werden soll.
<Var/Ware> = Die Ware, von der du die Frachtraum vorhandene Anzahl ermitteln möchtest.


Nutze diesen Befehl, um zu überprüfen, wie viel von einer Ware im Frachtraum vorhanden ist. Dieser Befehl wird KEINE Waren finden, die im Schiff installiert sind, bspw. Waffen und Schilde.


Beispiel:

$target = get tracking aim
If $target is of class ship
| skip if not = $target get amount of ware Sprungantrieb in cargo bay
|| display subtitle text: text='Sprungantrieb Installiert' duration=5000 ms
end

Dies wird überprüfen, ob das Ziel des Spielers (wenn es ein Schiff ist) einen Sprungantrieb an Bord hat. Ist dies der Fall so wird der Untertitel 'Sprungantrieb Installiert' für 5 Sekunden angezeigt.


Den Befehl findet man unter:
  • »» Trade Commands
    • »» for Ships and Stations
      <RetVar/IF><RefObj> get amount of ware <Var/Ware> in cargo bay

Return to “MSCI Reference”