#Animated blocks using bone visibility
1 messages · Page 1 of 1 (latest)
Be specific and include relevant details about the question upfront.
- What are you trying to accomplish?
- If you have code, which part is not working? Any content logs?
- What have you already tried?
- Have you searched the Bedrock Wiki?
Animated blocks using part visibility
Moving from #1067876948858118185
Yeah.
In the first code you provided you are defining 60 states, and using 1 by 1. In the second, you are defining 18 states and re-using them.
Yeah I notice the first code is inefficient
States are not permutations, but states creates permutations. The less states you use, the less permutations you have.
Let’s say you have 3 states, A, B & C
"states": {
"wiki:division": [0, 1, 2, 3, 4, 5],
"wiki:value": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
}
"condition": "q.block_state('wiki:division') == 0 && q.block_state('wiki:value') == 0"
"condition": "q.block_state('wiki:division') == 0 && q.block_state('wiki:value') == 1"
"condition": "q.block_state('wiki:division') == 5 && q.block_state('wiki:value') == 10"
"condition": "q.block_state('wiki:division') == 5 && q.block_state('wiki:value') == 11"
I just followed what your post did.
This is gonna take awhile to learn.
Instead of making
A = 1 Frame
B = 2 Frame
C = 3 Frame
You will do;
A & A = 1 Frame
A & B = 2 Frame
A & C = 3 Frame
B & B = 4 Frame
…
Just make sure to read it all and understand it, then you continue
How do I make it animated?
How to run it, I mean.
Like what you did here.
https://discord.com/channels/523663022053392405/1103295128782766142
I used minecraft:queued_ticking, but you'll use it's scripting replacement
I get done of it pretty much, so yeah thanks
Idk how to make queue ticking on specific blocks only
I'm back hahaha
So here my block have 121 states needed to be animated. -60 <-> 0 <-> 60
If I'm correct I need to divide 121 to something 16 only in one states
Like this. I use gpt, I can't access my spreadsheet I made yesterday hahahaha
Left is the divide that's starts from 0-7, and the rot that's starts from 0-15
so if I want my model to be viewed that starts from 0 it would be
q.block_state('divide:value') == 3 && q.block_state('rot:value') == 12
I just send it here for future reference 😅
For state 45 it should be
q.block_state('divide:value') == 6 && q.block_state('rot:value') == 10