#check if bounding box entity is "caster"

16 messages · Page 1 of 1 (latest)

fading geode
#

in a bounding box like this

player.getLevel().getEntitiesWithin(myBoundingBox).forEach(entity => {

})

how would i check the player without isPlayer becuase i want it to effect other players just not the person who activated it?

storm waveBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

meager viper
#

I feel like this is a XY issue

royal tideBOT
#

The XY problem is when you really want to do X, and you think that Y can achieve X. However, you can't get Y to work, and so ask for help exclusively about Y.

This can lead to a lot of confusion from the people trying to help you, as Y can seem like a very random thing to want to do, and a lot of the time isn't the best way to achieve X anyway.

Its fine to ask about Y, just always include some context about X so you can be put on the right track if Y won't do X well, or there is an easier way to do X.

meager viper
#

Can you elaborate on your original issue?

dense kraken
#
if (entity == player) return```
fading geode
#

I want the entity that is doing that action that makes the bounding box to be excluded by the bounding box but any other entity including other players will be effected by bounding box

rare breach
#

no comma?

meager viper
fading geode
#

Ya more or less

dense kraken
# rare breach no comma?
player.getLevel().getEntitiesWithin(myBoundingBox).forEach(entity => {
if (entity == player) return
//do stuff to all othe entities besides yourself
})```
rare breach
#

raha i was confused by what raia describes the need

#

its like the longest sentence i've seen

#

seems it means do stufs in player's bounding box, but not for the player himself

fading geode