#(prodbyexiled) trying to detect entities in points_around_y

74 messages · Page 1 of 1 (latest)

narrow reef
#

im trying to check for entities within a points_around_y location, and im updating its radius using - repeat. using playeffect this creates kind of like a particle pulse effect... however, i also want to detect enemies within caught within the pulse effect, aka within the radius-updating-points_around_y location
...and its not working
heres what im trying to do: https://paste.denizenscript.com/View/133077

wary harnessBOT
#

(prodbyexiled) trying to detect entities in points_around_y

wary harnessBOT
#

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.

pseudo anchor
#

!t find_entities_within

fallen rainBOT
#
Possible Confusion

Did you mean to search for locationtag.find_entities.within?

fallen rainBOT
pseudo anchor
#

use this, and if you want it ONLY in the circle, you can add a filter for entities at the same Y level/above

#

!t filter

fallen rainBOT
# pseudo anchor !t filter
Cannot Specify Searched Tag

Multiple possible tags: <ListTag.filter[<tag>]>, <ListTag.filter_tag[<dynamic-boolean>]>, <MapTag.filter_tag[<parseable-boolean>]>.

pseudo anchor
#

but for your script, the problem lays here:

- define victim <player.location.points_around_y[radius=<[radius]>;points=<[points].find_entities.within[1]>]>

<[points].find_entities.within[1]>]> doesnt return a number for "points", it gives you something like <list[player|zombie|etc]>

you need the location of the entities

#

id go with my solution, and then you can do a foreach through the list of entities found there, and make circles for each player location then

narrow reef
# pseudo anchor but for your script, the problem lays here: `- define victim <player.location.p...

i dont really follow

i mean i tried to here: https://paste.denizenscript.com/View/133081

but it doesnt detect the victim and i dont know how to get the lil pulse effect working with a foreach

pseudo anchor
# narrow reef i dont really follow i mean i tried to here: https://paste.denizenscript.com/Vi...

ah what i meant was to completly replace what you hajve here

- define points <[start].points_around_y[radius=<[radius]>;points=<[pointvalue]>]>
                                    - foreach <[points]> as:point:
                                            - playeffect effect:dust_color_transition at:<[point]> special_data:1|<&color[#ffa6f9]>|<&color[#cce2ff]> quantity:1 offset:0 visibility:100
                                            - define victim <[start].points_around_y[radius=<[radius]>;points=<[pointvalue].find_entities.within[1]>]>
                                            - hurt <[victim]>
                                            - define add:+:0.1
                                            - define radius:+:<[add]>
                                            - define pointvalue:+:20
#

since the solution i provided basically replaces that by getting everyone in the circle as a list

#

and you can foreach through that list for each entity in it

narrow reef
#

you mean like this?

pseudo anchor
#

wait no

#

lol

#

something like

#

- define victims <[start].find_entities[living].within[5].filter_tag[<[filter_value].y.equals[<[start].y>]>]>

#

you have to undesrtand that points_around_y is just a list of points, thats it

#

to find an entitity you have to use find_entities or something like that

#

the tag i provided basically finds entities within 5 that have the same Y level as the start point

narrow reef
#

i see

#

just curious but would points_around_y[radius=;points=].location work?

stiff badger
#

victim 😭

tight larkBOT
pseudo anchor
#

look let me show you

low plinthBOT
pseudo anchor
#

see its a list of locations

#

whilst the tag i provided

low plinthBOT
#

Tag parse results for <player.location.find_entities[living].within[5].filter_tag[<[filter_value].y.equals[<player.location.y>]>]>: https://paste.denizenscript.com/View/133105

player.location.find_entities[living].within[5].filter_tag[<[filter_value].y.equals[<player.location.y>]>]
Had internal exception: IllegalStateException-Asynchronous getNearbyEntities!
Had error: Tag-base 'player' returned null.
Had error: Tag <player.location.find_entities[living].within[5].filter_tag[<[filter_value].y.equals[<player.location.y>]>]> is invalid!
Had error: Unfilled or unrecognized sub-tag(s) 'within[5].filter_tag[<[filter_value].y.equals[<player.location.y>]>]' for tag <player.location.find_entities[living].within[5].filter_tag[<[filter_value].y.equals[<player.location.y>]>]>!
Had error: The returned value from initial tag fragment 'player.location.find_entities[living]' was: '[email protected], 70, 239.77639493281197, 26.400015, 173.992081, world'.
pseudo anchor
#

huh

#

i guess they best way to show you is to just try it and see

#

the one i provided gets a list of entities

narrow reef
#

ill try it when i get the chance to

#

i need the radius to increase gradually and to check for entities within those points each time the radius updates

pseudo anchor
narrow reef
#

i fixed it myself, using a very scuffed way, but it works

fading prairieBOT
#
Resolved

Thread closed as resolved.

narrow reef
fading prairieBOT
#
Thread Reopened

Thread was manually reopened by @narrow reef.

narrow reef
#

@pseudo anchor i need help 😭

#

this is what i tried...i probably did something wrong

- define victims <[start].find_entities[living].within[1].filter_tag[<[filter_value].y.equals[<[start].y>]>]>
                                    - foreach <[victims]> as:victim:
                                        - narrate victimfound
narrow reef
#

it doesnt narrate to me that any victims are found

#

/entities

pseudo anchor
#

can you narrate <[victims]> then

narrow reef
fallen rainBOT
#
Possible Confusion

Did you mean to search for entitytag.is_living?

sudden crane
#

i swear there was a tag for that

#

!t find.living

fallen rainBOT
sudden crane
#

yes that

#

and also it doesn't work because <[filter_value].y

#

You're basically doing entity.y instead of entity.location.y

narrow reef
#

why do i need to get the entitys location

sudden crane
#

because you're trying to filter the targets found based on their* y level

#

you can't access that information without its location

narrow reef
#

i see

#

alright ill try that when i can

fading prairieBOT
#
Changed to Help/Support

Thread is now a Help/Support thread. A helper will check your thread when available.

pseudo anchor
#

@narrow reef any progress

fading prairieBOT
#
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.)

#

@narrow reef