<RetVar/IF><RefObj> get number of secondary resources

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> get number of secondary resources

Post by X2-Illuminatus » Sat, 2. Apr 11, 16:20

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


[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, it will contain the number of secondary resources used by the <RefObj>.
<RefObj> = The factory you want to know its number of secondary resources of.


Returns the number of secondary resources the <RefObj> uses. Secondary ressources aren't needed to start the production cycle of a factory. A detailed explanation of primary and secondary resources can be found in this FAQ-article.


Example:

$factory = get player tracking aim
$number = $factory -> get number of secondary resources
write to player logbook: printf: fmt='%s has %s secondary resources.', $factory, $number, null, null, null
return null

This writes the amount of secondary ressources of the as target by the player selected factory with a message to the logbook.


Related Commands:

<RetVar/IF><RefObj> get number of resources
<RetVar/IF><RefObj> get number of primary resources


Command Location:

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

[TiP][49] 299238

Post by X2-Illuminatus » Tue, 3. May 11, 18:49

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


[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 die Anzahl an sekundären Ressourcen enthalten, die vom <RefObj> genutzt werden.
<RefObj> = Die Fabrik, deren genutzte Anzahl an Sekundärressourcen du wissen möchtest.


Gibt die Anzahl an sekundären Ressourcen zurück, die von der als <RefObj> ausgewählten Station genutzt werden. Sekundäre Ressourcen werden nicht benötigt, um einen Produktionszyklus zu starten. Eine genaue Erklärung zu primären und sekundären Ressourcen kann diesem FAQ-Artikel entnommen werden.


Beispiel:

$factory = get player tracking aim
$number = $factory -> get number of secondary resources
write to player logbook: printf: fmt='%s hat %s sekundäre Ressourcen.', $factory, $number, null, null, null
return null

Dies schreibt die Anzahl der sekundären Ressourcen, die von der vom Spieler als Ziel erfassten Station genutzt werden, mit einer Nachricht ins Spielerlogbuch.


Verwandte Befehle:

<RetVar/IF><RefObj> get number of resources
<RetVar/IF><RefObj> get number of primary resources


Zu finden unter:

Return to “MSCI Reference”