#Cannot call Timer on a null method
1 messages · Page 1 of 1 (latest)
This is not what my scene is supposed to look like
this is my scene
Here is my full code
What I am currently trying to achieve is using a State Machine to determine if the player is walking, running or is in idle position. The player automatically stays in the IDLE state when standing still. When the player is moving in a direction, they are in the WALKING state and their walkspeed is set to 4.0. After Run_Timer countdown ends(1.0 seconds), the player is now in the RUNNING state and their walkspeed is set to 6.0. Then it is reset once the player comes to a stop.
Give me a ping if whoever can help can VC so I can stream it or I can send the files over, thanks!
Seems like godot doesn't find your node Timer, can you check the name on the tree?
this?
And you really don't see where is the problem?
Right click on your Run_Timer and set it as unique name
I set it as a unique name and I got this bug
In your script you're doing "RunTimer" instead "Run_Timer"
Obviously it won't work like that
Right here :
onready var run_timer: Timer = %RunTimer
I see. I added the _ to my variable.
Oh yeah
I though you didn't understood what i said so i repeated my self
No worries. I was able to get the scene working but I am having trouble transitioning from IDLE state to WALKING state to RUNNING state
One thing to say...
🗣️ Use AnimationTree
Idk why you try to code an animation state machine while there is a complet amazing feature called AnimationTree with animationnodestatemachine, that reduce the work by 50%
@potent cape did i help you correctly or i was a bit rude 
No worries, was able to try out a new method but thanks for the patience
Was going to rewrite my code all because I didn’t set it unique or that simple variable 💀