<RetVar> = <RefObj> get east warp gate

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
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 24949
Joined: Sun, 2. Apr 06, 16:38
x4

<RetVar> = <RefObj> get east warp gate

Post by X2-Illuminatus » Tue, 2. Aug 11, 20:44

<RetVar> = <RefObj> get east warp gate


<RetVar> = A variable where the requested information is stored.
<RefObj> = A variable containing a sector.


Returns the east gate of the as <RefObj> selected sector.

Each sector in the X-Universe can have a maximum of 6 gates. Each gate in a sector has a specific id, whereby the ids 0-3 are usually reserved for north (0), south (1), west (2) and east (3) gate. The ids 4 and 5 are free to use for additional gates, for example in the HUB or the Aldrin sector (after the Aldrin Expansion plot). Note, that it's also possible to create gates with different ids - possible ids are still 0-5, but for example you could use '2' as east gate - using the create gate[/color]-command.
However, this command will always return the gate with the id = 3. If a sector has no gate with this id, the command will return 'null'.

Example:

$sector = [PLAYERSHIP] -> get sector
$gate = $sector -> get east warp gate
$destination = $gate get gate destination: return sector=[TRUE]
write to player logbook $destination
return null

Assuming the current player sector contains an east gate ( with id=3 ), this writes its destination to the logbook.


Related Commands:

[url=http://forum.egosoft.com/viewtopic.php?t=305207]<RetVar> = <RefObj> get north warp gate

<RetVar> = <RefObj> get south warp gate
<RetVar> = <RefObj> get west warp gate


Command Location:

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

[TiP][49] 305210

Post by X2-Illuminatus » Mon, 3. Oct 11, 22:01

<RetVar> = <RefObj> get east warp gate


<RetVar> = Eine Variable, in der die geforderte Information gespeichert wird.
<RefObj> = Eine Variable, die einen Sektor enthält.


Gibt das Osttor des als <RefObj> ausgewählten Sektors zurück.

In jedem Sektor im X-Universum können maximal 6 Sprungtore stehen. Jedes Tor hat eine eigene Identifikationsnummer (kurz ID). Die IDs 0-3 sind dabei normalerweise für Nord (0), Süd (1), West (2) und Ost (3) Tor reserviert. Die IDs 4 und 5 können für zusätzliche Tore genutzt werden, wie zum Beispiel im HUB-Sektor oder in Aldrin (nach dem Aldrin Plot). Beachte, dass es möglich ist, Tore mit unterschiedlichen IDs mithilfe des create gate[/color]-Befehls zu erstellen - die möglichen Ids gehen zwar immernoch von 0-5, aber man könnte bspw. 2 als ID für ein Osttor nehmen.
Jedoch wird dieser Befehl immer das Tor mit der ID = 3 zurückgeben. Wenn ein Sektor kein Tor mit dieser ID hat, so wird der Rückgabewert "null" sein.


Beispiel:

$sector = [PLAYERSHIP] -> get sector
$gate = $sector -> get east warp gate
$destination = $gate get gate destination: return sector=[TRUE]
write to player logbook $destination
return null

Vorausgesetzt der aktuelle Spielersektor enthält ein Osttor ( id=3 ), wird dieses Beispiel das Ziel dieses Osttores ins Spielerlogbuch schreiben.


Related Commands:

[url=http://forum.egosoft.com/viewtopic.php?t=305207]<RetVar> = <RefObj> get north warp gate

<RetVar> = <RefObj> get south warp gate
<RetVar> = <RefObj> get west warp gate


Command Location:

Locked

Return to “MSCI Reference”