#entity not attacking?

1 messages · Page 1 of 1 (latest)

naive talon
quasi vector
#

You have to order the priorities, first target, second attack, third random stroll, fourth look player and fifth random look, the number does not matter, they just have to be in that position

naive talon
#

ill give it a try

#

}, "minecraft:behavior.nearest_attackable_target": { "priority": 3, "entity_types": [ { "filters": { "all_of": [ { "test": "is_family", "subject": "other", "value": "player" }, { "test": "is_moving", "subject": "other", "operator": "==", "value": true }, { "test": "is_immobile", "subject": "other", "operator": "==", "value": false } ] } } ] }, "minecraft:behavior.delayed_attack": { "priority": 3, "speed_multiplier": 0.6 }, "minecraft:behavior.random_stroll": { "priority": 1, "speed_multiplier": 0.4 }, "minecraft:movement": { "value": 0.4 }, "minecraft:attack": { "damage": 25 }, "minecraft:pushable": {}, "minecraft:movement.generic": {} }, "adult1": { "minecraft:variant": { "value": 0 } }, "adult2": { "minecraft:variant": { "value": 1 } } }, "components": { "minecraft:type_family": { "family": [ "dinosaur", "animal", "mob", "tyrannosaurus" ] }, "minecraft:breathable": { "total_supply": 15, "suffocate_time": 0, "breathes_water": true }, "minecraft:hurt_on_condition": { "damage_conditions": [ { "filters": { "test": "in_lava", "subject": "self", "operator": "==", "value": true }, "cause": "lava", "damage_per_tick": 1 } ] }, "minecraft:jump.static": {}, "minecraft:behavior.float": {}, "minecraft:can_climb": {}, "minecraft:nameable": {}, "minecraft:behavior.look_at_player": { "priority": 2, "look_distance": 8 }, "minecraft:behavior.random_look_around": { "priority": 1

#

here's what i did

#

still doesnt seem to work

#

you said the priority numbers didnt matter right?

quasi vector
#

Hmm. I really don't know how to explain it, but in fact it is important that this order is in the numbers, not in the position of the components.

#

I mean the target component can be 0,1,2,3,4 or 5, but then melee attack would have to be greater than that number

naive talon
#

oh sorry i must’ve misunderstood what you were saying

quasi vector
#

They do not need to be in consecutive order.

naive talon
#

so first will be 0

#

and then etc etc

#

correct?

quasi vector
#

Nah, I explained it very badly XD

naive talon
#

ya i dont think im understanding 😅

quasi vector
# naive talon and then etc etc

yeah you can start from the number you want, that's why I told you that it doesn't matter, but you must respect the order of priorities

naive talon
#

idk what you mean by order of priorities

#

ohhh

#

i get it

quasi vector
#

the numbers

#

I recommend starting with a number greater than 2, since you may need other priorities that require position 0 and 1.

naive talon
#

nearest target = 3
delayed = 4
random = 5
look at player = 6
random look = 7

quasi vector
#

yeah

quasi vector
naive talon
#

nah you’re good haha

#

here’s what i got

quasi vector
#

Take priorities into account, for example your entity will probably not attack if melee attack is before target. First you need your entity to detect its target to be able to attack, you must also place the random components at the end, because if you place them before your entity will move randomly and will never detect or attack

quasi vector
naive talon
#

alright i’ll give it a shot

quasi vector
#

You are also using delayed attack, do you intend for it to have a delayed attack?

naive talon
#

yes

quasi vector
#

ok you need to adjust the times

naive talon
#

wdym

#

oh yeah

#

i’m just waiting for the animations

quasi vector
#

ah ok

naive talon
#

it doesn’t seem to work

#

it just doesn’t move

quasi vector
#

you haven't added the movement component

naive talon
#

did i actually not do that

#

im so dumb

#

im pretty sure i did?

quasi vector
#

"minecraft:navigation.walk": {
"can_walk": true
},

naive talon
#

oh shoot i deleted it

#

working!