Setting an area with a block

  • 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 community!

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

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.
just loop 2 wihin locations. and then make with a Chance, set block at loop-block to iron ore and stuff...
 
Just as ChisleLP says:3, but just to expand on it a bit more, you could do something like this:
code_language.skript:
loop blocks within {pos1} to {pos2}:
    set loop-block to a random element out of {list_of_blocks::*}

You'd need to set the pos1 and pos2 variables of course and create the list. The first line is Skquery:
http://puu.sh/wRqTa/61e64acfaa.png
 
Last edited by a moderator:
Just as ChisleLP says:3, but just to expand on it a bit more, you could do something like this:
code_language.skript:
loop blocks within {pos1} to {pos2}:
    set loop-block to a random element out of {list_of_blocks::*}

You'd need to set the pos1 and pos2 variables of course and create the list. The first line is Skquery:
http://puu.sh/wRqTa/61e64acfaa.png
Should'nt this
"set block at loop-block to random element out of {...\"
 
Should'nt this
"set block at loop-block to random element out of {...\"
it may work either way. Skript often has multiple syntaxes for the same thing. But I'm also not able to test it right now.
 
it may work either way. Skript often has multiple syntaxes for the same thing. But I'm also not able to test it right now.

It works well without state the location in this way , the output is already the location.
 
Just as ChisleLP says:3, but just to expand on it a bit more, you could do something like this:
code_language.skript:
loop blocks within {pos1} to {pos2}:
    set loop-block to a random element out of {list_of_blocks::*}

You'd need to set the pos1 and pos2 variables of course and create the list. The first line is Skquery:
http://puu.sh/wRqTa/61e64acfaa.png
This helps but what if I have 3 blocks I want and I want them all randomly throughout that area so it would be a mix of those three blocks, how would I so that, would it be
code_language.skript:
loop blocks within {pos1} to {pos2}:
   set loop-block to a random order out of {list_of_blocks::*}
 
Status
Not open for further replies.