#Trying to make Iron Golems reselect targets so they don't overwhelmed by hordes
1 messages · Page 1 of 1 (latest)
add "reselect_targets": true, to the minecraft:behavior.nearest_attackable_target component
ooh i'm gonna try
post an after video please, I just wanna see an efficent golem
this SHOULD be it
oh yeah what's that scan_interval thing?
no clue, you'll have to find out yourself
i googled it
i just need to also add that too and...
i guess i can put in a number
an interval of how many ticks until the golem reselects a target
okay
nope... still doesn't work
the golem still gets swarmed
i'm starting to hate how they're so easily pushed too
i wonder if i can at least disable being pushed by other entities
you could make an aoe attack that pushes all other mobs away from the golem when it swings
it would be pretty easy with scripting, but it would be a bit of a weird workaround
thats useless
remove it lol
basically its like a cool down
only possible if the entity doesn't have a hitbox.
there is.
oh do tell!
minecraft:pushable
yeah
you can make the iron golem pushable by pistons, or not.
its up to you
also
pushable by other mobs.
i think you should make the swing attack have a knockback effect
still gotta work out the target reselection
like ravagers.
when you blocked them with a shield
they do a roar that knocks you back.
maybe.
oh my god that is amazing!
right right, temper my expectations
yea
how would i make it work tho
idk
golem just does it randomly?
maybe using an event
no.
only when it suceeds to do its swinging attack.
ohh yeah like an event timer
that... yes
sure
hey
i just made it
i mean my own rendition
wanna see?
lol
i didn't used scripts to do this btw
yeah lol
is the blast configurable?
yup
i used an invisible entity with the knockback roar
lol
wait let me send the jsons if u wanna test em.
yes please
is it always present?
here
thanks!
wdym
the invisible entity
or does it get summoned to perform the action then despawns after?
oh and also, put this in the folder named "particles" in your addon's resource pack.
it hides the particles of the knockback.
oh well no.
it only spawns when the golem attacks.
it despawns right after
alr
oh so we get pummeled into the air too
that's hilarious. i'm keeping it
you get knocked into the air and then get knocked backwards
haha
i only made the damage deal up to 10 hearts.
i don't need the roar to do any crazy damage
yeah exactly
something like 1-3 is fine
well since its configurable you can reduce the number.
could i configure how often the roar occurs each hit?
like, say, a 33% chance it's performed
maybe idk
i assume i have to put the invisible entity into the same entity folder as with the iron golem
yup
in the BP folder.
thank you thank you
im not sure what i did wrong... golem's barely attacking
like it wants to be REALLY close to the zombie it's targetting, this is nuts
wtf did you add
💀
i dont know
i just replaced minecraft:melee_attack with yourminecraft:melee_box_attack line
OH WAIT
it might have to do with the attack_interval
i just removed it
oh yeah also the kb isn't doing anything
did i make it too weak by setting everything to 2?
AHH I FORGOT TO ADD THE EVENT ITSELF
you literally just had to replace your file with my file
💀
ok i added it
2 of all numbers...
lol
alr
look... i already had some changes for the iron golem before i reached out
ah
no wonder
i gave it 250 health from 100
i made it possible to feed them iron blocks
which heals them 10x of what ingots do
i also made it possible too with iron nuggets
i guess health_amount only wants whole numbers, which, fine
i also wanna math out other iron based items
like uhh
iron bars
6: 25 150=16:?
400 2400/6
something around 66 actually 400
and split that across 16 iron bars..
okay
iron bars only healing 4hp does not
hold on
25??
wait i'm not even supposed to use ratios to begin with
i just need to divide 150 by 16
and then round it down
so each iron bar heals 9
is this the actions and stuff RP
i see
Looks good!
@indigo vapor
np
You can make animation for it
Just to add little more detail
And also, you could make the knockback inside the iron golem, it'll automatically ignore themself
Additionally you can add ignore type and family too so it'll not knockback villager or other iron golem
And instead of knockback when attacking, you can trigger it randomly after it takes damage