Solved checking above player has a 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.

BrownMee

Active Member
Apr 16, 2018
126
6
18
23
I'm not sure how to check for player is in house or outside a house.. please help
[doublepost=1613663167,1613559889][/doublepost]bump
 
Code:
set {_x} to x-coordinate of location of player
set {_y} to y-coordinate of location of player
set {_z} to z-coordinate of location of player
loop 10 times:
    add 1 to {_y}
    if block at location {_x}, {_y}, {_z} != air:
        add 1 to {_blocks}
if {_blocks} > 0:
    send "There are blocks above the player! He/She may be in a house"
Note: I did not test this, there may be a mistake - but the idea should be right
 
Status
Not open for further replies.