1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved How I do this?

Discussion in 'Skript' started by Aidanete, Jul 20, 2018.

Thread Status:
Not open for further replies.
  1. Aidanete

    Aidanete Active Member

    Joined:
    Apr 11, 2017
    Messages:
    139
    Likes Received:
    10
    Code (Skript):
    1.         if {_rev} is 72:
    2.             set block at {lnbp::%player%} to diamond block
    3.             set {bstate::%block at %{lnbp::%player%}%%} to true
    4. on break:
    5.     if {bstate::%event-block%} is true:
    6.         strike lightning at {lnbp::%player%}
    7.         wait 3 ticks
    8.         kill the player
    9.         strike lightning at {lnbp::%player%}
    10.         wait 3 ticks
    11.         strike lightning at {lnbp::%player%}
    12.         wait 1 second
    13.         strike lightning at {lnbp::%player%}
    14.         wait 2 seconds
    15.         loop 10 times:
    16.             strike lightning at {lnbp::%player%}
    17.             wait 1 ticks
    18.         wait 2 second
    19.         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!

     
  2. Best Answer:
    Post #4 by ShaneBee, Jul 20, 2018
  3. uGim

    uGim Member

    Joined:
    Jan 19, 2018
    Messages:
    25
    Likes Received:
    0
    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.
     
  4. Aidanete

    Aidanete Active Member

    Joined:
    Apr 11, 2017
    Messages:
    139
    Likes Received:
    10
    Nothing happens when you break the block
     
  5. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    Okay this took me a while to figure it out but I made it work
    Code (Skript):
    1.         set block at {lnbp::%player%} to diamond block
    2.         set {_block} to block at {lnbp::%player%}
    3.         set {bstate::%{_block}%} to true
    4. on break:
    5.     if {bstate::%event-block%} is true:
    6.         strike lightning at {lnbp::%player%}
    7.         wait 3 ticks
    8.         kill the player
    9.         strike lightning at {lnbp::%player%}
    10.         wait 3 ticks
    11.         strike lightning at {lnbp::%player%}
    12.         wait 1 second
    13.         strike lightning at {lnbp::%player%}
    14.         wait 2 seconds
    15.         loop 10 times:
    16.             strike lightning at {lnbp::%player%}
    17.             wait 1 ticks
    18.         wait 2 second
    19.         create an explosion of force 12 at {lnbp::%player%}
     
    • Winner Winner x 1
  6. Aidanete

    Aidanete Active Member

    Joined:
    Apr 11, 2017
    Messages:
    139
    Likes Received:
    10
    Thank you, it worked!
     
Thread Status:
Not open for further replies.

Share This Page

Loading...