Replace block 10 times

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

kamilleon

Member
Nov 18, 2017
48
0
6
24
How do you make a block "respawn" 10 times after breaking?

This is my current code, but it dosen't work:

code_language.skript:
on place of sponge:
  if name of player's tool is "&e&lVan szerencséd?":
    chance of 20%:
      set event-block to diamond block
      on break of diamond block:
        set block to diamond block
        on break of diamond block:
          set event-block to diamond block
          on break of diamond block:
            set event-block to diamond block
 
You can't put events inside of other events. I'm not sure what you're even trying to do there, maybe the formatting didn't transfer well?

What are you meaning '"respawn" 10 times after breaking"? Are you saying they need to break the block ten times for it to actually break? If so, you can just do something like this:

code_language.skript:
on mine:
    add 1 to {mineAttempts::%event-location%}
    if {mineAttempts::%event-location%} < 10:
        cancel event
    else:
        delete {mineAttempts::%event-location%}
 
Status
Not open for further replies.