#HOW to run an event - from the entity that is riding - on the entity that's being ridden?

1 messages Β· Page 1 of 1 (latest)

buoyant slate
#

Please is there any way to get this? directly from the behavior of the entity that is riding it

buoyant slate
#

@tight quest did you find any way to get this? ^^'

tight quest
# buoyant slate <@154369087638601728> did you find any way to get this? ^^'

Since they deprecated the queries to get riders I don't think there is any way without scripting. You can get a pretty accurate event command by putting the offset of the riding into a command, i.e. /execute positioned ~x ~y ~z run event entity @e[r=1,c=1] <event>. Though this could still mess up if two riding entities are very close to each other because of command jankiness. The only truly accurate way is to link directly to the rider/ride in scripting.

buoyant slate
#

I see! yeah I'm doing something like that (through some command) and I got it to not mess with the riding/surrounding entities but I have to use an additional dummy entity in my case X'D

#

At least now I know there is one possible way through scripting, although I still don't handle it hahahah

#

I asked this more than one time and never got any solution either yeah 😡

#

Thank you so much @tight quest, now I'm sure about the issue, that's just what I need πŸ™Œ πŸ™Œ

tight quest
# buoyant slate Thank you so much <@154369087638601728>, now I'm sure about the issue, that's ju...

np np. glad you got a setup that works. πŸ™‚
I just looked at the scripting docs and I'm actually not sure you are even able to get the rider/ride in stable version (though I could be wrong). I think you need to get the rideable component and then use the getRiders method, but it says the class is still in pre-release (though this article is a month old): https://learn.microsoft.com/en-us/minecraft/creator/scriptapi/minecraft/server/entityrideablecomponent#getriders

Contents of the @minecraft/server.EntityRideableComponent class.