#Trying to make Idle / Walking / Running animations for an entity, wont work.
1 messages · Page 1 of 1 (latest)
@strange cairn I'm going to correct that part for you, it's not very difficult to understand.
yeah i really suck at animation controllers tbh
thanks
{
"format_version": "1.10.0",
"animation_controllers": {
"controller.animation.agito.movement": {
"initial_state": "static",
"states": {
"static": {
"animations": [
"static"
],
"transitions": [
{
"move": "query.modified_move_speed > 0 && query.modified_move_speed < 0.3"
},
{
"sprint": "query.modified_move_speed >= 0.3"
}
]
},
"move": {
"animations": [
"move"
],
"transitions": [
{
"static": "query.modified_move_speed == 0"
},
{
"sprint": "query.modified_move_speed >= 0.3"
}
]
},
"sprint": {
"animations": [
"sprint"
],
"transitions": [
{
"static": "query.modified_move_speed ==0"
},
{
"move": "query.modified_move_speed > 0 && query.modified_move_speed < 0.3"
}
]
}
}
}
}
}
thanks alot, I'll test it right now and lyk if it works
Although I think adding a value to query.modified_move_speed doesn't work well, I think I tried it once and it didn't work, why the speed change?
Basically I wana make it so it can walk normally but when its chasing an entity it will do the run animation
Ok to do that there is a more reliable way. but try to try that
Yo btw it works but the static / idle animation isnt playing
Thats the only anim that wont play, the running and walking anims play, is there a problem with it or.. idk
If it doesn't work very well like that, I'll write you one that works without fail.
Alright thanks, I really hope this works ive been trying for so long now 😭
there correct some mistakes made in this message, try to test that while
yea il test rq
{
"format_version": "1.10.0",
"animation_controllers": {
"controller.animation.agito.movement": {
"initial_state": "static",
"states": {
"static": {
"animations": [
"move"
],
"transitions": [
{
"move": "query.ground_speed>0.1&&!query.has_target"
},
{
"sprint": "query.ground_speed>0.1&&query.has_target"
}
]
},
"move": {
"animations": [
"move"
],
"transitions": [
{
"static": "query.ground_speed<0.1"
},
{
"sprint": "query.ground_speed>0.1&&query.has_target"
}
]
},
"sprint": {
"animations": [
"sprint"
],
"transitions": [
{
"static": "query.ground_speed<0.1"
},
{
"move": "query.ground_speed>0.1&&!query.has_target"
}
]
}
}
}
}
}
OK, that should work
it sort of works the main problem is the idle animation (static) isnt playing at all, when its still itll just play the base walking animation instead
is there something wrong with my entity's code possibly?
did you try this?
yeah i just tried that
same thing happens idk its weird
ah I saw it, yes there is an error in your entity, in the script just leave the animation controller
this?
I changed that a bit ago ngl
yes
I saw it in another post and I saw mine was incorrect
lol
the only animation that isnt playing is the idle one (the 'static' one) which is weird
It's really not very difficult, something must be interfering, there is no command block executing the animation
nah theres no command blocks involved, the one I placed in the video was to keep it still to see if the idle anim played
{
"format_version": "1.10.0",
"animation_controllers": {
"controller.animation.agito.movement": {
"initial_state": "static",
"states": {
"static": {
"animations": [
"static"
],
"transitions": [
{
"move": "query.ground_speed>0.1&&!query.has_target"
},
{
"sprint": "query.ground_speed>0.1&&query.has_target"
}
]
},
"move": {
"animations": [
"move"
],
"transitions": [
{
"static": "query.ground_speed<0.1"
},
{
"sprint": "query.ground_speed>0.1&&query.has_target"
}
]
},
"sprint": {
"animations": [
"sprint"
],
"transitions": [
{
"static": "query.ground_speed<0.1"
},
{
"move": "query.ground_speed>0.1&&!query.has_target"
}
]
}
}
}
}
}
I was wrong in a word and I changed it
oh which one was it
.
move==> static
XD
its still only doing this 😭
it's not possible
you didn't change it
{
"format_version": "1.10.0",
"animation_controllers": {
"controller.animation.agito.movement": {
"initial_state": "static",
"states": {
"static": {
"animations": [
"static"
], "blend_transition":0.2,
"transitions": [
{
"move": "query.ground_speed>0.1&&!query.has_target"
},
{
"sprint": "query.ground_speed>0.1&&query.has_target"
}
]
},
"move": {
"animations": [
"move"
], "blend_transition":0.2,
"transitions": [
{
"static": "query.ground_speed<0.1"
},
{
"sprint": "query.ground_speed>0.1&&query.has_target"
}
]
},
"sprint": {
"animations": [
"sprint"
], "blend_transition":0.2,
"transitions": [
{
"static": "query.ground_speed<0.1"
},
{
"move": "query.ground_speed>0.1&&!query.has_target"
}
]
}
}
}
}
}
That's how it has to be, also add blend transition so it's not a rough change
did I not? idk leme use that rq
@twilit herald YES it works but also one thing do you think you could make another version with the same format as before without the !has_target things, because I wanted to make another entity that I can control when it walks slowly, so I can give it speed to make it play the sprint animation and I can give it slowness to make it walk slowly (basically using the ground_speed stuff) I hope thats not too much to ask and thank you alot 🙏 👍 🔥
I hope im not being a pain lol
I'm not sure it works but oh well
its worth a shot
{
"format_version": "1.10.0",
"animation_controllers": {
"controller.animation.agito.movement": {
"initial_state": "static",
"states": {
"static": {
"animations": [
"static"
],
"blend_transition": 0.2,
"transitions": [
{
"move": "query.ground_speed>0.1&&query.ground_speed<0.3"
},
{
"sprint": "query.ground_speed>0.3"
}
]
},
"move": {
"animations": [
"move"
],
"blend_transition": 0.2,
"transitions": [
{
"static": "query.ground_speed<0.1"
},
{
"sprint": "query.ground_speed>0.3"
}
]
},
"sprint": {
"animations": [
"sprint"
],
"blend_transition": 0.2,
"transitions": [
{
"static": "query.ground_speed<0.1"
},
{
"move": "query.ground_speed>0.1&&query.ground_speed<0.3"
}
]
}
}
}
}
}
K so this works but I feel like something with the speed count is different, it only plays the walking animation if i give it like ALOT of slowness (like slowness 4) other than that it works Imma try to change up the numbers a bit to see if i can change this
Of course, like I told you, that's not very precise, try it, I gave up on that.
ooo i got an idea maybe
so since I wanted to be able to choose when to make it slow and when to make it fast
would has_tag work?
idk how id use has_tag in an animation controller tho tbh
you can use properties, mark_variant, variant
I really don't know what system you use to change speeds.
{
"format_version": "1.10.0",
"animation_controllers": {
"controller.animation.agito.movement": {
"initial_state": "static",
"states": {
"static": {
"animations": [
"static"
], "blend_transition":0.2,
"transitions": [
{
"move": "query.ground_speed > 0.1 && !query.has_tag('sprinting')"
},
{
"sprint": "query.ground_speed > 0.1 && query.has_tag('sprinting')"
}
]
},
"move": {
"animations": [
"move"
], "blend_transition":0.2,
"transitions": [
{
"static": "query.ground_speed < 0.1"
},
{
"sprint": "query.ground_speed > 0.1 && query.has_tag('sprinting')"
}
]
},
"sprint": {
"animations": [
"sprint"
], "blend_transition":0.2,
"transitions": [
{
"static": "query.ground_speed < 0.1"
},
{
"move": "query.ground_speed > 0.1 && !query.has_tag('sprinting')"
}
]
}
}
}
}
}
tried to change it so I give it a sprinting tag
but it only plays the idle anim lol
did i do something wrong ☠️
idk, i dont use that stuff often I like to do entity code in functions
I see, the options are limited
is this wrong btw
that is used in blocks and items
oh u cant use tags in animation controllers?
Im sure you know but
If there’s something tag related use a score instead
That could work
how would I change this to work with a score instead?
You can try it, but in the description it says that it is only used in blocks, and I think it is also used in items
do you know how I would?
scores do not sync well with the resource pack
Oh
o
well how would I make it so that the entity starts sprinting when I want it to then
query.scoreboard('example')==0
Yeah like that
K i'll try that
If heroic has some type of detect add-on stuff going then when the entity has 1 on the detectors sprinting scoreboard set 1 to yours
You seem to be quite experienced in entitys, so if you can i have a request
this doesnt work btw
{
"format_version": "1.10.0",
"animation_controllers": {
"controller.animation.agito.movement": {
"initial_state": "static",
"states": {
"static": {
"animations": [
"static"
], "blend_transition": 0.2,
"transitions": [
{
"move": "query.ground_speed > 0.1 && query.scoreboard('sprint') == 1"
},
{
"sprint": "query.ground_speed > 0.1 && query.scoreboard('sprint') == 1"
}
]
},
"move": {
"animations": [
"move"
], "blend_transition": 0.2,
"transitions": [
{
"static": "query.ground_speed < 0.1 || query.scoreboard('sprint') != 1"
},
{
"sprint": "query.ground_speed > 0.1 && query.scoreboard('sprint') == 1"
}
]
},
"sprint": {
"animations": [
"sprint"
], "blend_transition": 0.2,
"transitions": [
{
"static": "query.ground_speed < 0.1 || query.scoreboard('sprint') != 1"
},
{
"move": "query.ground_speed > 0.1 && query.scoreboard('sprint') != 1"
}
]
}
}
}
}
}
I think your good but see what spartan says
yeah thats what ive tried to do but it doesnt work
i used scoreboards like he sent
Oof
but it doesn't work with the resource pack, if you want it to work you need to use this command
scoreboard objectives setdisplay sidebar example
really the easiest way is to use mark variant
I just thought of a way I can do it (btw same person speaking here)
See I wanted the entity to spawn in and slowly walk towards the player for a good 10 seconds like menacingly, so i ma just make a 10 sec animation that plays for that instead
Anyways @twilit herald Thanks alot for the help with the anim controller, Ima be using that cuz it works 👍
ahh.. if you want to do that there is a better way to do it using "query.get_nearby_entities(3, 'minecraft:player')"
nah it should work well
3= distance