# Random Block Placement

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

Tags:
Not open for further replies.
1. ### acktbt Member

Joined:
Sep 12, 2021
Messages:
15
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)

#1
2. ### Minecoll_YT SupporterForums Helper

Joined:
Dec 2, 2018
Messages:
650
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

#2
3. ### acktbt Member

Joined:
Sep 12, 2021
Messages:
15
0
this doesnt seem to work with my skript and how would i put coordinates into this

#3
Last edited: Oct 23, 2021
4. ### Minecoll_YT SupporterForums Helper

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

#4
5. ### acktbt Member

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

#5
6. ### Minecoll_YT SupporterForums Helper

Joined:
Dec 2, 2018
Messages:
650
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

#6
7. ### acktbt Member

Joined:
Sep 12, 2021
Messages:
15
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}:"

#7
Not open for further replies.