tnt

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

loadka95

Active Member
Feb 24, 2017
78
6
8
26
If a tnt explode, is there a way to fix the damage what the tnt caused?

I tried with this, but its not fixing every block:

code_language.skript:
on explode:
    loop exploded blocks:
        add location of loop-block to {boom.loc::*}
        add type of loop-block to {boom.type::*}
        set loop-block to air    

command /fix:
    trigger:
        loop {boom.loc::*}:
            set block at loop-value to {boom.type::%loop-index%}
[doublepost=1489682278,1489679309][/doublepost]Edit: Its working if i place down a tnt then ignite it. but if I create and explosion with this
code_language.skript:
create an explosion of force 10 at the player
it doesnt work..
 
what do you mean? Does the create explosion effect throws an error for you or something? Also, for the first thing, I would do it like:
code_language.skript:
on explode:
    loop exploded blocks:
        set {boom::%loop-block's type%} to location of loop-block

command /fix:
    trigger:
        loop {boom::*}:
            set {_block} to loop-index parsed as item
            set block at loop-value to {_block}
 
Status
Not open for further replies.