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.

Despawn Falling blocks when they hit the ground

Discussion in 'Skript' started by Melody, Mar 7, 2021.

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

    Melody Member

    Joined:
    Jan 19, 2021
    Messages:
    17
    Likes Received:
    1
    I was trying to make a fake explosion script which throws some falling blocks around to make it better but is there anyway I can despawn the falling blocks?
     
  2. Goose

    Supporter

    Joined:
    Nov 23, 2019
    Messages:
    429
    Likes Received:
    30
    You can use the falling block land event to know when the blocks land, and you can then delete the blocks when they do.
    Code (Text):
    1. on falling block land:
    2.     set event-block to air
    3. # note this deletes ALL falling blocks, not just the ones from the explosion
     
  3. Melody

    Melody Member

    Joined:
    Jan 19, 2021
    Messages:
    17
    Likes Received:
    1
    Mmm works but another thing is I tried to replace the loop-blocks around the player but it seems to make ghost blocks any solutions?
     
  4. Goose

    Supporter

    Joined:
    Nov 23, 2019
    Messages:
    429
    Likes Received:
    30
    Can I see the code you're using?
     
  5. Melody

    Melody Member

    Joined:
    Jan 19, 2021
    Messages:
    17
    Likes Received:
    1
    Actually I just realized it does not work at all! when I spawn the falling blocks It just turns them into bedrock

    on right click:
    if player's tool is tnt:
    if uncolored name of the tool of player is "Explosive":
    if {totalmana.%player%} >= 100:
    if {cooldown.hyperion.%player%} is false:
    set {cooldown.hyperion.%player%} to true
    send "&aItem Ability &6Explosive &b-100 Mana"
    remove 100 from {totalmana.%player%}
    set {_damage} to 2 * (1 + ({manapoolcap.%player%} / 100) * 0.2)
    loop blocks in radius 5 around player:
    spawn falling block of loop-block at loop-block
    set loop-block to bedrock
    push last spawned falling block up with force 1
    push last spawned falling block forwards with force 5

    chance of 40%:
    create a fake explosion at {_block}

    loop all entities in radius 5 around the player:
    if loop-entity isn't a player:
    damage loop-entity by {_damage}
    wait 5 ticks
    set {cooldown.hyperion.%player%} to false
    else:
    send "&cYou dont have enough mana to use this ability"
    --- Double Post Merged, Mar 9, 2021, Original Post Date: Mar 8, 2021 ---
    boop?
    --- Double Post Merged, Mar 10, 2021 ---
    Someone help please!
     
  6. couger44

    Supporter

    Joined:
    Feb 19, 2017
    Messages:
    714
    Likes Received:
    31
    Please, read your code:


    upload_2021-3-10_15-56-10.png
     
  7. Melody

    Melody Member

    Joined:
    Jan 19, 2021
    Messages:
    17
    Likes Received:
    1
    I know... it just makes ghost blocks that its not suppose to ;-;
     
Thread Status:
Not open for further replies.

Share This Page

Loading...