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.

Solved How do I get location of targeted block without XYZ

Discussion in 'Skript' started by AndreasLK, May 4, 2020.

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

    AndreasLK Member

    Joined:
    Mar 12, 2020
    Messages:
    16
    Likes Received:
    0
    This will be used to summon a mob using a console command, but for that i need the location without "X:, Y:, Z:"

    Code (Text):
    1. command /value [<text>]:
    2.     trigger:
    3.         message "%location of targeted block%"
    4.         set {_target} to location of targeted block
    5.         message "%{_target} parsed as number%"
    This is the line i want to execute:
    Code (Text):
    1. execute console command "/summon wither %location of loop-block% {Attributes:[{Name:generic.followRange,Base:{@followrange}}]}"
     
  2. Abdera7mane

    Abdera7mane Active Member

    Joined:
    Aug 18, 2019
    Messages:
    56
    Likes Received:
    7
    why using console commands ? you can summon an entity using skript effects, if you want to edit the nbt tags get SkBee addon.
    if you still want the answer of how to get the coordinates values from a location you can do this:
    Code (Text):
    1.  
    2. set {_location} to location of targeted block
    3. set {_x} to {_location}'s x-coord
    4. set {_y} to {_location}'s y-coord
    5. set {_z} to {_location}'s z-coord
    6.  
     
Thread Status:
Not open for further replies.

Share This Page

Loading...