Solved Help with manipulating the y level

  • 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.

Carter

Member
Aug 18, 2017
10
0
0
So im trying to make a skript that when you place a bucket with has a custom name and lore it will replace the lava with cobblestone and start placing cobblestone all the way down to bedrock. Here is my current code that i have.
code_language.skript:
on place of lava:
    set block to cobblestone
    while block below is air:
        wait 20 ticks
        set block below to cobble

So what happens is it places the initial cobblestone then it places one under as well. Im wondering how i would make it so it will subtract from the y level and then run the while loop on the new block that was placed
 
code_language.skript:
on place of lava:
    set block to cobblestone
    set {_loc} to location at block
    while block below {_loc} is air:
        wait 20 ticks
        set block below {_loc} to cobble
        set {_loc} to location below {_loc}

Something like this may work.
 
code_language.skript:
on place of lava:
    set block to cobblestone
    set {_loc} to location at block
    while block below {_loc} is air:
        wait 20 ticks
        set block below {_loc} to cobble
        set {_loc} to location below {_loc}

Something like this may work.
thanks this worked. Also is there a way to see the item stack of a block that is placed?
 
You mean like this?
code_language.skript:
if player has 5 cobblestone:
kind of but i mean like the lava bucket has to have a certain name and when placed it will do this feature that you just helped me with
 
code_language.skript:
if name of player's held item is "Lava":
Please use the SkUnity docs because it provides the information you need.
 
Status
Not open for further replies.