Unable to read/reference from different entity variable valueβ οΈ
I am trying to create a custom entity that rotates in the same way the player is rotating in real-time by reading query.body_y_rotation of the player and set this value in the animation of the custom entity to make it look like rotating the same way the player is rotating
I read from Bedrock.dev website that if I want to read/reference a variable value from a different entity, I have to use the [->] Arrow Operator but the article was not clear enough to show me how exactly to use it. It said that I need to set the variable value that I want to reference to PUBLIC, which I already did. Then to use the [->]Β ** arrow operator symbol in a different entity to read that public variable which I did but was not sure if it was the right way because it is not clear in the article how to use it. After I finished and launched Minecraft windows to try the code, it didn't work at all and the content log in Minecraft throw this error:-
[Molang][error]-addon:entity_test | Error: unhandled request for unknown variable 'variable.player_y_rotation'
It means that the entity is not reading that public variable valueπ. I had tried for about 4 days and searched on the internet for solutions or similar problems but I found nothing. There is nothing about how to access/read other entity variable values from a different entity. I need to know how, to complete my add-on.
Β
Β
Attachments
Comments 2
Cleaning up old tickets: This ticket had been set to 'Awaiting Response', but has not received a response from the reporter (~3 months+) so is being closed as Incomplete. If you feel this is still a valid issue then please comment, or create a new ticket following the Issue Guidelines which includes steps to reproduce the problem.
Quick Links:
π Issue Guidelines β π¬ Mojang Support β π§ Suggestions β π Minecraft Wiki
Thank you for your report!
However, this issue has been temporarily closed as Awaiting Response.
Is this still an issue in the latest version? If yes, can you please add it to the affected versions (or mention it if you are not the reporter)? Also, can you please provide a video showcasing the issue?
Just a reminder, to make your bug report as effective as possible, please try and include the following steps to reproduce the problem:
If your ticket does not look like the example given here, then it's likely to be closed as incomplete.
This ticket will automatically reopen when you reply.
Quick Links:
π Issue Guidelines β π¬ Mojang Support β π Project Summary β π§ Suggestions β π Minecraft Wiki