Discord Thread How can i make it so it only sends the command once?

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

This thread came from the skUnity Discord. You can't reply to it here but if you join the skUnity Discord, you'll be able to post a reply there. The thread link is part of the thread's message.
Status
Not open for further replies.

skUnity Discord

Site Manager
Aug 5, 2023
12,755
1
0
The skUnity Discord
discord.gg
Here is my code
on load:
set {_regionName} to "bottomtnt"

every 2 seconds in world "world":
if blocks in region {_regionName} are air:
execute console command "/say The region is now empty!"
else:
execute console command "/say The region is filled with blocks!"

How can I make it so it only sends the command once and then starts checking again?

Posted by: tannerbenn from the skUnity Discord. View the thread on skUnity Discord here
 
on load:
set {_regionName} to "bottomtnt"
set {empty} to true

every 2 seconds in world "world":
if blocks in region {_regionName} are air:
if {empty} is false:
execute console command "/say The region is now empty!"
set {empty} to true
else:
if {empty} is true:
execute console command "/say The region is filled with blocks!"
set {empty} to false
this is what i have so far but it just seems to send "/say The region is filled with blocks!" and doesnt do anything else when the region is filled back up or completly empty

Posted by: tannerbenn from the skUnity Discord.
 
Status
Not open for further replies.