Solved How do I get location of targeted block without XYZ

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

AndreasLK

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

Code:
command /value [<text>]:
    trigger:
        message "%location of targeted block%"
        set {_target} to location of targeted block
        message "%{_target} parsed as number%"

This is the line i want to execute:
Code:
execute console command "/summon wither %location of loop-block% {Attributes:[{Name:generic.followRange,Base:{@followrange}}]}"
 
This will be used to summon a mob using a console command, but for that i need the location without "X:, Y:, Z:"

Code:
command /value [<text>]:
    trigger:
        message "%location of targeted block%"
        set {_target} to location of targeted block
        message "%{_target} parsed as number%"

This is the line i want to execute:
Code:
execute console command "/summon wither %location of loop-block% {Attributes:[{Name:generic.followRange,Base:{@followrange}}]}"
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:
set {_location} to location of targeted block
set {_x} to {_location}'s x-coord
set {_y} to {_location}'s y-coord
set {_z} to {_location}'s z-coord
 
Status
Not open for further replies.