#Problem with Enemy Killzone scripting

1 messages · Page 1 of 1 (latest)

grand dove
#

can we see scene tree for both slime and main game?

#

it seems like this issue happens with a signal just not connected somewhere, though it definitely works as the killzone below the map so not sure...

winged lintel
#

it looks like the func _on_timer_timeout isnt connected to any signal

#

you can connect it in the editor, but i usually link my signals in my _ready func to remind me

#

im on phone sorry so only psuedocode from memory
func _ready(): timer.timeout.connect(_on_timer_timeout)

#

if the func was connected to a signal in the editor it has this icon

grizzled canyon
#

Here’s the node tree for my game

#

And here it is for the slime

#

So I did the really great idea of starting this process over and now the killzone works on the slime, but the timer timeout doesn’t restart my scene. Here’s my script:

#

@grand dove @winged lintel

Thank you for your help so far! Sorry for my delayed response. Had a busy day.

winged lintel
#

im not sure sorry but first thing i would look at is the timer node properties, like one shot

grizzled canyon
#

Whoops I totally had a dumb moment and figured it out.

I didn’t call to start the timer in the body_entered function

winged lintel
#

nice

grizzled canyon
#

Thanks for your help!