<RetVar/IF><RefObj> get maximum number of 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: 21588
Joined: Sun, 2. Apr 06, 16:38
x4

<RetVar/IF><RefObj> get maximum number of marines

Post by X2-Illuminatus » Fri, 25. Feb 11, 15:27

[skip|else] if [not]|while [not]| <RetVar/IF><RefObj> get maximum number of marines


[skip|else] if [not]|while [not]| = The possible 'Conditional' statements that can be used with this command.
<RetVar/IF> = The variable, where the requested information is stored.
<RefObj> = The object you want to get the maximum number of marines it can store.


This command will return the maximum number of marines that can be stored on the <RefObj>, assuming it has no marines on board.


Examples:

$ship = get player tracking aim
$number = $ship -> get maximum number of marines
write to player logbook: printf: fmt='%s can store %s marines', $ship, $number, null, null, null
return null

This will get the player's currently selected target and check, how many marines can be stored on it.

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

$ship = get player tracking aim
$number = $ship -> get maximum number of marines
$space = $ship -> free space for marines
$number.marines = $number - $space
write to player logbook: printf: fmt='%s has %s marines on board', $ship, $number.marines, null, null, null
return null

This will get the marines, who are onboard the player's target and write the result to the player's logbook.


Related Commands:

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


Command Location:

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

[TiP][49] 297417

Post by X2-Illuminatus » Mon, 28. Feb 11, 19:54

[skip|else] if [not]|while [not]| <RetVar/IF><RefObj> get maximum number of marines


[skip|else] if [not]|while [not]| = Die möglichen bedingten Anweisungen, die mit diesem Befehl genutzt werden können.
<RetVar/IF> = Die Variable, in der die geforderte Information gespeichert wird.
<RefObj> = Das Objekt, von dem du wissen möchtest, wie viele Marineinfanteristen es höchstens aufnehmen kann.


Dieser Befehl gibt die größtmögliche Anzahl an Marineinfanteristen zurück, die vom <RefObj> aufgenommen werden kann, davon ausgehend, dass noch keine Infanteristen an Bord sind.


Beispiele:

$ship = get player tracking aim
$number = $ship -> get maximum number of marines
write to player logbook: printf: fmt='%s kann %s Marineinateristen aufnehmen', $ship, $number, null, null, null
return null

Dieses Beispiel erfasst das momentane Ziel des Spielers und überprüft, wie viele Marineinfanteristen es aufnehmen kann.

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

$ship = get player tracking aim
$number = $ship -> get maximum number of marines
$space = $ship -> free space for marines
$number.marines = $number - $space
write to player logbook: printf: fmt='%s hat %s Marineinfanteristen an Bord', $ship, $number.marines, null, null, null
return null

Dieses Beispiel ermittelt die Anzahl an Marinenfanteristen auf dem Ziel des Spielers und schreibt sie in das Logbuch.


Verwandte Befehle:

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


Zu finden unter:

Locked

Return to “MSCI Reference”