Solved Removing Blocks Around Player

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

IViddyy

Member
Apr 17, 2022
17
1
3
Hi im trying to make a command that can be turned on and off and removes blocks in a 5 block radius while on.But i dont know how to remove blocks around the player so can someone help?
 
Hi im trying to make a command that can be turned on and off and removes blocks in a 5 block radius while on.But i dont know how to remove blocks around the player so can someone help?
loop the blocks around the player, and break them, if its a "mode" then make a variable, a boolean (true/false) and every x seconds/ticks check if a player has the variable turned on then break the blocks around him
 
loop the blocks around the player, and break them, if its a "mode" then make a variable, a boolean (true/false) and every x seconds/ticks check if a player has the variable turned on then break the blocks around him
I tend to recommend using metadata for player-specific stuff that doesn't really need to be saved permanently. Also, here's a code version of what was originally asked:
Code:
command /nuker:
  trigger:
    set metadata tag "nuker" of player to true if metadata tag "nuker" of player isn't true else false
    send "Nuker is now %metadata tag "nuker" of player%."

every second:
  loop all players:
    metadata tag "nuker" of loop-player is true
    loop blocks in radius 5 of player:
      set loop-block to air
Hope this helps.
 
  • Like
Reactions: xdh
I tend to recommend using metadata for player-specific stuff that doesn't really need to be saved permanently. Also, here's a code version of what was originally asked:
Code:
command /nuker:
  trigger:
    set metadata tag "nuker" of player to true if metadata tag "nuker" of player isn't true else false
    send "Nuker is now %metadata tag "nuker" of player%."

every second:
  loop all players:
    metadata tag "nuker" of loop-player is true
    loop blocks in radius 5 of player:
      set loop-block to air
Hope this helps.
never knew you could use metadata like that well played!
 
I tend to recommend using metadata for player-specific stuff that doesn't really need to be saved permanently. Also, here's a code version of what was originally asked:
Code:
command /nuker:
  trigger:
    set metadata tag "nuker" of player to true if metadata tag "nuker" of player isn't true else false
    send "Nuker is now %metadata tag "nuker" of player%."

every second:
  loop all players:
    metadata tag "nuker" of loop-player is true
    loop blocks in radius 5 of player:
      set loop-block to air
Hope this helps.

It worked.Thanks!