1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Trying to set blocks in an area between 2 points

Discussion in 'Skript' started by Natalciuu, Oct 14, 2021 at 2:24 AM.

Tags:
  1. Natalciuu

    Natalciuu Member

    Joined:
    Nov 12, 2020
    Messages:
    13
    Likes Received:
    0
    Im trying to build a prison skript from the ground up and ive run into an issue with reseting the mines. I cannot get them to set the blocks in the entire area. It creates a line of blocks inbetween instead of making it fill the entire area.

    My Code for it:
    Code (Text):
    1. every 10 seconds in world "Prison":
    2.     loop {mines.name::*}:
    3.         loop all blocks from {minespos1.%loop-value%} to {minespos2.%loop-value%}:
    4.             set {_block} to random element of {mines::%loop-value-1%::panel::*}
    5.             set block at loop-block to {_block}
     
  2. oToghty

    VIP Supporter +

    Joined:
    Sep 1, 2020
    Messages:
    95
    Likes Received:
    3
    Code (Text):
    1. set all blocks within {} and {} to random element out of {}
     
  3. Natalciuu

    Natalciuu Member

    Joined:
    Nov 12, 2020
    Messages:
    13
    Likes Received:
    0
    This doesn't work for what I need. I need it to set every block in the area randomly, and if possible a way to set the chance of it
     
  4. Minecoll_YT

    Supporter Forums Helper

    Joined:
    Dec 2, 2018
    Messages:
    567
    Likes Received:
    36
    Code (Text):
    1. loop blocks within {_x} to {_x}:
    2.     set loop-block to stone
    3.     chance of 0.4%:
    4.         set loop-block to emerald ore
     

Share This Page

Loading...