<RetVar/IF><RefObj> can launch marines

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

<RetVar/IF><RefObj> can launch marines

Post by X2-Illuminatus » Fri, 25. Feb 11, 13:00

[skip|else] if [not]|while [not]| <RetVar/IF><RefObj> can launch marines


[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, which you want to check, if it can launch marines.


This command will check, if the <RefObj> can launch marines without using boarding pods.


Example:

$ship = get player tracking aim
$launch = $ship -> can launch marines
if $launch == 1
|write to player logbook: printf: fmt='%s can launch marines', $ship, null, null, null, null
else
|write to player logbook: printf: fmt='%s cannot launch marines', $ship, null, null, null, null
end
return null

This will get the player's currently selected target and check, if it can launch marines (without boarding pods). In case of succes or failure it will write an appropriate message into the player's logbook.


Note:

In an unmodified game only ships of the classes TP and M6 are able to launch marines (without boarding pods).


Command Location:

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

[TiP][49] 297412

Post by X2-Illuminatus » Mon, 28. Feb 11, 18:04

[skip|else] if [not]|while [not]| <RetVar/IF><RefObj> can launch marines


[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 auf seine Fähigkeit, Marineinfanteristen zum Entern zu schicken, überprüfen möchtest.


Dieser Befehl überprüft, ob das <RefObj> Marineinfanteristen zum Entern losschicken kann ohne Enterkapseln einzusetzen.


Beispiel:

$ship = get player tracking aim
$launch = $ship -> can launch marines
if $launch == 1
|write to player logbook: printf: fmt='%s kann Marineinfanteristen losschicken', $ship, null, null, null, null
else
|write to player logbook: printf: fmt='%s kann Marineinfanteristen nicht losschicken', $ship, null, null, null, null
end
return null

Dieses Beispiel erfässt das momentane Ziel des Spielers und überprüft, ob es Marineinfanteristen losschicken kann (ohne Enterkapseln zu nutzen). Im Erfolgs- oder Fehlerfall wird eine entsprechende Nachricht ins Logbuch geschrieben.


Beachte:

In einem unmodifizierten Spiel sind nur Schiffe der Klassen M6 und TP in der Lage Marineinfanteristen ohne Enterkapseln loszuschicken.


Zu finden unter:

Locked

Return to “MSCI Reference”