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.

Random Block Placement

Discussion in 'Skript' started by acktbt, Oct 23, 2021.

Thread Status:
Not open for further replies.
  1. acktbt

    acktbt Member

    Joined:
    Sep 12, 2021
    Messages:
    15
    Likes Received:
    0
    Hello. I am trying to place a cuboid with random blocks inside it (lets say cobblestone and stone) but i cannot figure out how to do it. I have tried some things but skript can't understand it so i'm trying to get help here. Please try and help as i've been trying for so long now and i've posted this problem on multiple different websites but no one gives a response. Thanks for any help! (BTW worldedit does not do the thing i want i want to do this inside a skript)
     
  2. Minecoll_YT

    Supporter Forums Helper

    Joined:
    Dec 2, 2018
    Messages:
    650
    Likes Received:
    39
    Code (Text):
    1. loop blocks within {_x} to {_x}:
    2.     set loop-block to stone
    3.     chance of 30%:
    4.         set loop-block to cobblestone
     
  3. acktbt

    acktbt Member

    Joined:
    Sep 12, 2021
    Messages:
    15
    Likes Received:
    0
    this doesnt seem to work with my skript and how would i put coordinates into this
     
    #3 acktbt, Oct 23, 2021
    Last edited: Oct 23, 2021
  4. Minecoll_YT

    Supporter Forums Helper

    Joined:
    Dec 2, 2018
    Messages:
    650
    Likes Received:
    39
    its literally just vanilla skript and just exchange it with the local variables
     
  5. acktbt

    acktbt Member

    Joined:
    Sep 12, 2021
    Messages:
    15
    Likes Received:
    0
    im sorry can you please explain further because it sounds like i tried what your saying but for me its not working
     
  6. Minecoll_YT

    Supporter Forums Helper

    Joined:
    Dec 2, 2018
    Messages:
    650
    Likes Received:
    39
    I think this would be the simplest way for beginners
    Code (Text):
    1. set {_loc::1} to location at 1, 1, 1 in world "xxx"
    2. set {_loc::2} to location at 1, 1, 1 in world "xxx"
    3. loop blocks within {_loc::1} to {_loc::2}:
    4.     set loop-block to stone
    5.     chance of 30%:
    6.         set loop-block to cobblestone
     
  7. acktbt

    acktbt Member

    Joined:
    Sep 12, 2021
    Messages:
    15
    Likes Received:
    0
    it seems all good except skript is still returning saying it does not understand the loop "loop blocks within {_loc::1} to {_loc::2}:"
     
Thread Status:
Not open for further replies.

Share This Page

Loading...