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!
You can always check out our Wiki for downloads and any other information about Skript!
But how to check this in an if statement likeit can be either false or trueCode:oak_door[open=false]
if iron door[open=false] at location(-24.5, 4, -253.5, world):
if target block of player is door:
set {_block} to "%target block of player%"
if {_block} contains "open":
send "[Debug] The door you're looking at is open." to player
else:
send "[Debug] The door you're looking at is closed." to player
if block at location(location) is a door:
set {_block} to event-block
if {_block} contains "open":
do stuff
else:
do other stuff
I just found this on the forums:
Code:if target block of player is door: set {_block} to "%target block of player%" if {_block} contains "open": send "[Debug] The door you're looking at is open." to player else: send "[Debug] The door you're looking at is closed." to player
You could change it to:
Code:if block at location(location) is a door: set {_block} to event-block if {_block} contains "open": do stuff else: do other stuff
command /doorgui:
trigger:
open chest with 3 rows named "&3DOOR GUI" to player
if block at location(-24.5, 4, -253.5, world) is a door:
set {_block1} to event-block
if {_block1} contains "open":
format slot 0 of player with green wool named "&rTest Door" to close then run "door1"
else:
format slot 0 of player with red wool named "&rTest Door" to close then run "door1"
This is not working right now i haveCode:command /doorgui: trigger: open chest with 3 rows named "&3DOOR GUI" to player if block at location(-24.5, 4, -253.5, world) is a door: set {_block1} to event-block if {_block1} contains "open": format slot 0 of player with green wool named "&rTest Door" to close then run "door1" else: format slot 0 of player with red wool named "&rTest Door" to close then run "door1"
It will always show the red wool
Yes i have sorry for the late reactionDo you have SkQuery installed? With the right version? (Matching your Skript version)