#URGENT HELP NEEDED : AnimationTree - state_machine ERROR

43 messages · Page 1 of 1 (latest)

crude fox
#

During the second segment of the game, if the "rope_segment" (second segment) is true, a "rope_segment_count" is incremented every second. When this count reaches ten, a "Switch_Segment" signal is sent, which ends the second segment and returns the player to the first segment. (Just for testing purposes, the second segment is kept short.)
NOW HERE'S THE PROBLEM! Upon receiving the "Switch_Segment" signal, the "ComeUp" animation should play, where the player rises from the bottom of the screen to the level at which the "scroll3" animation (the default floor scroll animation) should start playing. HOWEVER, for some reason, the transition from the "ComeUp" animation to the "scroll3" animation DOES NOT OCCUR! Instead, the animation simply freezes on "ComeUp." Interestingly, I can replace "ComeUp" with the default scroll animation immediately upon receiving the "Switch_Segment" signal, and it works fine. But it doesn't look nice and it's too abrupt. Therefore, I don't want to do it that way.

I don't know exactly what the problem is, but it seems to be related to the animation transition in the state_machine.

I've been dealing with this for a week and a half, so I would be EXTREMELY GRATEFUL to anyone who can help.

Here are the codes that may be related to the problem and a screenshot of the AnimationTree - StateMachine:

#

Please help , i've been trying to solve this problem for like a week
you can also DM me if you please

dense oyster
#

Does the animation play in the animation editor.? Check the position of the animation isn't outside of the camera @crude fox

crude fox
#

ummm

#

what ? i dont think you can check if the animation is playing during the game in the editor

#

or if you are asking if its playing at all in the editor , then of course it does

#

"Check the position of the animation isn't outside of the camera " i dont really understand what you mean by that

#

check the position of the animation isnt outside the camera ?

#

like i genuinely dont understand what you mean by that . Im not native in English and im not that experienced in godot , so can you please clarify what you meant

dense oyster
#

Yes, i will send a screenshot later. My laptop died and i am going to sleep now. From the animation editor in the inspector there you can see the position of your sprite, for each frame you made.

crude fox
#

ok

#

i'l wait

#

Yeah and just so you know , i use 3.5v of godot

#

so maybe that's why i couldnt do it

#

if you are talking about checking it here - (during the game )

#

then it doesnt work , see :

#

the animation is in progress but it does not show anything different

#

if you know a different way of checking it , il gladly wait for you

dense oyster
#

Yes tomorrow ill send something out. Or perhaps someone else will jump in before then. I am not really sure of the issue yet.

In that screenshot scroll3 is that the one that isn't playing during the game?

crude fox
#

i just took the default animation for reference ( the one that IS playing before the problem appears ) and even known it IS playing in the game , it does not show in the editor so i doubt the problematic one will show

#

so okay , i will wait , will make my third game while waiting

#

i made 2 games

dense oyster
#

Can you screenshot the one that isn't playing in the animation editor please

crude fox
#

?

dense oyster
#

... in the editor i mean while game not running

crude fox
#

it is playing

#

While game is not running all animations are playing in the editor , when it does none of them do , even the ones without the problem

#

so if you are asking if the problematic animation playing in the editor at all , yes , it does

#

but idk if it does during the game or not because again , it does not show if ANY of them are playing during the game , even the ones that clearly do

dense oyster
#

Ok

crude fox
#

but i think it does play during the game , since as you can see in the video , when i put the default animation in there instead of the one i want it to transition from , the default animation DOES play
So the problem is not that its not playing , but that its STUCK in there , it does not transition to the one i need it to transition

#

i think its prolly looping on the last frame and does not stop

#

i tried adding - auto advance at and " condition in the statemachine , put instead it just plays over and over again

dense oyster
#

Can you post the script file here and a screenshot of your scene tree please?

crude fox
#

Script file ?

#

im not coding in the visual studio or anything just so you know

dense oyster
#

Yes the .gd file that your script is in. Or copy it to a .txt file. I am having a hard time reading it in screen shot

crude fox
#

ok

dense oyster
#

Good night for now. Until later take care

crude fox
#

k

#

Someone on the official discord server of godot advised me to use tween for my floor animation instead of animation player , since he ( or she idk ) says that animation player is for repeatable animation , and tween is better for what i need , so while im learning more about tween , here is the github of the project https://github.com/EmileBowtie/NightmarerunCmp

GitHub

cmp. Contribute to EmileBowtie/NightmarerunCmp development by creating an account on GitHub.

crude fox
#

i fixed it