Setting 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 comminuty!

    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.

deminecrafterlol

New Member
May 17, 2017
6
0
0
33
How do i set a block from a location variable

Like:
code_language.skript:
set location of block to {Block}
set {Block} to tripwire
 
1. That's not how you set a variable to a location, you have to set the variable to the location not the other way around.
2. Just use the block expression to get the block at a specific direction and location.
 
well, i do this:
code_language.skript:
on rightclick:
    if clicked block is tripwire:
        set clicked block to oak plank
        add location of clicked block to {Seige.blocks.relative::*}
And when some thing is done, i do this:
code_language.skript:
set {_index} to 0
        loop {Seige.blocks.relative::*}:
            add 1 to {_index}
            set block {Seige.blocks.relative::%{_index}%} to tripwire
is that good?
 
Last edited:
code_language.skript:
set block at {Seige.blocks.relative::%{_index}%} to tripwire
or
code_language.skript:
set block at loop-value to tripwire
 
  • Like
Reactions: deminecrafterlol
Status
Not open for further replies.