Solved How I do this?

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

Aidanete

Active Member
Apr 11, 2017
139
10
0
code_language.skript:
        if {_rev} is 72:
            set block at {lnbp::%player%} to diamond block
            set {bstate::%block at %{lnbp::%player%}%%} to true
on break:
    if {bstate::%event-block%} is true:
        strike lightning at {lnbp::%player%}
        wait 3 ticks
        kill the player
        strike lightning at {lnbp::%player%}
        wait 3 ticks
        strike lightning at {lnbp::%player%}
        wait 1 second
        strike lightning at {lnbp::%player%}
        wait 2 seconds
        loop 10 times:
            strike lightning at {lnbp::%player%}
            wait 1 ticks
        wait 2 second
        create an explosion of force 12 at {lnbp::%player%}

This code should create a diamond block with an special paramter, if you break it you will die with all those lightnings and explosions, this might only ocurr when breaking a diamond block spawned by a random probability when breaking a noteblock. The problem is that the diamond block that the noteblock creates don't do those effects, please help!
 
So the lighting doesn't work or overall nothing happens when you break the block? I think you should check if {bstate::%event-block%} really is true. Else it won't happen. I tried the skript on my localhost and it did works so the variable values aren't right.
 
Okay this took me a while to figure it out but I made it work
code_language.skript:
        set block at {lnbp::%player%} to diamond block
        set {_block} to block at {lnbp::%player%}
        set {bstate::%{_block}%} to true
on break:
    if {bstate::%event-block%} is true:
        strike lightning at {lnbp::%player%}
        wait 3 ticks
        kill the player
        strike lightning at {lnbp::%player%}
        wait 3 ticks
        strike lightning at {lnbp::%player%}
        wait 1 second
        strike lightning at {lnbp::%player%}
        wait 2 seconds
        loop 10 times:
            strike lightning at {lnbp::%player%}
            wait 1 ticks
        wait 2 second
        create an explosion of force 12 at {lnbp::%player%}
 
Status
Not open for further replies.