#Listing multiple values for anim time update

13 messages · Page 1 of 1 (latest)

inner lily
#

How can I have multiple dynamic variable declarations listed for anim time update?
I've looked online, to no avail.
I've tried both commas and newlines (tho newlines get deleted)

Does anybody know how?
Is it even possible?

finite matrixBOT
#
Welcome to the help forum!

Please make sure to read #1029468016594911232 as it may answer your question!

Once your question has been resolved, please mark the post as closed by using the </close:1163944441741049897> command.

stray blade
#

There's only one return value, but you can assign variables and calculate other stuff before:

variable.test = 2 + Math.random(2, 4);
return query.anim_time + variable.test;
inner lily
clear fossil
# inner lily I'm not quite sure what you mean..

What's your end goal?

Do you mean to use custom variables on your entity to play different animations at different paces, rather than the default "q.anim_time + q.delta_time" in anim_time_update?

inner lily
clear fossil
#

So you wanted a variable A to be set to a random value every frame, so long as another variable, query or property B returns true, to use variable A in an animation?

inner lily
#

I didn't have them as variable Placeholders, I had them under anim time

clear fossil
#

I see

inner lily
#

Ik that 'complex expressions' (expressions that contain '=' or ';') must end with ';'

I'm trying to do it from there for a few reasons, the main one being that it's just inside blockbench, and I'm not 100% familiar with how pre-animation variables in the client entity works

clear fossil
#

Ok, then you should learn how variables are defined in Bedrock entities, it's 10000x simpler than what you're attempting, and is the intended format. Animation Controllers and learning how "initialize" and "pre_animation" work is the way to go.