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

Solved How do i set a variable to a block at a certian locaction

Discussion in 'Skript' started by Bonnie20402, Feb 19, 2019.

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

    Bonnie20402 Member

    Joined:
    Feb 19, 2019
    Messages:
    8
    Likes Received:
    0
    This is what i mean
    Is it possible to set a variable to a block at a locaction

    example

    a pumpkin is placed at 30 30 30
    i want to do
    set pumpkinlocaction to coord
    set pumpkinblokc to pumpkin block at 30 30 30

    but idk how
    i've searched the documentation but dinin't found anything
    sorry for any spelling errors
    thanks in advance!

     
  2. Best Answer:
    Post #4 by Lego_freak1999, Feb 19, 2019
  3. Lego_freak1999

    Lego_freak1999 Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    366
    Likes Received:
    19

    Code (Text):
    1. set {_block} to block at location at 0, 0, 0 in world "world"
     
    • Like Like x 1
  4. Bonnie20402

    Bonnie20402 Member

    Joined:
    Feb 19, 2019
    Messages:
    8
    Likes Received:
    0
    I can't deleteit, i tried:
    Code (Text):
    1. command /asd:
    2.     trigger:
    3.         set {_LDoor} to block at location at 1690, 5, -1413 in world "fnaf"
    4. command /asdf11:
    5.     trigger:
    6.         delete {_LDoor}
     
  5. Lego_freak1999

    Lego_freak1999 Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    366
    Likes Received:
    19
    2 mistakes are made here. 1 {_ldoor} is a temperory variable. 2 delete won't delete the block but will delete the variable
     
    • Like Like x 1
  6. Bonnie20402

    Bonnie20402 Member

    Joined:
    Feb 19, 2019
    Messages:
    8
    Likes Received:
    0
    So how can i make it to delete the block?
    --- Double Post Merged, Feb 19, 2019, Original Post Date: Feb 19, 2019 ---
    nevermind, just solved it by forcing the console to do setblock 1690 5 -1414 air instead lol
    ty for the help anyways
     
Thread Status:
Not open for further replies.
Loading...