#How to trigger buffs when hitting mobs

1 messages · Page 1 of 1 (latest)

kindred trail
#

I just started taking an interest in creating my own addons, and wanted to do first an axe that would grant a Strength buff for 5 seconds everytime I hit any mob.

I've followed a tutorial for this but AI kept telling me that placing events inside an item is already deprecated. And following what AI told me to do isn't really working for me.

I have tried, calling the event from my axe json.
"minecraft:weapon": {
"on_hit": {
"event": "minecraft:apply_veilbreaker_buff"
}

And defining that event from the player json which is like:

"minecraft:apply_veilbreaker_buff": {
"run_command": {
"command": [
"effect @s strength 5 5"
]
}
}

And I have been reading from bedrock.dev, wiki.bedrock.dev, even the Minecraft section on learn.microsoft but I haven't found anything regarding, "on_hit" component.

topaz jewel
#

You are right events are deprecated in the items and has been mostly replaced by scripts

topaz jewel
kindred trail
#

Can you point me to any tutorials or website that I can maybe dive into that would help with this?

Also the white background on the axe was an accident 🤣 looked funny so I decided not to fix it yet.

topaz jewel
#

I usually take a look into Microsoft learn (can't send the link right now so...) because with scripts I am a beginner myself (but maybe someone else has a better website or tutorial for you)

topaz pagoda
# kindred trail Can you point me to any tutorials or website that I can maybe dive into that wou...
kindred trail
kindred trail