#Need help with a sniffing animation (Resolved)
1 messages · Page 1 of 1 (latest)
Can anyone help me with this?
wdym by sniff?, like the sniffer or just plays a sniffing animation
I want the rat to sniff at a random time when in idle
ok that's actaully so simple, do you have some experience with entities bp?
a bit
do you know what a timer is and what a mark variant is?
nope, haven't gotten there yet
alr, that's ok
I am going to teach you
ok
are you fimilair with events?
yes
alright create an event
called "minecraft:entity_spawned"
make it add a group component called "rat_idle"
add make one for it
ok
is everything understood so far?
nearly
if you didn't get something pls don't be shy about it and tell me
ok wait I think I know what to do give me a sec
alright tell me when you are finished (mention me)
ok
@zinc steeple like this
"minecraft:rat_idle": { "add": { "component_groups": [""] }, "remove": { "component_groups": [""] } }
ahh no, wait a bit i'll send you an example
ok
i was a bit confused about the player file though
that's the right one, scroll down to events and you will find the "minecraft:entity_spawned"
add the event to your bp file and make it add the component group "rat_idle"
alright
The whole thing in event?
no, i meant the name instead of adding "bd:sensor" and the other name
replace them with "rat_idle"
oh ok
Did it, the rat uses the bp wolf btw
"events": { "minecraft:entity_spawned": { "randomize": [ { "weight": 9, "remove": {}, "add": { "component_groups": ["minecraft:wolf_adult", "minecraft:wolf_wild", "rat_idle"] } }, { "weight": 1, "remove": {}, "add": { "component_groups": ["minecraft:wolf_baby", "minecraft:wolf_wild"] } } ] },
ok wait, remove the whole "randomize" thing and instead type
"add": {
"component_groups": ["rat_idle"]
}
ok
done
"events": {
"minecraft:entity_spawned": {
"add": {
"component_groups": ["rat_idle"]
},
Well done, now for the next step
head to the component groups section and add the component group "rat_idle"
ok
done
"component_groups": {
"rat_idle" : {},
sorry, i was busy
alright for the next step
"minecraft:variant":{
"value": 0
}
add this in "rat_idle": {}
||@astral phoenix ||
done
"component_groups": {
"rat_idle" : {
"minecraft:variant":{
"value": 0
}
},
"minecraft:timer":{
"looping": true,
"randomInterval":true,
"time": [0.0, 0.0],
"time_down_event": {
"event":"minecraft:times_up"
}
}
now this is the timer component
ok
but it has to be modified
alright
first, change the event in "time_down_event" to "rat_sniff"
secondly, choose your random time you want
the first value is the min random and the last is the max value
then added to the component group "rat_idle"
for now, i'd recommend using low values such as 5.0 or 3.0 just to test it
ok
"component_groups": {
"rat_idle" : {
"minecraft:variant":{
"value": 0
},
"minecraft:timer":{
"looping": true,
"randomInterval":true,
"time": [5.0, 3.0],
"rat_sniff" : {
"event":"minecraft:times_up"
}
}
},
ok, leave "time_down_event" as it was and instead change "minecraft:times_up" to "rat_sniff"
oh my bad
done
very well, now head again to the events section and make an event called "rat_sniff"
and make it add the component group "rat_sniff" and make it remove the component group "rat_idle"
hey, i gtg, i am going to come back after some time
you could just do this in animations
||@astral phoenix || Ok , I came back
Really?, note that he want it to play at random times
ok
alright, did you do what i mentioned?
Yupe
"component_groups": {
"rat_idle" : {
"minecraft:variant":{
"value": 0
},
"minecraft:timer":{
"looping": true,
"randomInterval":true,
"time": [5.0, 3.0],
"time_down_event": {
"event":"rat_sniff"
}
}
},
oh no, i am talking about "events" section where you put "minecraft:entity_spawned"
make another event there and name it rat_sniff
and make it add the component group "rat_sniff" and make it remove the component group "rat_idle"
ok
done
"minecraft:rat_idle": {
"add": {
"component_groups": ["rat_sniff"]
},
"remove": {
"component_groups": ["rat_idle"]
}
}
okey just change the event name to rat_sniff
"rat_idle": {
"add": {
"component_groups": ["rat_sniff"]
},
"remove": {
"component_groups": ["rat_idle"]
}
}
"rat_sniff" I said 😂
🤦♂️ my bad
it's ok
ok, now I got it
"rat_sniff": {
"add": {
"component_groups": ["rat_sniff"]
},
"remove": {
"component_groups": ["rat_idle"]
}
}
execellent, now head again to the component groups section
and add a component group called "rat_sniff"
add the same components you used for rat_idle
ok
"component_groups": {
"rat_idle" : {
"minecraft:variant":{
"value": 0
},
"minecraft:timer":{
"looping": true,
"randomInterval":true,
"time": [0.0, 0.0],
"time_down_event": {
"event":"minecraft:times_up"
}
},
"rat_sniff" : {},
oh wait change "minecraft:times_up" to "rat_sniff"
ok
"minecraft:variant":{
"value": 1
},
"minecraft:timer":{
"looping": true,
"time": 1,
"time_down_event": {
"event":"rat_idle"
}
}
add this to "rat_sniff"
Yupe
"component_groups": {
"rat_idle" : {
"minecraft:variant":{
"value": 0
},
"minecraft:timer":{
"looping": true,
"randomInterval":true,
"time": [0.0, 0.0],
"time_down_event": {
"event":"rat_sniff"
}
},
"rat_sniff" : {
"minecraft:variant":{
"value": 1
},
"minecraft:timer":{
"looping": true,
"time": 1,
"time_down_event": {
"event":"rat_idle"
}
}
},
also how long is the sniffing animation?(like how many seconds till it ends?)
3.5 length
alright only 2 steps are left
ok then change the time value in "rat_sniff" to 3.75
done
alright now head to events section and an event called "rat_idle"
Just like this
"rat_idle: {
"add": {
"component_groups": ["rat_idle"]
},
"remove": {
"component_groups": ["rat_sniff"]
}
}
||@astral phoenix ||
i see
"rat_sniff": {
"add": {
"component_groups": ["rat_sniff"]
},
"remove": {
"component_groups": ["rat_idle"]
}
},
"rat_idle": {
"add": {
"component_groups": ["rat_idle"]
},
"remove": {
"component_groups": ["rat_sniff"]
}
}
very well, send the whole bp file now(just to check if everything is done right)
ok, you had some unrelated mistakes so i fixed them
here is the fixed file use it @astral phoenix
ty
ok time for the final step
go to your animation controller file you sent at the beginning
ok
go to idle in states
to transitions
from
{"sniff": "v.idle >= 10.0"}
to
{"sniff": "q.variant == 1"}
ok
now, if everything was done correctly, it should work in game
wait... Its a missing_state
? wdym
it wont work right?
idk what you mean by it's a missing_state
just replace this with your current animation controller
@astral phoenix and afterwards head to minecraft and test it
Oh then I probably messed around if it after posting
perhaps
well I fixed it
okay very well, just test it now, and hopefully it will work fine
ok
it seems that when I hit the entity it floats up in the air
but is everything else works?
so only when hitting it, it acts wierd?
are all animations works fine?
yes and it has something to do with the bp file
yes it was doing the moving animation when floating in the air
hmm, can you send a video?(maybe i can understand what's really happening)
sure
@zinc steeple
hmm....
i foung "physics" empty in the bp so it's most likely the reason
ok
ok
didn't fix it
still the same problem?
hmmm...
was it like this before i came to you?
nope
ok
it is
so now do I have to wait until it does the sniff animation?
alright, is the sniffing animation working now?
yes around 3, 5 seconds if it didn't most likely we did something wrong
it doesn't seem like it
yeah
okay in the entity bp go to component groups to rat_idle and change the time to [7.0,10.0]
maybe the time was so low so it didn't play correctly
ok
like this "time": [7.0, 10.0],
my bad, i meant 7.0,10.0
have you waited 10 seconds?
i waited a minute
oh, can you send me your animation controller?(just to check everything is done right)
sure
and the entity rp pls
hey, are all animations doesn't work?
they do I haven't added them to the move controller yet
wydm?
replace it with the entity rp
and replace this with the animation controller
ok
is it working now?
the rat isn't playing it's animations
ahh my bad, i will sent you the fixed file for this
ok
replace it with the entity rp
All animations?
ok, gotta fix it rq
ok
ok
btw, is the sniffing animation working now?
im getting there
ahhh, k
its doing the animations but not the sniff
hmmmm
can you also send the animations file for the rat? @astral phoenix
replace the first file with thebp entity file and the second with the animation controller
ok
its doing the moving animation but not the sniffing one
hmm.........
so everything works except sniffing?
replace it with bp file
and tell me if anything happens
ok
nothing
You are welcome,
Now you know how to make a rat sniff you, i guess.......
no, not for that
But there is only one step left
I am sure you noticed that it something in chat
I will send you one last time a file that it doesn't do that.
because I wanted it to do a sniff
ik ik, i was just kidding
you know the deal
yeah, you could just do that
Well, anything else?
Im checking...
its moves while doing the sniff animation
oh, going to fix that rq
ok
ok
yupe its working, but the texture changes when doing animation
that's probably going to do with the render controller
can you also pls send the render controller file?
replace the first with the animation controller and the last with the entity bp file
@astral phoenix
yupe
It's working
Thank you so much for being here for about 3 hours straight helping me with just a sniff animation
Very well, now you know how to make a hungry rat sniffing for cheese
yes I do
it's ok, i hope what we did today make you learn more about minecraft coding
I did learn something with bp file for entites though
Btw, what addon are you making?
trying to nearly recreate this mod https://www.youtube.com/watch?v=O5e930bA4yg&ab_channel=doctor4t
Download Honkai Star Rail using my link: https://hoyo.link/a0mxCMAd and make sure to use this code: BSN2EWMHA4RP to get 50 Stellar Jades!
Time for a little party trick.
Support me on Ko-Fi or YouTube for cool perks and alpha / experimental mod access!
https://ko-fi.com/doctor4t/tiers
https://www.youtube.com/channel/UCROkFwHWMk5QeZK_LHJPu5g/joi...
that's good, that may help you in the future
I know because I dont make behavior packs
What a great passion, recreating java mods for bedrock
and is also a great way to start as a beginner
i know ty for your help making the animation work otherwise I would give up on it
happy to hear that!
Well, Good luck with the addon!
thanks