#I need help with a cage ability
1 messages · Page 1 of 1 (latest)
set {_blocks::*} to the red, then remove the green from the list.
then set the list to iron bars
so just bring the corners in a bit
https://skripthub.net/docs/?id=10509 try this
Skript Hub - Documentation
Attempts to update the block represented by this state.
Unless force is applied, this will not modify the state of a block if it is no longer
the same type as it was when this state was taken.
If done without physics updates, it will not trigger a physics update on surrounding blocks which
could cause them to update or disappear.
didnt work
function ironBars(p: player):
set {_corners::*} to shapes_square({_p}'s location, 5)
add blocks within {_corners::1} and {_corners::2} to {_blocks::*}
add blocks within {_corners::1} and {_corners::3} to {_blocks::*}
add blocks within {_corners::2} and {_corners::4} to {_blocks::*}
add blocks within {_corners::3} and {_corners::4} to {_blocks::*}
loop {_blocks::*}:
set {_b} to location of loop-value
set block at {_b} to iron bars
force update blockstate of block at {_b}
set block above {_b} to iron bars
force update blockstate of block above {_b}
set block 2 meters above {_b} to iron bars
force update blockstate of block 2 meters above {_b}
set block 3 meters above {_b} to iron bars
force update blockstate of block 3 meters above {_b}
loop blocks within {_corners::1} and {_corners::4}:
set block 4 meters above loop-block to obsidian
hm