#(Smrek) Little help with area format

34 messages · Page 1 of 1 (latest)

mental adder
#

Hello I'm strugling with on player enters area event.
I want to create a script when player enters cuboid <cuboid[world,-72,73,90,-70,75,92]> but I tried different methods none of them are working where I'm mistaking?

I tried this variants:

on player enters cuboid:
- if <context.area> == <cuboid[world,-72,73,90,-70,75,92]>:
- ...

on player enters cuboid[world,-72,73,90,-70,75,92]:
- ...

on player enters area[cuboid[world,-72,73,90,-70,75,92]]:
- ...

any suggestions?

random hazelBOT
#

(Smrek) Little help with area format

random hazelBOT
#

Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.

mental adder
#

!e entity enters|exits area

hard mistBOT
# mental adder !e entity enters|exits area
Group

Entity

**WARNING**

cancelling this event will have different results depending on the cause. Teleporting the entity away 1 tick later might be safer.

Event Lines

<entity> enters|exits <area>

Triggers

when an entity enters or exits a noted area (cuboid, ellipsoid, or polygon). On Spigot servers, only fires for players. Paper is required for other mob types.

Has Player

When the entity is a player. - this adds switches flagged:<flag name> + permission:<node>, in addition to the <player> link.

Context

<context.area> returns the area object that was entered or exited.
<context.cause> returns the cause of the event. Can be: WALK, WORLD_CHANGE, JOIN, QUIT, TELEPORT, VEHICLE.
<context.to> returns the location the entity moved to (might not be available in exit events).
<context.from> returns the location the entity moved from (when available, depending on cause).
<context.entity> returns the entity that entered/exited an area.

Cancellable

True - this adds <context.cancelled> and determines cancelled + cancelled:false.

mental adder
#

!t areaobject

hard mistBOT
# mental adder !t areaobject
Cannot Specify Searched Tag

Multiple possible tags: <AreaObject.npcs>, <AreaObject.world>, <AreaObject.shell>, <AreaObject.blocks[(<matcher>)]>, <AreaObject.players>, <AreaObject.entities[(<matcher>)]>, <AreaObject.contains[<location>]>, <AreaObject.is_within[<cuboid>]>, <AreaObject.with_world[<world>]>, <AreaObject.bounding_box>, <AreaObject.spawnable_blocks[(<matcher>)]>, <AreaObject.living_entities>, <AreaObject.blocks_flagged[<flag_name>]>, <AreaObject.approximate_overlap_areas>.

mental adder
#

!ot areaobject

hard mistBOT
worn isle
#

Please help us help you by uploading scripts to the Denizen paste tool.

#

!paste

hard mistBOT
uncut cobalt
#

!guide special memory

hard mistBOT
uncut cobalt
#

Use a note

noble zephyr
#

you cant put tags into event lines

#

i hate it too, but you gotta note these areas first

noble zephyr
# uncut cobalt Use a note

is there a method to note areas before events are loaded?
is there a method to define notes before any events are processed, so you could define your areas in a data script for example

uncut cobalt
#

what

#

you have to note it only once

#

if you want to select multiple notes, why not using flags and flag_matchers

noble zephyr
#

it would be better if i could define areas in a data script, and then on server restart automaticly note them

#

its cleaner, than having to manually create notes, thats kinda ew

#

but i get it, the devs have other problems atm

neon brambleBOT
#
Thread Closing Reminder

Has your issue been resolved, or your question been answered?
If so, please use the </resolved:1028673926114594866> command to close your thread.
Or </invalid:1028673926898909185> if it's not possible to resolve.

If not yet resolved, please reply below to tell us what you still need.

(Note that if there is no reply for a few days, this thread will eventually close itself.)

#

@mental adder

old gorge
#

nothing needs to note them ever again

spark silo
mental adder
#

Thank you all, I'll try it today, I didn't have time yesterday and then I'll let you know if I still need help or if I can close this conversation.

#

works like a charm thanks!

neon brambleBOT
#
Resolved

Thread closed as resolved.

#
Thread Reopened

Thread was manually reopened by @mental adder.