#how to detect what part of the body was damaged?

1 messages · Page 1 of 1 (latest)

daring talon
#

I'm making an Attack on Titan datapack and in the series, titans have a weakspot on the back of their neck. if my datapack was made with only pvp in mind that would be okay since I could just use interaction entities in that area for if a player hits it. the only issue is that you are also able to turn into a titan, meaning mobs have to be able to somehow hit this weakpoint. thoughts?

hexed egretBOT
#

<@&1201956957406109788>

Someone will come and help soon!

💬 While you wait, take this time to provide more context and details.

🙇 If nobody has answered you by <t:1731383871:t>, feel free to use the Summon Helpers button to ping our helper team.

✅ Once your question has been resolved (or you no longer need it), please click Resolve Question or run /resolve

fiery jetty
#

Sounds like more of a creative question than a practical one

daring talon
tough sluice
#

If you want mobs to actively attack it, you could use something like a villager as the hitbox, that would atleast attract zombies

#

How are you doing the hitbox currently? Just a scaled up player?

#

You could also do angle and height checks to approximate if anything should have hit that part

tough sluice
daring talon
tough sluice
#

The attacker relation refers to the last entity that has hit you.
So you can react to getting hit using an entity_hurt_player advancement and then use execute on attacker to do stuff with the entity that attacked you

This is assuming that the titan can only ever be a player, it that’s not the case it will be a lot more annoying

daring talon
fiery jetty
#

Attacker isn't an NBT, but they can be registered as an attacker for execute on, yes

daring talon
#

and how long are they marked as attacker? if I only want to run the function once

fiery jetty
#

That I'm not sure on

daring talon
#

and does "execute on x" make x the selector?

fiery jetty
fiery jetty
daring talon
#

I made the final function mentioned summon a creeper and it's not activating

fiery jetty
#

I'm on mobile so I can't see that

daring talon
#

{
"criteria": {
"requirement": {
"trigger": "minecraft:entity_hurt_player",
"conditions": {
"player": [
{
"entity": "this",
"condition": "minecraft:entity_properties",
"predicate": {
"equipment": {
"head": {
"items": "minecraft:barrier"
}
}
}
}
]
}
}
},
"rewards": {
"function": "minecraft:titan_shifting/titan_form/nape/hit"
}
}

#

I even tried:

{
"criteria": {
"requirement": {
"trigger": "minecraft:entity_hurt_player",
"conditions": {}
}
},
"rewards": {
"function": "minecraft:titan_shifting/titan_form/nape/hit"
}
}
and it's still not working

fiery jetty
daring talon
daring talon
#

I'm testing with a husk hitting me

fiery jetty
#

Make sure you don't already have the advancement

daring talon
daring talon