<RetVar/IF><RefObj> get marine fighting skill

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

<RetVar/IF><RefObj> get marine fighting skill

Post by X2-Illuminatus » Sat, 5. Feb 11, 16:45

[skip|else] if [not]|while [not]| <RetVar/IF><RefObj> get marine fighting skill


[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 marine you want to get the fighthing skill of.

Returns the fighting skill of the as <RefObj> selected marine.


Example:

$i = 0
$marines.arr = [PLAYERSHIP] -> get marines array
$size.marine = size of array $marines.arr
while $i < $size.marine
|$marine = $marines.arr[$i]
|$marine.fight.skill = $marine -> get marine fighting skill
|write to player logbook: printf: fmt='Marine Name: %s, fighting skill: %s', $marine, $marine.fight.skill, null, null, null
|inc $i =
end
return null

This will get the marines onboard the [PLAYERSHIP]. Afterwards it gets each marine's fighting skill and write it with his name to the logbook.

Note:

In the vanilla game the valid return range is between 1 to 100 inclusive.


Related Commands:

<RetVar/IF><RefObj> get marine mechanical skill
<RetVar/IF><RefObj> get marine hacking skill
<RetVar/IF><RefObj> get marine engineering skill
<RetVar/IF><RefObj> get marine overall skill


Command Location:
Last edited by X2-Illuminatus on Tue, 22. Feb 11, 14:46, edited 1 time in total.

Alex Vanderbilt
Winner X3 Sektorquest
Posts: 2119
Joined: Thu, 4. May 06, 12:07
x3tc

[TiP][49] 296301

Post by Alex Vanderbilt » Sun, 6. Feb 11, 12:38

[skip|else] if [not]|while [not]| <RetVar/IF><RefObj> get marine fighting skill

[skip|else] if [not]|while [not]| = Mögliche Bedingung, die mit diesem Kommando verwendet werden kann.
<RetVar/IF> = Die Variable, in der die angeforderten Informationen gespeichert werden.
<RefObj> = Der Marineinfanterist, von dem die Kampf-Fähigkeiten abgefragt werden sollen.

Das Kommando gibt die Kampf-Fähigkeiten des als <RefObj> ausgewählten Marineinfanteristen zurück.


Beispiel:

$i = 0
$marines.arr = [PLAYERSHIP] -> get marines array
$size.marine = size of array $marines.arr
while $i < $size.marine
|$marine = $marines.arr[$i]
|$marine.fight.skill = $marine -> get marine fighting skill
|write to player logbook: printf: fmt='Marine Name: %s, fighting skill: %s', $marine, $marine.fight.skill, null, null, null
|inc $i =
end
return null

Mit diesen Zeilen werden die Marineinfanteristen an Bord des [PLAYERSHIP] erfasst. Nach der Erfassung werden die Kampf-Fähigkeiten jedes einzelnen Marineinfanteristen abgefragt und danach mit dem jeweiligen Namen in das Spielerlogbuch geschrieben.

Hinweis:

Im Standardspiel ohne Modifikationen reicht die Skala von 1 bis einschließlich 100.


Verwandte Kommandos:

<RetVar/IF><RefObj> get marine mechanical skill
<RetVar/IF><RefObj> get marine hacking skill
<RetVar/IF><RefObj> get marine engineering skill
<RetVar/IF><RefObj> get marine overall skill


Zu finden unter:

Locked

Return to “MSCI Reference”