despawn falling blocks?

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

Stefqnutz

Active Member
Sep 23, 2019
67
1
8
19
How could I despawn falling blocks?
I tried to use "on falling block land" but the event dosen't exist.

My code:
Code:
    if player's held item is {@midasstaff}:
        if {delaymidas::%uuid of player%} is not set:
            if {mana::%uuid of player%} is higher than 249:
                send "&aUsed &6Molten Wave&a! &b(250 Mana)" to player
                remove 250 from {mana::%uuid of player%}
                set {_location} to location 4 meters in front of player
                set {delaymidas::%uuid of player%} to true
                set {_location} to location 3 meters above {_location}
                set {_playerfacing} to facing of player
                if {_playerfacing} is north or south:
                    loop 6 times:
                        spawn 1 falling gold block at {_location}
                        spawn 1 falling gold block at location 1 meter west of {_location}
                        spawn 1 falling gold block at location 1 meter east of {_location}
                        set {_location} to location 1 meter in front of {_location}
                        wait 1.5 tick
                    delete {delaymidas::%uuid of player%}
                    wait 4 tick
                    loop all blocks in radius 80 of player:
                        if loop-block is gold block:
                            set loop-block to air
                            
                if {_playerfacing} is east or west:
                    loop 6 times:
                        spawn 1 falling gold block at {_location}
                        spawn 1 falling gold block at location 1 meter north of {_location}
                        spawn 1 falling gold block at location 1 meter south of {_location}
                        set {_location} to location 1 meter in front of {_location}
                        wait 1.5 tick
                    delete {delaymidas::%uuid of player%}
                    wait 4 tick
                    loop all blocks in radius 80 of player:
                        if loop-block is gold block:
                            set loop-block to air
            else:
                send "&cYou do not have enough mana to use that!" to player
                        
        else:
            send "&cYou are currently on cooldown!" to player


As you can see, I try looping for blocks around the player and removing them, but that dosen't seem to remove all of the blocks? Thanks in advance.
[doublepost=1647096102,1647092263][/doublepost]bump
 
I don't know if you're trying to removed the falling blocks when they land or you're trying to remove the falling blocks in the air. If it's the second one, falling blocks are not blocks. They are entities.

You could just do the same but with looping all entities.
 
It's pretty obvious im trying to remove them once they land, but I don't really think that's possible.
 
Status
Not open for further replies.