<RetVar/IF> <RefObj> get homebase

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
Serial Kicked
Posts: 3823
Joined: Fri, 12. Aug 05, 20:46
x3tc

<RetVar/IF> <RefObj> get homebase

Post by Serial Kicked » Wed, 8. Sep 10, 20:39

[skip|else] if [not]|while [not]|<RetVar> = <RefObj> -> get homebase


[skip|else] if [not]|while [not]| = Possible 'conditional' statements that can be used
<RetVar> = variable where the requested information is put
<RefObj> = The object you want to check


Returns the homebase of the specified <RefObj>. If <RefObj> doesn't have a homebase or doesn't exist, it will return null.

Alternatively, when the script is running on the object you want to check you can use the [HOMEBASE] constant.


Example
  • if $ship -> get homebase
    | write to logbook "the ship has a homebase"
    end
Command Location:

Alex Vanderbilt
Winner X3 Sektorquest
Posts: 2127
Joined: Thu, 4. May 06, 12:07
x3tc

[TiP][49] 286492

Post by Alex Vanderbilt » Thu, 23. Sep 10, 10:52

[skip|else] if [not]|while [not]| <RetVar> = <RefObj> -> get homebase

[skip|else] if [not]|while [not]| = Eine mögliche Bedingung, die mit diesem Kommando verwendet werden kann.
<RetVar> = Die Variable, in die die Informationen abgelegt werden.
<RefObj> = Das Objekt, das Du überprüfen willst.

Gibt die Heimatbases von <RefObj> aus. Für den Fall, dass <RefObj> ungültig ist oder nicht existiert, wird null zurückgegeben.

Alternativ kann man auch die [HOMEBASE]-Konstante auf dem zu überprüfenden Schiff verwenden, auf dem das Skript läuft.

Beispiel:

if $ship -> get homebase
| write to logbook "Das Schiff hat eine Heimatbasis."
end

Für den Fall, dass $ship eine Heimatbasis hat, wird in das Logbuch "Das Schiff hat eine Heimatbasis." geschrieben.


Zu finden unter:
Last edited by Alex Vanderbilt on Thu, 23. Sep 10, 18:49, edited 1 time in total.

User avatar
Capux
Posts: 2456
Joined: Sat, 31. Oct 09, 21:17
x4

[34]286492

Post by Capux » Tue, 28. Sep 10, 21:41

[skip|else] if [not]|while [not]|<RetVar> = <RefObj> -> get homebase


[skip|else] if [not]|while [not]| = Istruzioni condizionali che possono essere usate
<RetVar> = Variabile dove è salvata l'informazione richiesta
<RefObj> = Oggetto da dove prendi l'informazione


Restituisce la base del <RefObj> specificato. Se <RefObj> non ha una base oppure non esiste, restituisce null.

In alternativa, puoi usare la costante [HOMEBASE] sull'oggetto che vuoi controllare mentre lo script lavora.

Esempio
if $ship -> get homebase
| write to logbook "the ship has a homebase"
end


Posizione dell'istruzione nella lista:

Locked

Return to “MSCI Reference”