So I’m trying to make it so whenever an entity dies, it triggers a specific event depending on what component it has. However I’m unsure where exactly I need to put the “Trigger” Parameter when I’m using “sequence” and “filter”. At least I think that’s what’s causing my code to break. I’ve looked at the wiki, but can’t seem to find what I’m looking for
#Trigger Entity Events with Sequence and Filter
1 messages · Page 1 of 1 (latest)
In the official documentation it says
minecraft:on_death can only be used by the ender_dragon entity.
Ah. Ty for the info. Just wan to clarify, so I did have the trigger parameter (and the other ones as well) in the right place? Just doesn’t work due to it not being the Vanilla Ender Dragon?
Also prior to adding in filters to test for specific components, the entity would trigger the event when it died perfectly fine without the rest of the code going wonky
Looking at the documentation on that page, I don’t think “trigger” is valid there. Or “sequence”. Those are entity event parameters. You can’t just stick them inside any component. Do you have content log warnings on?
Try in the damage sensor, fatal damage. Here is my code for my kill count that shows itjson { "on_damage": { "filters": { "all_of": [ {"test":"has_damage","value":"fatal"}, {"test":"is_family","subject":"damager","value":"player"} ] }, "event": "ev:kill_count" } }
You would change out the player test with the has_component filter
Entity Test Filter Listhttps://learn.microsoft.com/en-us/minecraft/creator/reference/content/entityreference/examples/filterlist
I see. Just had a small look into what content logs are, didn’t know it was a thing until now but looks like they’ll be really helpful
Oh cool. Thanks, Appreciate it. I’ll try and look into it soon as I can