Solved Checking for block below or above?

  • 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 community!

    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.

Idiosyncratic

Member
Feb 21, 2017
62
0
0
USA
Creating a right click for a block, but only if above a certain type of block/a certain type of block is below it. I've tried a few things and still nothing, just need a little help here.
 
Do you mean on placing a block, but only on a certain block type? If so this may help. If not could you clarify or post your code?
code_language.skript:
on place of grass:
    if event-block is not obsidian:
        cancel event
 
code_language.skript:
on rightclick on grass:
    if block above event-block is diamond block:
#STUFF
    if block below event-block is emerald block:
#STUFF
 
I did word that a little funny, didn't I? Either way, it does help me, and same to you @YoshYz. Thanks to you both!
 
Status
Not open for further replies.