<RetVar> = <RefObj> get position as array

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

Moderators: Scripting / Modding Moderators, MSCI Moderators

corbinbird
Posts: 49
Joined: Tue, 2. May 06, 18:58
x3tc

<RetVar> = <RefObj> get position as array

Post by corbinbird » Tue, 11. Jan 11, 01:28

<RetVar> = <RefObj> get position as array

This command gets the position of a specific object as an array. The array consists of the X, Y, and Z coordinates. The command allocates an array. The position is the exact center of the specific object.

<RetVar> = The 'variable' storing the returned array.
<RefObj> = The specific object that you want the position of.

Example :

* a station was targeted by the player
$Station = get player tracking aim
$Location = $Station->get position as array
write to player logbook $Location

return null

The logbook output is in this format : ARRAY(3456,0,-19523)

Related Commands :

<RefObj> ->get distance to: array=<Var/Array>
<RetVar> = get distance: position array1=<Var/Array> array2=<Var/Array>


Command Location :

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

[TiP][49] 294928

Post by X2-Illuminatus » Thu, 27. Jan 11, 17:30

<RetVar> = <RefObj> get position as array

Dieser Befehl gibt die Position eines gewählten Objekts als Array zurück. Das Array beinhaltet die X-, Y- und Z-Koordinate. Die Position ist der genaue Mittelpunkt des gewählten Objekts. Der Befehl legt ein Array an.

<RetVar> = Die Variable, in der das zurückgegebene Array gespeichert wird.
<RefObj> = Das Objekt, von dem du die Position erfahren möchtest.

Beispiel:

* eine Station die vom Spieler als Ziel erfasst wurde
$Station = get player tracking aim
$Location = $Station->get position as array
write to player logbook $Location

return null

Die Logbuch-Ausgabe ist im Format: ARRAY(3456,0,-19523)

Ähnliche Befehle:

<RefObj> ->get distance to: array=<Var/Array>
<RetVar> = get distance: position array1=<Var/Array> array2=<Var/Array>


Zu finden unter:

Return to “MSCI Reference”