Skip to content

u/Clayrone

In this archive from Oct 2020 to Dec 2026

3
posts
21
comments
3
media
128
score

Top posts

Top comments

You could try something like this:
In the Bullet scene:
- add VisibilityNotifier node
- create signal and name it something like "destroyed"
- listen to VisibilityNotifier's signal "screen_exited" and in the handler function call "queue_free" and emit "destroyed"

In the scene that spawns bullets
- move "b" variable outside of the shoot function and initialize value as null (lets rename it to "bullet")
- in shoot function only spawn bullet on the condition "if not bullet:"
- when bullet is spawned assign it to "bullet" variable and subscribe to it's "destroyed" signal
- in the "destroyed" handler function then set bullet = null

5 points

Subreddits

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.