Godot Version
4.2
Question
Im trying to add a death sequence but the timer i set up isnt working
(code)
4.2
Im trying to add a death sequence but the timer i set up isnt working
(code)
Here are some options that may fix your issue:
death()
being called?DeathTimer
the same name as the one in the node tree?time_left
value in the _process
function to verify.DeathTimer
’s signal is hooked up to your object (in Godot) containing the _on_death_timer_timout()
method.If the above did not help, please describe your setup in more detail and the approaches you’ve tried so far.
Okay. I assume you’ve checked the other stuff I mentioned as well.
Does your dead
-variable get set anywhere?
…and when are you calling death()
?
when the players health reaches zero it gets set to true
Alright. Show that to me.
What about your death()
-function?
When is that called?
Nice. One thing fixed - unknown issues to go.
Where is your death()
-function located?
like i said it loads the timer it just doesnt count down for some reason
Sorry. I meant where is the call to your death()
-function?
I know what your issue is, I’m just trying to make you find it.
Okay - and where is that, in words, in your code?
the function? (sorry for being kinda difficult btw)
No worries. We are all beginners somewhere.
Yes. Where is the function call to death()
(the thing you circled) located in your code?
Is it inside a particular function?
No. That’s your function declaration; the place where you define your function.
Where is the call to this death()
-function?:
...
player_damage()
death()
print(@DeathTimer.time_left)
...
wdym call?
Hmm. Okay. Bear with me.
I’m gonna give you a longer reply that contains some important information along with the cause of your problem.
Give me ~10 min.