Hi all,
I have a condition, that when it reaches 7
it kicks in, as shown below:
elif failedAttempt == 7 and not progression:
playSound("neckSnap")
get_node("man/head/torso/hips/leg_l").show()
get_node("man/AnimationPlayer").play("fall")
globals.hung = true #we is dead. So we can process death stuff in messages to player
#play a timer so that we can hear the sounds, watch the animation, etc. THEN move to next scene
timer.set_one_shot(true)
timer.set_wait_time(0.6)
timer.connect("timeout", self, "_on_Timer_timeout")
timer.start()
print("timer did that thing")
_on_Timer_timeout() #go to finish screen
The function _on_Timer_timeout()
loads up the next scene, which stops anything in this scene. What I'm trying to do, as you can see, is play the sound neckSnap
and an animation called fall
before heading off to the next scene.
I don't know what's wrong with my timer, primarily because I'm not very good at all of this as yet. Can anyone see anything glaringly obvious as to why it's jumping straight to the next scene via _on_Timer_timeout()
rather than playing the sound and animation?
Thanks a tonne... Rob