Animation setting values when it's not playing

Godot Version

4.3

Question

image

I have an “main_actor_state” variable which has a set(): on it. I then have attack animations which set the state to 1 (ATTACKING). For some unknown reason, adding property tracks to the animations to change this variable, set it to 0 ( LOCOMOTION) every frame , even when the animation is not playing, and the keyframe I add isn’t even set to 0!

As you can see there is no keyframes there. When I run the project, the output is empty ( there is a print statement in the set function )

image

But when I add a keyframe there . . .

image

This is immensely frustrating as I cannot work on the project with this issue unresolved. Any help is appreciated.

Extra Info:

These animations are inside a AnimationTree, which has two state machines, a locomotion and an attacking one. The game starts in the locomotion one. Starting the project immediately gives the results in the screenshots, no inputs necessary.

Does your state variable have a track in the RESET aimation? Can I see a little of your AnimationTree? I know they can be very aggresive with setting properties too.

My RESET track is empty,

And here’s my animation tree.

bump bump

I’ve figured out that changing the “callback_mode_discrete” property ( AnimTree - Callback Mode - Discrete ) to anything but force continous eliminates this problem. I would still like to know WHY the issue before occurred.

Should have done more testing before posting this. Turns out the main_actor_state is now only set on frame one, but the sub_actor_state is still set every frame.

Even when the animation player and animation tree are inactive, this still occurs. Somehow the mere existence of these tracks causes the issue.