What it says on the tin. was trying to make a melee attack on an entity with a delayed attack. however the attack animation does not play (entity stands still for attack). this is weird as all other animation work. please send help, I've been stuck on the issue for days.
#delayed attack, animation not working. Please send help.
1 messages · Page 1 of 1 (latest)
send the code in json formating here, i cant see the photos clearly}
as in 3 times " ` " followed by " js " followed by your code, followed by other 3 signs like in the begginning
How do you make that symbol on PC?
oops, hold on
"components": {
"minecraft:health": {
"max": 10,
"value": 10
},
"minecraft:movement": {
"value": 0.2
},
"minecraft:physics": {},
"minecraft:jump.static": {},
"minecraft:movement.basic": {},
"minecraft:navigation.walk": {
"can_walk": true
},
"minecraft:behavior.random_stroll": {
"priority": 6,
"speed_multiplier": 1
},
"minecraft:behavior.random_look_around": {
"priority": 7
},
"minecraft:behavior.look_at_player": {
"priority": 7,
"look_distance": 6,
"probability": 0.2
},
"minecraft:behavior.hurt_by_target": {
"priority": 1
},
"minecraft:behavior.nearest_attackable_target": {
"priority": 2,
"within_radius": 10,
"reselect_targets": true,
"entity_types": {
"filters": {
"any_of": [
{
"test": "is_family",
"subject": "other",
"value": "decepticon"
}
]
},
"max_dist": 10
},
"must_see": true,
"must_see_forget_duration": 0.4
},
"minecraft:collision_box": {
"width": 1,
"height": 2.9
},
"minecraft:behavior.look_at_target": {
"priority": 7
},
"minecraft:type_family": {
"family": [
"autobot"
]
},
"minecraft:attack": {
"damage": 2
},
"minecraft:behavior.delayed_attack": {
"priority": 0,
"attack_once": false,
"reach_multiplier": 3,
"track_target": true,
"attack_duration": 0.75,
"hit_delay_pct": 0.5,
"melee_fov": 90,
"random_stop_interval": 0
}
}
```js
"animation_controllers": {
"controller.animation.autotrooper": {
"initial_state": "idle",
"states": {
"idle": {
"animations": [
"idle"
],
"transitions": [
{
"walk": "query.ground_speed"
},
{
"attack": "query.is_delayed_attacking"
}
]
},
"walk": {
"animations": [
"walk"
],
"transitions": [
{
"idle": "!query.ground_speed"
},
{
"attack": "query.is_delayed_attacking"
}
]
},
"attack": {
"animations": [
"attack"
],
"transitions": [
{
"walk": "query.ground_speed"
},
{
"idle": "!query.is_delayed_attacking"
}
]
}
}
}
}
```js
there we go, both images are translated to code in the messages above.
delayed attack priority: 3
nope, no animation plays for the attack still. (aka. the entity stands still for the attack)
How long is your animation?
0.75 seconds
^
nothing plays? is the attack executed?
yeah the attack is executed, its just that no animation plays for it.
remove the "walk" transition in the "attack" state
good lord its working!
it even transitions back to walk! what did i do wrong in the first place?
"query.ground_speed" is activated before your attack animation runs