Suggested name: Fence Dispenser
What I want:
I was skripting for my friend. He wanted mechanical gate skript.. Dispensers that generate fence .. so it works as gate. The problem I came across is that it only generates 8 block tall gates and if the distance between dispenser and dirt (or other block) is less than 8 it will break this skript...
So the thing I would like to do is this same skript but it would carry logs and cauldron with it and would continue through water. the gate would only stop when the fence touches dirt/land or there is no longer fence inside dispenser. and once dispenser is again activated it would take fence back!
I know this original one is a mess... Please help me.
What I want:
I was skripting for my friend. He wanted mechanical gate skript.. Dispensers that generate fence .. so it works as gate. The problem I came across is that it only generates 8 block tall gates and if the distance between dispenser and dirt (or other block) is less than 8 it will break this skript...
So the thing I would like to do is this same skript but it would carry logs and cauldron with it and would continue through water. the gate would only stop when the fence touches dirt/land or there is no longer fence inside dispenser. and once dispenser is again activated it would take fence back!
I know this original one is a mess... Please help me.
code_language.skript:
On Dispensing of fence:
cancel event
set {eventblock.%location%} to location of event-block
if block under {eventblock.%location%} is air:
wait 0.5 second
set block at block under {eventblock.%location%} to fence
if block under block under {eventblock.%location%} is air:
wait 0.5 second
set block at block under block under {eventblock.%location%} to fence
if block under block under block under {eventblock.%location%} is air:
wait 0.5 second
set block at block under block under block under {eventblock.%location%} to fence
if block under block under block under block under {eventblock.%location%} is air:
wait 0.5 second
set block at block under block under block under block under {eventblock.%location%} to fence
if block under block under block under block under block under {eventblock.%location%} is air:
wait 0.5 second
set block at block under block under block under block under block under {eventblock.%location%} to fence
if block under block under block under block under block under block under {eventblock.%location%} is air:
wait 0.5 second
set block at block under block under block under block under block under block under {eventblock.%location%} to fence
if block under block under block under block under block under block under block under {eventblock.%location%} is air:
wait 0.5 second
set block at block under block under block under block under block under block under block under {eventblock.%location%} to fence
if block under block under block under block under block under block under block under block under {eventblock.%location%} is air:
wait 0.5 second
set block at block under block under block under block under block under block under block under block under {eventblock.%location%} to fence
stop
else if block under block under block under block under block under block under block under block under {eventblock.%location%} is fence:
wait 0.5 second
set block at block under block under block under block under block under block under block under block under {eventblock.%location%} to air
if block under block under block under block under block under block under block under {eventblock.%location%} is fence:
wait 0.5 second
set block at block under block under block under block under block under block under block under {eventblock.%location%} to air
if block under block under block under block under block under block under {eventblock.%location%} is fence:
wait 0.5 second
set block at block under block under block under block under block under block under {eventblock.%location%} to air
if block under block under block under block under block under {eventblock.%location%} is fence:
wait 0.5 second
set block under block under block under block under block under {eventblock.%location%} to air
if block under block under block under block under {eventblock.%location%} is fence:
wait 0.5 second
set block under block under block under block under {eventblock.%location%} to air
if block under block under block under {eventblock.%location%} is fence:
wait 0.5 second
set block under block under block under {eventblock.%location%} to air
if block under block under {eventblock.%location%} is fence:
wait 0.5 second
set block at block under block under {eventblock.%location%} to air
if block under {eventblock.%location%} is fence:
wait 0.5 second
set block at block under {eventblock.%location%} to air