#How can i check for a block above a block in a loop

1 messages · Page 1 of 1 (latest)

trim raptor
#

im trying to get the block that is above another block in a loop value

remote goblet
#

You said the line

trim raptor
#
  while {machine::*} contains dispenser:
    wait 2 seconds
    loop {machine::*}:
#      set {_input} to block 1 up of dispenser
#      set {_name1} to name of block 1 up of dispenser
      if name of loop-value is "&6&lOutput":
        wait 1 seconds
        set {_input} to block 1 up
        set {_name1} to name of block 1 up
        broadcast "This works"
        broadcast "%{_input}%"
        if {_name1} is "&9&lInput":
          broadcast "&9Input found"
          broadcast "%{_input}%"```
remote goblet
#

block above {_loc}

trim raptor
#

this is the code i have so far

remote goblet
#

You cant code like that

#

Skript doesnt know what dispenser you mean

trim raptor
#

cant i check for the name

#

of the dispenser

remote goblet
#

Could stringify it

remote goblet
trim raptor
#

inventory name

#

i mean

remote goblet
#

I mean these

#

Skript doesnt know which dispenser block you’re referring to. It doesnt even know theres one there

trim raptor
#

ok so there is no way i can do it

#

?

remote goblet
#

There is, you just have to have a way to refer to the block you mean

#

Like a variable or expression

trim raptor
#

i need to figure that out