Solved cancel event only for specific blocks with on explode trigger

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

ilovepancake

Member
Sep 1, 2019
2
0
0
26
Hi, I wanted to cancel event on explosion only for grass but cancel event cancel for every blocks.
I tried to remove the block from exploded blocks but that not working without error:

Code:
on explode:
  loop exploded blocks:
    if loop-block is equal to grass block:
      remove loop-block from exploded blocks

It should be possible because the tntwars in cubed craft, when a cannon explode, only the dispensers are exploded
 
Try This:
Code:
on explosion:
    cancel event
    create a safe explosion of force 2 at event-location
    loop exploded blocks:
        if loop-block is not grass or tnt:
            set loop-block to air
        if loop-block is tnt:
            set loop-block to air
            spawn a primed tnt at the loop-block's location
            push last spawned entity direction from event-location to last spawned entity with force 1
 
Last edited:
  • Like
Reactions: ilovepancake
Status
Not open for further replies.