Array addon

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!


Nov 18, 2019
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 ^ ^ ^ ^
{LandScapeArray} would equal:

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: