#how can i detecet a ranged attack then is plays an animattion
1 messages · Page 1 of 1 (latest)
I'm interested in that too
query.facing_target_to_range_attack && query.is_charged
no luck
@hollow granite it doesn't work
"format_version": "1.19.0",
"animation_controllers": {
"controller.animation.unknown.new": {
"initial_state": "none",
"states": {
"none": {
"transitions": [
{"red": "query.has_target"}
],
"blend_via_shortest_path": true
},
"red": {
"animations": ["red"],
"transitions": [
{"blue": "query.facing_target_to_range_attack && query.is_charged"},
{"none": "!query.has_target"}
],
"blend_via_shortest_path": true
},
"blue": {
"animations": ["blue"],
"transitions": [
{"none": "!query.has_target \n"},
{"red": "!query.facing_target_to_range_attack && query.is_charged && query.has_target \n"}
]
}
}
}
}
}```
?query.facing_target_to_range_attack
Full list of queries: https://bedrock.dev/docs/stable/Molang#List of Entity Queries
Better explanation for some queries: https://wiki.bedrock.dev/documentation/queries
my entitey does not use a bow
What are you using to shoot the projectile?
That's exactly what the query checks for idk
well it not work
"priority": 0,
"attack_interval_min": 1,
"attack_interval_max": 3,
"attack_radius": 15,
"burst_shots": 10,
"burst_interval": 0
},```
and that works in game?
try just query.facing_target_to_range_attack without query.is_charged
that ran when it has a target... ialready tried it
please @hollow granite
is it possible?
yeah I've made entities play shooting animations before with that query before
thats play once
no loop thing nedded
that is the loop thing? It makes the animation stay on the last frame once the animation is over, this allows for blending between animaitons
still nope
send the client entity file, server entity file and animation controller
zip
please
@hollow granite here it is
gotta go bye please make the blue fire when its attacking and red when it has a target
@hollow granite have u fixed it
Yeah
"format_version": "1.19.0",
"animation_controllers": {
"controller.animation.unknown.new": {
"initial_state": "none",
"states": {
"none": {
"transitions": [
{
"red": "query.has_target"
}
],
"blend_via_shortest_path": true
},
"red": {
"animations": [
"red"
],
"transitions": [
{
"blue": "query.facing_target_to_range_attack && query.is_charged"
},
{
"none": "!query.has_target"
}
],
"blend_via_shortest_path": true
},
"blue": {
"animations": [
"blue"
],
"transitions": [
{
"none": "!query.has_target"
},
{
"red": "!(query.facing_target_to_range_attack && query.is_charged) && query.has_target"
}
]
}
}
}
}
}```
what was wrong
ranged attack component
I have yet to see what's the use of q.facing_target_to_range_attack lol