<RefObj> set sector to core security <Var/Boolean>

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

<RefObj> set sector to core security <Var/Boolean>

Post by X2-Illuminatus » Thu, 4. Aug 11, 18:35

<RefObj> set sector to core security <Var/Boolean>


<RefObj> = A variable containing a sector.
<Var/Boolean> = A TRUE or FALSE value or its representing number 1 or 0.


This set's the sector security class of the as <RefObj> selected sector to core if <Var/Boolean> = [TRUE] or to border if <Var/Boolean> = [FALSE].

The sector security class determines the rank the player needs to enter that sector and to dock to stations in it. The player need a higher rank to enter core than border sectors. All race sectors are either core or border sectors. Unknown sectors have no security class.


Example:

$max.x = get max sectors in x direction
$max.y = get max sectors in y direction
$x = 0
while $x < $max.x
|$y = 0
|while $y < $max.y
||$sector = get sector from universe index: x=$x, y=$y
||if $sector -> exists
|||if not $sector -> is core sector
||||$sector -> set sector to core security [TRUE]
|||end
||end
||inc $y =
|end
|inc $x =
end
return null

This will check every sector in the universe. If a sector is not a core (= border) sector the sector security class will be changed to core.


Related Commands:

<RetVar/IF><RefObj> is core sector


Command Location:

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

[TiP][49] 305331

Post by X2-Illuminatus » Mon, 3. Oct 11, 22:31

<RefObj> set sector to core security <Var/Boolean>


<RefObj> = Eine Variable, die einen Sektor enthält.
<Var/Boolean> = Ein TRUE (wahr) oder FALSE (falsch) Wert oder seine entsprechende Ziffer 1 oder 0.


Dies ändert die Sicherheitszone des als <RefObj> ausgewählten Sektors zum Kernsektor, wenn <Var/Boolean> = [TRUE] oder zum Grenzsektor wenn <Var/Boolean> = [FALSE].

Die Sicherheitszone eines Sektors bestimmt den Rang, den der Spieler benötigt, um diesen Sektor zu betreten und an Stationen anzudocken. Um Kernsektoren zu betreten, benötigt der Spieler einen höheren Rang als für Grenzsektoren. Alle Völkersektoren sind entweder Kern- oder Grenzsektoren. Unbekannte Sektoren gehören keiner Sicherheitszone an.


Beispiel:

$max.x = get max sectors in x direction
$max.y = get max sectors in y direction
$x = 0
while $x < $max.x
|$y = 0
|while $y < $max.y
||$sector = get sector from universe index: x=$x, y=$y
||if $sector -> exists
|||if not $sector -> is core sector
||||$sector -> set sector to core security [TRUE]
|||end
||end
||inc $y =
|end
|inc $x =
end
return null

Dies überprüft jeden Sektor im Universum und ändert die Sicherheitszone eines Sektors zum Kernsektor, für den Fall, dass es ein Grenzsektor ist.


Related Commands:

<RetVar/IF><RefObj> is core sector


Command Location:

Locked

Return to “MSCI Reference”