Make entity break wooden slabs like in Hypixel Zombies

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

TCXeption

Member
Apr 2, 2020
16
0
0
33
I want that entities can break ONE wooden slab, if they are in front of the wooden slabs. After one wooden slab was set to air, another wooden slab will be set to air with some delay. Is this possible in Skript?
 
The best way i can think to do it would be to either do it on the zombie spawn event, wait a few seconds(so it can walk to the window) then loop the blocks in its radius and and if its wooden slab break it. Or making a worldguard region in front of the window and using the entry of that to trigger the check. Though im not at my computer to write any code out or test, at least an idea of where to start looking
 
Yes I had this idea too, but there are 2 problems:

1. I don't know, maybe because of unstable Skript, but "oak slab" gives no error, but doesn't work, something like "stone" or "furnace" works
2. Not all blocks, only one block should be set to air, and with delay another, until the entity can walk away from the slabs
 
Yes I had this idea too, but there are 2 problems:

1. I don't know, maybe because of unstable Skript, but "oak slab" gives no error, but doesn't work, something like "stone" or "furnace" works
2. Not all blocks, only one block should be set to air, and with delay another, until the entity can walk away from the slabs
You might want to try `top oak slab` instead of oak slab.
 
Yes the first problem is solved. I used "on entity target" with top oak slab, which didn't work. With every second, it works. But does anyone know about the 2. problem?
[doublepost=1585906098,1585902785][/doublepost]More bad things :emoji_frowning:

Code:
every 2 seconds:
 loop all entities:
  if block below loop-entity is black wool:
   loop all blocks in radius 2 around loop-entity:
    if loop-block is top oak wooden slab:    
     set loop-block to air

1. Black wool check doesn't work
2. It breaks also stone slabs? Very weird...
 
Last edited:
Yes the first problem is solved. I used "on entity target" with top oak slab, which didn't work. With every second, it works. But does anyone know about the 2. problem?
[doublepost=1585906098,1585902785][/doublepost]More bad things :emoji_frowning:

Code:
every 2 seconds:
 loop all entities:
  if block below loop-entity is black wool:
   loop all blocks in radius 2 around loop-entity:
     if loop-block is top oak wooden slab:    
      set loop-block to air

1. Black wool check doesn't work
2. It breaks also stone slabs? Very weird...
What Skript and server version are you using?
 
Version: 1.12.2
Skript: v2.5-beta3

EDIT: I have tested stable 2.4. It doesn't work on this version also.
[doublepost=1588753337,1585910687][/doublepost]After a month, I implemented this in my Skript and now it works?!? Very weird. But how can I make the entity break in this sequence:

5 4 6 (6 oak slabs - 3 above, 3 below)
2 1 3

I only got random to work. Thanks in advance.
 
Status
Not open for further replies.