0 votes

here is my code for timer.. the func onTimer_timeout() is not working for me

func onturretsbulletsbodyentered(body):
node = getparent().getnode("Player")

func deadplayernode():
playernode.getnode('Particles2D').emitting = true
playernode.getnode('character').visible = false

func onTimertimeout():

in Engine by (36 points)

2 Answers

+1 vote
Best answer

Remove the queue_free() and your code should work.

by (1,450 points)
selected by

Thank you, its working

0 votes

Attach your timer signal with the function by the following way

Select your $Timer node in scene tree. Go to nodes tab and connect the timeout signal with your function. That's It.

For more documentation see this link

by (112 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.