@ <RetVar/IF><RefObj> move to position: x=<Var/Number> y=<Var/Number> z=<Var/Number>

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

Moderators: Scripting / Modding Moderators, MSCI Moderators

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

@ <RetVar/IF><RefObj> move to position: x=<Var/Number> y=<Var/Number> z=<Var/Number>

Post by mark_a_condren » Wed, 15. Dec 10, 14:26

@ [skip|else] if [not]|while [not]| <RetVar/IF> = <RefObj> -> move to position x = <Var/Number> y = <Var/Number> z = <Var/Number> with precision <Var/Number> m


@ [skip|else] if [not]|while [not]| = The possible 'Conditional' statements that can be used with this command.
<RetVar/IF> = If the command is to 'return' information it will store the information here.
<RefObj> = The ship you wish to send to the position.
<Var/Number> = The location on the 'X' axis.
<Var/Number> = The location on the 'Y' axis.
<Var/Number> = The location on the 'Z' axis.
<Var/Number> = The precision you wish to be inforced by this command.

Causes a ship to move to within 'precision <Var/Number>' metres of the specified position.
The position coordinates are in metres from the centre of a sector's trade grid. It is advisable to be more liberal with the precision as the size of the ship increases, especially if the position might be around other objects.

This command will only move a ship around in its current sector. It can not be used to move a ship to a position in a different sector. The ship would have to be moved by other means if a sector change is required.

Unlike the escort ship and follow object instructions, this one can be overridden by a "fly command" instruction in another process. However, like the escort ship and follow object instructions, if this is done then the move to position instruction will never return - it does not return a FLRET_BREAK in that circumstance.

Returns;
FLRET_NOCOMMAND when <RefObj> reaches its destination coordinates.
FLRET_INTERRUPTED if the script executing this instruction is interrupted.
FLRET_INVALIDPARMS if <RefObj> is invalid.


Example:

@ = $ship -> move to position: x= 500 y= 1000 z= 1500 with precision 2000 m

The $ship will move to within 2000 meters of the set position.
Due to the '=' the script sending this command to the $ship will wait until the ship reaches the set position before continuing.

Command Location:
  • »» Fly Commands
    <RetVar/IF><RefObj> move to position x = <Var/Number> y = <Var/Number> z = <Var/Number> with precision <Var/Number> m

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

[TiP][49] 293230

Post by X2-Illuminatus » Wed, 29. Dec 10, 18:40

@ [skip|else] if [not]|while [not]| <RetVar/IF> = <RefObj> -> move to position x = <Var/Number> y = <Var/Number> z = <Var/Number> with precision <Var/Number> m


@ [skip|else] if [not]|while [not]| = Die möglichen bedingten Anweisungen, die mit diesem Befehl genutzt werden können.
<RetVar/IF> = Die zurückgebene Information wird hier gespeichert.
<RefObj> = Das Schiff, das du zu der Position schicken möchtest.
<Var/Number> = Die Position auf der X-Achse.
<Var/Number> = Die Position auf der Y-Achse.
<Var/Number> = Die Position auf der Z-Achse.
<Var/Number> = Die Genauigkeit, die vom Befehl eingehalten werden soll.

Dieser Befehl veranlasst ein Schiff mit einer Genauigkeit von <Var/Number> Metern zu einer gewählten Position zu fliegen.
Die Positionskoordinaten werden in Metern eingegeben ausgehend vom Zentrum der Sektorkarte. Es ist ratsam mit steigender Schiffsgröße etwas großzügiger mit der gewählten Genauigkeit zu sein, besonders wenn die gewählte Position in der Nähe anderer Objekte liegt.

Dieser Befehl wird ein Schiff nur im Sektor, in dem sich auch das Schiff befindet, bewegen. Er kann nicht genutzt werden, um ein Schiff zu einer Position in einem anderen Sektor zu bewegen. Das Schiff müsste dazu zunächst mit anderen Mitteln in den gewünschten Sektor transportiert werden.

Im Gegensatz zu Eskortiere Schiff (escort ship) und Folge Objekt (follow object) Befehlen, kann dieser durch einen Befehl aus den "Fly Commands" in einem anderen Prozess überschrieben werden. Jedoch wird dann, wie bei den "Eskortiere Schiff"- und "Folge Objekt"-Befehlen, der "move to position"-Befehl nichts, kein FLRET_BREAK, zurückgegeben.

Rückgabewerte:
FLRET_NOCOMMAND wenn das <RefObj> seine Zielkoordinaten erreicht.
FLRET_INTERRUPTED wenn das Script, das den Befehl ausführt, unterbrochen wird.
FLRET_INVALIDPARMS wenn das <RefObj> unzulässig ist.


Beispiel:

@ = $ship -> move to position: x= 500 y= 1000 z= 1500 with precision 2000 m

Das Schiff $ship wird sich auf eine Entfernung von 2000 Metern der gewählten Position nähern.
Aufgrund von '=' wird das Script, das diesen Befehl zum $ship sendet, warten bis das Schiff seine Position erreicht hat, ehe es fortfährt.

Zu finden unter:
  • »» Fly Commands
    <RetVar/IF><RefObj> move to position x = <Var/Number> y = <Var/Number> z = <Var/Number> with precision <Var/Number> m

Locked

Return to “MSCI Reference”