Solved Test if a player is actively mining.

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

Status
Not open for further replies.

Poons

Supporter
Jan 25, 2017
8
2
0
22
Poon Land
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

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.
 
If you've solved this, why don't you put the solution in your post? It may help other people.
 
Status
Not open for further replies.