Rename Expression for getting an object's current frame of Animation

Greetings,

I feel like when I use composite objects (E.G. A player who’s head and body are two different objects attached together) and other various things, I think an expression to check the current frame of the animation of something would be useful.

For example, let’s say my head and body both have a “move” animation. The head will have a different animation, and when that ends, it goes back to the move animation. Except now, the animation of the body and head are out of sync, which looks kinda goofy.

If I could change the animation frame of the head to match the body’s frame, I could sync the two up.

For example:

Action: Change the animation frame of playerHead to playerBody.AnimationCurrentFrame()

I do hope that something like this could be considered, thanks

2 Likes

I experienced same problem
And i am all in for your request

Since only work around is to make some variable
Go with
Condition
Here you either need some timer or TimeDelta()

Action
Add 1 to variable
Set variable to mod(variable,number of frames)

And now you can set both your head and body current frame of animation to that variable to fake it switching frames

There’s already an expression to get the current frame of the animation of an object.
Object.Sprite()

1 Like

As insein said. There is an expression although it has a meaningless name. I wish they would rename it to something more descriptive like currentFrame()

You would need to use it with compare 2 numbers if you needed to use it as a condition.

2 Likes

I agree, the name always confused me but I guess I’m used to it now.
It would make sense to be similar to the other animation expressions.

Object.Animation::Frame()

1 Like

@Keith_1357 @insein OW MAH GWAD

2 Likes

@insein @Keith_1357
No way, I tried it and it actually works now. I had no idea this was in the game!
In that case, I agree, I’d like to change my suggestion to change the name to something more intuitive.
Thanks!