<RetVar/IF><RefObj> is boardable

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

Moderators: Scripting / Modding Moderators, MSCI Moderators

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

<RetVar/IF><RefObj> is boardable

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

[skip|else] if [not]|while [not]| <RetVar/IF><RefObj> is ship boardable


[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 is boardable.


This command will check, if the <RefObj> can be boarded by marines.


Example:

$ship = get player tracking aim
$board = $ship -> is boardable
if $board == 1
|write to player logbook: printf: fmt='%s is boardable', $ship, null, null, null, null
else
|write to player logbook: printf: fmt='%s is not boardable', $ship, null, null, null, null
end
return null

This will get the player's currently selected target and check, if it can be boarded by marines. In case of succes or failure it will write an appropriate message into the player's logbook.


Note:

In an unmodified game ships of the classes TM, TL, M1, M2, M6 and M7 can be boarded by marines.


Command Location:

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

[TiP][49] 297413

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

[skip|else] if [not]|while [not]| <RetVar/IF><RefObj> is ship boardable


[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, von dem du wissen möchtest, ob es durch Marineinfanteristen geentert werden kann.

Dieser Befehl überprüft, ob das <RefObj> durch Marineinfanteristen geentert werden kann.


Example:

$ship = get player tracking aim
$board = $ship -> is boardable
if $board == 1
|write to player logbook: printf: fmt='%s kann geentert werden', $ship, null, null, null, null
else
|write to player logbook: printf: fmt='%s kann nicht geentert werden', $ship, null, null, null, null
end
return null

Dieses Beispiel erfasst das momentane Ziel des Spielers und überprüft, ob es durch Marineinfanteristen geentert werden kann. Im Erfolgs- oder Fehlerfall wird eine entsprechende Nachricht ins Logbuch geschrieben.


Beachte:

Im unmodifizierten Spiel können Schiffe der Klassen TM, TL, M1, M2, M6 und M7 durch Marineinfanteristen geentert werden.


Zu finden unter:

Return to “MSCI Reference”