How to make tnt only explode blocks from a list

  • 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.
Jun 11, 2020
14
0
1
56
Hello,
I am trying to make a simple bedwars script, but I would like to only be able to explode blocks from a list called "{blockplaced::*}". Everything except the tnt is working. This is what I have coded so far, but the tnt explodes ALL blocks:
Code:
on explode:
  loop exploded blocks:
    if loop-value-1 is any bed:
      cancel the event
      set block at loop-block to loop-block
      uncancel the event
    else:
      loop {blockplaced::*}:
        if location of loop-value-1 is loop-value-2:
          continue
        else:
          cancel the event
          set block at loop-block-1 to loop-block-1
          uncancel the event

If you know how this is wrong, please comment below ☺


Information:
Skript version: 2.5-beta2
Server version: git-Paper-133 (MC: 1.16.1)
Skript addons: <none> (yet) (EDIT 1: Added SkRayFall)
 
Last edited:
Maybe not a particularly efficient implementation but it's what I could come up with quickly
Code:
on explode:
    cancel event
    loop exploded blocks where [{blockplaced::*} contains input]:
        break block at loop-value's location
 
Maybe not a particularly efficient implementation but it's what I could come up with quickly
Code:
on explode:
    cancel event
    loop exploded blocks where [{blockplaced::*} contains input]:
        break block at loop-value's location
It did not work. Nothing broke.
 
Status
Not open for further replies.