<RetVar/IF><RefObj> is known

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

Moderators: Scripting / Modding Moderators, MSCI Moderators

mark_a_condren
Posts: 1468
Joined: Wed, 3. Aug 05, 05:05
x3tc

<RetVar/IF><RefObj> is known

Post by mark_a_condren » Wed, 23. Feb 11, 10:43

[skip|else] if [not]|while [not]| <RetVar/IF> = <RefObj> is known


[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 [TRUE] or [FALSE].
<RefObj> = The object you wish to check the known status of.


Objects become known if they have come within scanner range of any of the players assets.


Example:

$sector = [THIS] -> get user input: type= Sector, title='Choose a sector'

$station.array = $sector -> get station array from sector
$display.array = array alloc size: 0
$station.array.count = size of array: $station.array
$counter = 0
while $counter < $station.array.count
| $station = $station.array [$counter]
| skip if not $station -> is known
| | append $station to array: $display.array
| inc $counter
end

$ret = open custom menu: title= 'Known Stations in Sector' description= null option array= $display.array

This will get the stations from a selected $sector, and if they are known to the player they will be appended to the array that is to be displayed, then that array will be displayed in the opened menu.


Command Location:

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

[TiP][49] 297306

Post by X2-Illuminatus » Sat, 26. Mar 11, 17:37

[skip|else] if [not]|while [not]| <RetVar/IF> = <RefObj> is known


[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 entweder [TRUE] (wahr) oder [FALSE] (falsch) enthalten.
<RefObj> = Das Objekt, von dem du Wissen möchtest, ob es bekannt ist.


Objekte werden bekannt, sobald sie in die Scannerreichweite vom Spielerbesitz gelangen.


Beispiel:

$sector = [THIS] -> get user input: type= Sector, title='Wähle Sektor'

$station.array = $sector -> get station array from sector
$display.array = array alloc size: 0
$station.array.count = size of array: $station.array
$counter = 0
while $counter < $station.array.count
| $station = $station.array [$counter]
| skip if not $station -> is known
| | append $station to array: $display.array
| inc $counter
end

$ret = open custom menu: title= 'Bekannte Stationen im Sektor' description= null option array= $display.array

Dies fasst alle Stationen aus dem ausgewählten $sector in einem Array zusammen. Sind die Stationen bekannt, so werden sie an ein weiteres Array angehangen, das abschließend in einem Menü angezeigt wird.


Zu finden unter:

Return to “MSCI Reference”