To be honest, there might already be an add on to this, but I haven't seen one so far, and either way, this will make thing easier in general. If you could make an add on maybe called skVar, skINT, or skArray, and it will add more features to metadata, variables/integers, and will add arrays. This could be useful for mapping out a landscape for scattering people in some sort of map like UHC. I could use it like this:
set {LandScapeArray} to y elevation of blocks between 12, 10 and 24, 15 ^ ^ ^ ^
X Z X Z
{LandScapeArray} would equal:
[0,0,0,0,0,1,2,2,2,1,0,0],
[0,0,0,0,X,1,2,2,2,1,0,0],
[0,0,0,0,0,1,2,2,1,1,0,0],
[0,0,X,0,0,0,1,1,1,1,0,0],
[0,0,0,0,0,0,0,0,0,1,0,X]
X = teleport location for random player
0-2 = y/height elevation
You can calculate what block is at x and z, but having to make a loop to find the y is too much work that would be unneeded. It is like using skQuery and Skript to make a gui without TuSke. Pretty unnecessarily hard.
AND the way you could find a location for X would be:
loop all players in world "UHCLobby":
set {_RandomNumber} to %Random integer in between 0 and number of {_LandScapeArray}'s values%
#set <array> <array position> to <value of array position change>
set {_NumberAndPos} to {LandScapeArray} {_RandomNumber}
set {LandScapeArray} {_RandomNumber} to "X"
if {LandScapeArray} {_RandomNumber} had no change:
set {_RandomNumber} to %Random integer in between 0 and number of {_LandScapeArray}'s values%
set {_NumberAndPos} to {LandScapeArray} {_RandomNumber}
set {LandScapeArray} {_RandomNumber} to "X"
wait 3 ticks
teleport event-player to {_NumberAndPos}
Sorry if this is influenced by java a lot, I love to program in most languages.
set {LandScapeArray} to y elevation of blocks between 12, 10 and 24, 15 ^ ^ ^ ^
X Z X Z
{LandScapeArray} would equal:
[0,0,0,0,0,1,2,2,2,1,0,0],
[0,0,0,0,X,1,2,2,2,1,0,0],
[0,0,0,0,0,1,2,2,1,1,0,0],
[0,0,X,0,0,0,1,1,1,1,0,0],
[0,0,0,0,0,0,0,0,0,1,0,X]
X = teleport location for random player
0-2 = y/height elevation
You can calculate what block is at x and z, but having to make a loop to find the y is too much work that would be unneeded. It is like using skQuery and Skript to make a gui without TuSke. Pretty unnecessarily hard.
AND the way you could find a location for X would be:
loop all players in world "UHCLobby":
set {_RandomNumber} to %Random integer in between 0 and number of {_LandScapeArray}'s values%
#set <array> <array position> to <value of array position change>
set {_NumberAndPos} to {LandScapeArray} {_RandomNumber}
set {LandScapeArray} {_RandomNumber} to "X"
if {LandScapeArray} {_RandomNumber} had no change:
set {_RandomNumber} to %Random integer in between 0 and number of {_LandScapeArray}'s values%
set {_NumberAndPos} to {LandScapeArray} {_RandomNumber}
set {LandScapeArray} {_RandomNumber} to "X"
wait 3 ticks
teleport event-player to {_NumberAndPos}
Sorry if this is influenced by java a lot, I love to program in most languages.
Last edited: