<RetVar> = A variable where the requested information is stored.
This command returns the maximum number of sectors in the y direction.
The sectors on the universe map are arranged in a coordinate system. The point of origin is Kingdom End with the coordinates x = 0, y = 0, short form: (0|0). Starting from Kingdom End the x-coordinates go rightwards and the y-coordinates downwards. So each sector has own coordinates.
Note that this command returns the maximum number of sectors and not the maximum y-coordinate. The return value of this command is '20'. Based on the fact that '0' is a valid coordinate the maximum y-coordinate is '19'.
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
|||$ship = create ship: type=Advanced Satellite owner=Player addto=$sector x=0 y=20000 z=0
||end
||inc $y =
|end
inc $x =
end
return null
This is an easy way to iterate through all existing sectors of the universe. That way you can do or check something in every sector. In this case a player owned Advanced satellite is built in each sector.
Related Commands:
<RetVar> = get max sectors in x direction
Command Location:
- »» Universe and Sector Commands
<RetVar> = get max sectors in y direction