#forcefield
1 messages · Page 1 of 1 (latest)
you don't have to manually calculate it
should just check the region at each block; technically the player can stand outside of spawn while the blocks around them can be
You also dont need the elses after the stop, and that makes it especially hard to read on mobile
region at loop-block != "spawn"
i got this
but it dont work
it doesnt make the sphere
it like breaks everything
i tried using if "%region at loop-block%" does not contain "spawn":
but it dont work
for some reason
same issue, the lime stained glass does not spawn.
A
it also don't work for me and tried to find out but I didn't got the answer so instead i used this
if "%region at loop-block%" contains "spawn":
stop
else:
code
you can use this alternative until you found any solution
Did it work? Did the blocks not spawn in the region of spawn
instead of this
Okay ty
you can use this
basically, this doesn't spawn the blocks, i dont have a clue on how u made it to spawn the blocks.
?
what?
do you want to spawn a block?
yes.
or check whether the blocks are in region spawn
i want to make it so that, the blocks that will be in the region of spawn they will not spawn.
just add the rest code after else:
i did aswell, but it don't spawn the blocks.
what do you mean by the spawn the blocks?
set loop-block to stone
as u can see the blocks went into the spawn area.
i want to make them so they dont spawn in the spawn area.
on right click:
player's tool is lime stained glass
set {_loc} to location of player
set {_r} to 7
set {_innerR} to 6
loop blocks in radius 8 around {_loc}:
loop-block is lime stained glass
set loop-block to air
loop blocks in radius {_r} around {_loc}:
set {_x} to x-coordinate of loop-block - x-coordinate of {_loc}
set {_y} to y-coordinate of loop-block - y-coordinate of {_loc}
set {_z} to z-coordinate of loop-block - z-coordinate of {_loc}
set {_dist} to sqrt({_x} * {_x} + {_y} * {_y} + {_z} * {_z})
{_dist} <= {_r}
{_dist} > {_innerR}
if loop-block is air:
if "%region at loop-block%" does not contain "spawn":
stop
else:
set loop-block to lime stained glass
play sound "block.glass.place" with volume 1 at location of player
set {_playerLoc} to location of player
wait 15 seconds
play sound "block.glass.break" with volume 1 at {_playerLoc}
loop blocks in radius 8 around {_playerLoc}:
loop-block is lime stained glass
set loop-block to air
here
remove does not
I didn't mentioned the does not
on right click:
player's tool is lime stained glass
set {_loc} to location of player
set {_r} to 7
set {_innerR} to 6
loop blocks in radius 8 around {_loc}:
loop-block is lime stained glass
set loop-block to air
loop blocks in radius {_r} around {_loc}:
set {_x} to x-coordinate of loop-block - x-coordinate of {_loc}
set {_y} to y-coordinate of loop-block - y-coordinate of {_loc}
set {_z} to z-coordinate of loop-block - z-coordinate of {_loc}
set {_dist} to sqrt({_x} * {_x} + {_y} * {_y} + {_z} * {_z})
{_dist} <= {_r}
{_dist} > {_innerR}
if loop-block is air:
if "%region at loop-block%" contain "spawn":
stop
else:
set loop-block to lime stained glass
play sound "block.glass.place" with volume 1 at location of player
set {_playerLoc} to location of player
wait 15 seconds
play sound "block.glass.break" with volume 1 at {_playerLoc}
loop blocks in radius 8 around {_playerLoc}:
loop-block is lime stained glass
set loop-block to air
use this
exact one i have
nope
yeah i changed them
right as u said that
and they still does not spawn
@royal monolith
what this does btw
makes a forcefield
like a hollow sphere
and i dont want it to go into the region of spawn
@royal monolith
k
so do u know how to fix
use broadcast ""
after every
effect
so you can know
where is the error
contains*
it dont tho
i meant the region at loop-block*
the problem was the world guard for some reason
i fixed it
ty for help anyway
ok you want
if a player right clicks with lime stained glass, the blocks in the radius 8 which are lime stained glass turn into air and the blocks in radius 7 which are air turn into lime stained glass [prevent from spawn]
;-;
yeah already fixed that ty for help
wlc
not even joking
last time i did on region enter: and it was set to another region
for some reason