@ <RetVar/IF><RefObj> follow object <Var/Ship> with precision <Var/Number> m

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> follow object <Var/Ship> with precision <Var/Number> m

Post by mark_a_condren » Sun, 12. Dec 10, 16:13

@ [skip|else] if [not]|while [not]| <RetVar/IF> = <RefObj> follow object <Var/Ship> 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. If a variable is used, this command will return a FLET_ responce.
<RefObj> = The 'Object' that the command is to be run on. 'Valid' objects must be a 'Ship'.
<Var/Ship> = The target that you want followed.
<Var/Number> = The distance to be maintained between follower and followed as an integer.


Causes the ship to follow the target object, launching first if it is landed/docked.
Where as escort ship is intended for use in formation flying and making one ship protect another, this instruction is mostly used to cause a ship to get up close to something as a prelude to something else - often an attack.

The autopilot will attempt to get the ship within <Var/Number> metres of the target object.
Like the escort ship instruction, this one is almost impossible to terminate. Executing a countervailing "fly command" instruction in another process will not cause this instruction to break. It is possible to get control of the ship back from this instruction with a script in a different process by using a set follow mode [FALSE] instruction, but that will not cause the original follow object instruction to return. Only the destruction of the target object, its removal to another sector, or the termination or interruption of the script running this instruction will stop it. Be very careful about using this instruction to make a ship follow a faster ship. In most cases, it is highly recommended to use the follow object ... timeout= <Var/Number> instruction instead.

Returns;
FLRET_TARGETREACHED upon success.
FLRET_INTERRUPTED if the script executing this instruction is interrupted.
FLRET_BREAK if the target is invalid or if the target is destroyed or moves to another sector.
FLRET_INVALIDPARMS if <RefObj> is invalid.


Example:

@ $follow.return = $ship -> follow object $target with precision 5000 m

The ship $ship should fly to a position 5000 m from the target $target and stay at this range. This would put $ship within firing range of some long range weapons if it was being used as part of an attack run on $target.


Command Location:
  • »» Fly Commands
    @ <RetVar/IF><RefObj> follow object <Var/Ship> with precision <Var/Number> m

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

[TiP][49] 293052

Post by X2-Illuminatus » Wed, 29. Dec 10, 19:48

@ [skip|else] if [not]|while [not]| <RetVar/IF> = <RefObj> follow object <Var/Ship> 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. Wenn eine Variable genutzt wird, wird der Befehl eine FLET_ Antwort zurückgeben.
<RefObj> = Das Objekt, auf dem der Befehl ausgeführt wird. Dieses Objekt muss ein Schiff sein.
<Var/Ship> = Das Ziel, dem gefolgt werden soll.
<Var/Number> = Der Abstand, der zwischen Ziel und Verfolger eingehalten werden soll, als ganze Zahl.


Dieser Befehl veranlasst das Schiff dazu dem Zielobjekt zu folgen. Wenn es gelandet / angedockt ist, wird es dazu zunächst starten.
Während der "Eskortiere Schiff"-Befehl in Formationsflügen und zum Beschützen eines Schiffes durch ein anderes eingesetzt werden, ist dieser Befehl dazu gedacht, ein Schiff möglichst nah an etwas anderes heranfliegen zu lassen, als Auftakt für etwas anderes - bspw. einen Angriff.

Der Autopilot wird versuchen das Schiff bis auf <Var/Number> Meter an das Zielobjekt heranzubringen.
Wie der "Eskortiere Schiff"-Befehl, ist dieser ebenfall fast unmöglich zu beenden. Das Ausführen eines entsprechenden Befehls aus den "Fly Commands" in einem anderen Prozess wird es nicht schaffen diesen Befehl zu unterbrechen. Es ist möglich die Kontrolle über das Schiff von dem Befehl zurück zu bekommen, indem man in einem anderem Prozess mit einem anderen Script einen Befehl nutzt, der den "Folge Modus" (follow mode) auf [FALSE] (falsch) setzt. Allerdings wird das nicht dazu führen, dass der ursprüngliche "follow Object"-Befehl etwas zurückgibt. Nur die Zerstörung des Zielobjekts, das Transferieren des Zielobjekts zu einem anderem Sektor oder die Beendigung oder Unterbrechung des Scriptes, das diesen Befehl ausführt, kann den Befehl stoppen. Sei sehr vorsichtig, wenn du diesen Befehl nutzen möchtest, um ein Schiff einem schnelleren Schiff folgen zu lassen. In den meisten Fällen empfiehlt es sich eher den "follow object ... timeout= <Var/Number>"-Befehl zu nutzen.

Rückgabewerte:
FLRET_TARGETREACHED bei Erfolg.
FLRET_INTERRUPTED wenn das Script, das diesen Befehl ausführt, unterbrochen wird.
FLRET_BREAK wenn das Ziel unzulässig ist, zerstört wird oder in einen anderen Sektor fliegt.
FLRET_INVALIDPARMS wenn das <RefObj> unzulässig ist.


Beispiel:

@ $follow.return = $ship -> follow object $target with precision 5000 m

Das Schiff $ship soll zu einer Position 5000 m entfernt vom Ziel $target fliegen und dort bleiben. Dies würde $ship in die Waffenreichweite von Langstreckenwaffen bringen. Nützlich, wenn der Befehl als Teil eines Angriffsscriptes auf $target verwendet wird.


Zu finden unter:
  • »» Fly Commands
    @ <RetVar/IF><RefObj> follow object <Var/Ship> with precision <Var/Number> m

Locked

Return to “MSCI Reference”