For example, if you want to execute a command when the player uses a specific item in their hand, you run into some issues.
You implement this by going into your "player.json" file in the entities folder and creating an "on_environment" object that checks if the player as an item in their hand, and then have an event set a component such as "variant", and then in an animation controller have a Molang query check for "is_variant" and "is_using_item" and execute the command from there. However, multiple addons may use the same component, causing compatibility issues because one addon may set a component to a value that another addon recognizes, causing that addon to do something it's not supposed to.
You have to implement it this way because in an animation controller you can't use filters, only Molang queries, and Molang queries can't check for a specific item in an entity's hand. If Molang queries and filters had the same capabilities, this wouldn't be an issue because you wouldn't need to make the "on_environment" object, you could just do it all in the animation controller and there wouldn't be the issue of components being shared across multiple addons.
Molang queries and filters should have the same capabilities because they are both essentially doing the same thing: getting certain properties of an entity. Coalescing filters and Molang queries not only makes more sense than the current system, but it would also widen the range of possibilities of the Addon API.
Please sign in to leave a comment.
0 Comments