<RetVar/IF><RefObj> add marine <Var/Passenger> to attack group on ship

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: 24965
Joined: Sun, 2. Apr 06, 16:38
x4

<RetVar/IF><RefObj> add marine <Var/Passenger> to attack group on ship

Post by X2-Illuminatus » Sat, 26. Feb 11, 11:11

[skip|else] if [not]|while [not]| <RetVar/IF><RefObj> add marine <Var/Passenger> to attack group on ship


[skip|else] if [not]|while [not]| = The possible 'Conditional' statements that can be used with this command.
<RetVar/IF> = Use a variable, if the command should return information. If a variable is used, the command will return 1 on success and 0 on failure.
<RefObj> = The object you want to send the <Var/Passenger> to board. 'Valid' objects are ships.
<Var/Passenger> = The passenger, marine or astronaut you want to send to board the <RefObj>.


This command will send the as <Var/Passenger> selected person to board the as <RefObj> selected ship.

In contrast to the vanilla boarding methods the <Var/Passenger> will immediately start to board the ship. He doesn't have to fly to it or break through its hull. The target ship must be enemy to the player and boardable.
With this command it's possible to send even one marine more to a ship than the maximum number of marines that can be stored on it. The maximum number of marines you can send to board a ship with this command is the return value of the <RetVar/IF><RefObj> get number of marines can board-command.


Examples:

$target = get player tracking aim
$marines.arr = [PLAYERSHIP] -> get marines array
$marine = $marines.arr[0]
$success = $target -> add marine $marine to attack group on ship
if $success == 1
|$message = sprintf: fmt='%s was sent to board %s', $marine, $target, null, null, null
|display subtitle text: text=$message duration=5000 ms
else
|$message2 = sprintf: fmt='%s wasn't sent to board %s', $marine, $target, null, null, null
|display subtitle text: text=$message2 duration=5000 ms
end
return null

This sends a marine from the [PLAYERSHIP] to board the player's target and will display a message as subtitle, if it was possible to send the marine or not.

-----------------------------------

$target = get player tracking aim
$number = $target -> get number of marines can board
$marines.arr = [PLAYERSHIP] -> get marines array
$size.marine.arr = size of array $marines.arr
if $size.marine.arr > $number
|$counter = $number
else
|$counter = $size.marine.arr
end
while $counter
|dec $counter =
|$marine = $marines.arr[$counter]
|$success = $target -> add marine $marine to attack group on ship
end
return null

This will send the maximum number of marines to board the player's target from the [PLAYERSHIP]. The number of marines that will be sent depends on the number of marines that are stored on the [PLAYERSHIP] and on the maximum number of marines that can be used to board the target.


Note:

In the unmodified game and with the normal boarding methods it's only possible to board ships of the classes TM, TL, M1, M2, M6 and M7. With this command it's also possible to board ships of the M8 class.


Related Commands:

<RetVar/IF><RefObj> get number of marines can board


Command Location:
  • »» Trade Commands
    • »» Passengers
      <RetVar/IF><RefObj> add marine <Var/Passenger> to attack group on ship

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

[TiP][49] 297459

Post by X2-Illuminatus » Mon, 28. Feb 11, 20:44

[skip|else] if [not]|while [not]| <RetVar/IF><RefObj> add marine <Var/Passenger> to attack group on ship


[skip|else] if [not]|while [not]| = Die möglichen bedingten Anweisungen, die mit diesem Befehl genutzt werden können.
<RetVar/IF> = Nutze eine Variable, wenn der Befehl eine Information zurückgeben soll. Wenn eine Variable genutzt wird, wird sie 1 im Erfolgs- und 0 im Fehlerfall enthalten.
<RefObj> = Das Objekt, das du mit dem <Var/Passenger> entern möchtest. 'Zulässige' Objekte sind Schiffe.
<Var/Passenger> = Der Passagier, Marineinfanterist oder Astronaut, den du zum Entern des <RefObj> schicken möchtest.


Dieser Befehl wird die als <Var/Passenger> ausgewählte Person zum Entern des als <RefObj> ausgewählten Schiffes schicken.

Im Gegensatz zu den Vanilla Entermethoden wird der <Var/Passenger> sofort beginnen das Zielschiff zu entern. Er muss weder hinfliegen noch durch die Hülle brechen. Das Zielschiff muss feindlich und enterbar sein.
Mit diesem Befehl ist es sogar möglich einen Marineinfanteristen mehr auf das Schiff zu schicken als die größtmögliche Anzahl an Marineinfanteristen, die auf ihm Platz finden. Die größtmögliche Anzahl an Marineinfanteristen, die man mit diesem Befehl zum Entern schicken kann, ist der Rückgabewert des Befehls <RetVar/IF><RefObj> get number of marines can board.


Beispiele:

$target = get player tracking aim
$marines.arr = [PLAYERSHIP] -> get marines array
$marine = $marines.arr[0]
$success = $target -> add marine $marine to attack group on ship
if $success == 1
|$message = sprintf: fmt='%s wurde zum Entern von %s geschickt', $marine, $target, null, null, null
|display subtitle text: text=$message duration=5000 ms
else
|$message2 = sprintf: fmt='%s wurde nicht zum Entern von %s geschickt', $marine, $target, null, null, null
|display subtitle text: text=$message2 duration=5000 ms
end
return null

Dies schickt einen Marineinfanteristen vom Spielerschiff [PLAYERSHIP] zum Entern des Ziels des Spielers und zeigt als Untertitel eine Nachricht an, ob es möglich war den Marineinfanteristen loszuschicken oder nicht.

-----------------------------------

$target = get player tracking aim
$number = $target -> get number of marines can board
$marines.arr = [PLAYERSHIP] -> get marines array
$size.marine.arr = size of array $marines.arr
if $size.marine.arr > $number
|$counter = $number
else
|$counter = $size.marine.arr
end
while $counter
|dec $counter =
|$marine = $marines.arr[$counter]
|$success = $target -> add marine $marine to attack group on ship
end
return null

Dies schickt die größtmögliche Anzahl an Marineinfanteristen vom Spielerschiff los, um das momentane Ziel des Spielers zu entern. Die Anzahl der Marineinfanteristen, die ausgesandt wird, hängt davon ab, wie viele Infanteristen sich auf dem Spielerschiff befinden und wie viele auf das Zielschiff passen.


Beachte:

Im unmodifizierten Spiel und mit den normalen Entermethoden ist es nur möglich Schiffe der Klassen TM, TL, M1, M2, M6 und M7 zu entern. Mit diesem Befehl ist es auch noch möglich Schiffe der Klasse M8 zu entern.


Verwandte Befehle:

<RetVar/IF><RefObj> get number of marines can board


Zu finden unter:
  • »» Trade Commands
    • »» Passengers
      <RetVar/IF><RefObj> add marine <Var/Passenger> to attack group on ship

Locked

Return to “MSCI Reference”