Solved Problem with chest block variable

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

Jobu

Member
Nov 30, 2024
2
0
1
22
Hi everyone, I want to make sure that when I load the script it will automatically set the {chest.looted} variables for all chests to false. I tried everything. Here is my code -
on load:
loop all blocks:
if loop-block is chest:
if {chest.looted::%loop-block%} is true:
set {chest.looted::%loop-block%} to false

edit: And I want to make sure the chests are cleared.
 
Maybe try this:

on right click:
if event-block is chest:
if {chest.looted::%event-block%} is true:
set {chest.looted::%event-block%}

I didn't test the script, but I think it will work. Reply if you need further help!
 
  • Like
Reactions: Jobu
Maybe try this:

on right click:
if event-block is chest:
if {chest.looted::%event-block%} is true:
set {chest.looted::%event-block%}

I didn't test the script, but I think it will work. Reply if you need further help!
thanks for help!