<RetVar/IF> <RefObj> get sector

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: 3493
Joined: Fri, 12. Aug 05, 20:46
x3tc

<RetVar/IF> <RefObj> get sector

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

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


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


Returns the sector <RefObj> is in. If <RefObj> is invalid 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 [SECTOR] constant.


Example
  • $sector = $ship -> get sector
Command Location:

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

[TiP][49] 286490

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

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

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

Gibt den Sektor aus, in dem sich <RefObj> befindet. Für den Fall, dass <RefObj> ungültig ist oder nicht existiert, wird null zurückgegeben.

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

Beispiel:

$sector = $ship -> get sector

Hier wird der Sektor des Objekts $ship als Variable $sector zurückgegeben.


Zu finden unter:

User avatar
Capux
Posts: 2141
Joined: Sat, 31. Oct 09, 22:17
x4

[34]286490

Post by Capux » Tue, 28. Sep 10, 22:12

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


[skip|else] if [not]|while [not]| = Istruzione condizionale che può essere usata, tuttavia non hanno un uso pratico
<RetVar> = variabile dove viene salvata l'informazione richiesta
<RefObj> = L'oggetto da cui prendi l'informazione


Restituisce il settore dove si trova <RefObj>. Se <RefObj> non è valido o non esiste, restituisce null.

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


Esempio
$sector = $ship -> get sector


Posizione dell'istruzione nella lista:

Locked

Return to “MSCI Reference”