on click on exact location

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

Drakem

Member
Apr 29, 2022
10
0
1
31
I cant make this work, please help
Code:
on rightclick on a trapped chest:
       set {_location} to location of event-block 
       message "&3%{_location}%" to console #debug
       if {_location} is location(-124.5, -33.5, 25.5, world "world", -90, -0)
:                 message "&Hello" to player

event-block location (debug from the console):
x: -124.5, y: -33.5, z: 25.5, yaw: -90, pitch: -0 in 'world'
 
make sure it's the exact same place

Code:
on rightclick on a trapped chest:
    set {_loc} to location of event-block
    if "%{_loc}%" = "x: -124.5, y: -33.5, z: 25.5, yaw: -90, pitch: -0 in 'world'":
        send "hey" to player
 
Status
Not open for further replies.