I'm trying to set up a while event that will run for as long a block is being actively broken.
If the player stops mining halfway the while will stop.
One way I thought about going this is by setting a variable when someone starts mining
The problem is that I haven't found an event to test for when they stop mining so I can delete the variable if they don't break the block the whole way.
If the player stops mining halfway the while will stop.
One way I thought about going this is by setting a variable when someone starts mining
Code:
on block damage:
set {breaking::%player%} to true
while {breaking::%player%} is true:
send "You're mining"
wait 5 ticks
on break:
delete {breaking::%player%}
The problem is that I haven't found an event to test for when they stop mining so I can delete the variable if they don't break the block the whole way.