#forcefield

1 messages · Page 1 of 1 (latest)

slim fog
#

yk distance between X and Y exists

#

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

stiff axle
#

You also dont need the elses after the stop, and that makes it especially hard to read on mobile

lime shoal
#
region at loop-block != "spawn"
#

i got this

#

but it dont work

#

it doesnt make the sphere

#

it like breaks everything

slim fog
#

use contains / doesn't contain

#

otherwise non-spawn regions will cause problems

lime shoal
#

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.

lime shoal
#

A

royal monolith
#

you can use this alternative until you found any solution

lime shoal
lime shoal
#

Okay ty

lime shoal
royal monolith
#

what?

#

do you want to spawn a block?

lime shoal
royal monolith
#

or check whether the blocks are in region spawn

lime shoal
#

i want to make it so that, the blocks that will be in the region of spawn they will not spawn.

royal monolith
lime shoal
royal monolith
#

set loop-block to stone

lime shoal
#

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
royal monolith
lime shoal
#

the blocks dont spawn no more.

#

nothing spawns.

royal monolith
#
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

lime shoal
#

exact one i have

royal monolith
lime shoal
#

nothing happens

#

no cause i changed right after u told ,me

royal monolith
lime shoal
#

yeah i changed them

#

right as u said that

#

and they still does not spawn

#

@royal monolith

royal monolith
#

what this does btw

lime shoal
#

makes a forcefield

#

like a hollow sphere

#

and i dont want it to go into the region of spawn

#

@royal monolith

royal monolith
#

k

lime shoal
royal monolith
#

after every

#

effect

#

so you can know

#

where is the error

lime shoal
#

the error is there

#

cause i do right click

royal monolith
lime shoal
#

and it sends "stopped"

#

yuh same thing

royal monolith
#

then your region

#

contains

#

"spawn"

lime shoal
#

it dont tho

royal monolith
#

i meant the region at loop-block*

lime shoal
#

i fixed it

#

ty for help anyway

royal monolith
#

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]

royal monolith
lime shoal
#

yeah already fixed that ty for help

royal monolith
#

wlc

lime shoal
#

last time i did on region enter: and it was set to another region

#

for some reason