[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 '1' if the <Value> has been discovered and '0' if it hasn't.
<Value> = An object that exists in the game. Valid values are ships and stations (as well as their types), sectors and wares.
This command will check, if the as <Value> selected object has been discovered by the player. Whereby discovered mean that the object had to be in the scanner range of one of the player's assets.
Example:
$sector=[PLAYERSHIP] -> get sector
$station.arr=$sector -> get station array from sector
$size= size of array $station.arr
while $size
|dec $size=
|$station=$station.arr[$size]
|if not has $station been discovered
||$index= get index of $station in array $station.arr offset=-1 + 1
||remove element from array $station.arr at index $index
|end
end
return null
This will get all already discovered stations in the current player sector and save them in the $station.arr array.
Related Commands:
set discovered status: type=<Value> status=<Var/Boolean>
Command Location:
- »» Universe and Sector Commands
<RetVar/IF> has <Value> been discovered