Debugging Help (Can i search all scripts?)

Godot Version

4.2

Question

I’m kinda clueless. So i have this Area 2D, is a hitbox, which i created a few weeks ago.
The plan was: If i press the attack key the monitoring get’s activated (monitoring = true)

It worked good enough for the moment, but now i wanna change something about the timing. But i cannot find any function that’s turn the monitoring to “true” or “false” ether. I search 3-5 scripts (3 are relevant to the hitbox[Hitbox,Gobal,Player])with the search function of godot and manually, but find … nothing haha.

So now to my question: What should i do, to find out where the monitoring gets changed

Is there a way to search all scripts for one keyword (“monitoring”)?

or do you have any idea what i should do?

i tried so far:

_procress(delta):
  print("hitbox: " + str(monitoring))
if Input.action_just_pressed("Attack_key"):
  print("Attack Key pressed")

The attack function is working. The monitoring gets turn on and off.
So somewhere in my game must be line that activate this

But the input and monitoring don’t line up ether

Yes, you can search in all files:
image

3 Likes

You can search all script with “shift + command + F” on Mac I assume replace command with ctrl on other platforms.

IF you have a word selected that will be added to the find dialog.

“shift + command + r” can do find and replace as well.

Ryn’

2 Likes

Keep in mind that the file search does not operate on internal scripts.

Best to perform a search using a command line utility or whatever you have of .gd, .tscn and .tres files

What do you mean by ‘Internal Scripts’ ?

The inbuilt search has always found all occurrences of my search within the many scripts I have in my project. I always use it for find and replace in all my GD code.

Ryn

If any of your scripts attached to nodes, are marked Built-Ins then the Search > Find in Files does not look through them.

As for now it’s not possible, but on the upcoming Godot 4.3 built-in script will also be searchable. So look forward to that!

image

Good to know, thanks.

Ryn

Thanks for pointing this out. After research I found you can add different extensions in project settings. General > Editor > Script

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.