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:
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.
Yes
August 2, 2024, 7:15am
7
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!
Thanks for pointing this out. After research I found you can add different extensions in project settings. General > Editor > Script
opened 06:09PM - 04 Oct 22 UTC
topic:editor
### Describe the project you are working on
[I am working on an Untitled Sing… le-Player 2D RPG](https://bitbrain.itch.io/cave) where an adventurer explores a giant mountain area (project name: cave). The game consists of procedurally generated levels and custom built levels. All ported over to Godot 4.0! It comes with a lot of files that I am going to search (and replace) across when required:

This became especially apparent when upgrading to Godot 4.
### Describe the problem or limitation you are having in your project
After working on my game for almost 2.5 years I have **a lot** of files. Searching across all the files becomes cumbersome as it involves the following steps:
1. click on the **Script** tab (search not available in 2D/3D node view)

2. Press **CTRL+SHIFT+F** to open the "Search in files..." dialog and enter search term with a typo

3. It shows 0 results and I have to repeat the process
There are three problems for me with this approach:
**Problem 1:** too many steps to search what I want. When I am currently in a node somewhere I always have to click into the Script tab first to search across files.
**Problem 2:** search is not responsive enough. In IDEs such as IntelliJ it is possible to search and get "realtime" results for occurences. In Godot it is quite cumbersome to search because on typos or further searches I have to repeat the above steps.
**Problem 3:** only gdscript and shaders are supported. This seems to be a general limitation by Godot, as many games also come with .json, .csv or other files (e.g. translations) but I am unable to search across them.
### Describe the feature / enhancement and how it helps to overcome the problem or limitation
- Allow the search dialog to be triggered without requiring the Script tab to be active
- Show list of results in the dialog itself and let it refresh automatically after finishing typing (example from [CLion](https://www.jetbrains.com/clion/)):

- Allow searching by file extension rather than limiting it to .gd or shader (possibly requires a generic text editor view first)
### Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
From anywhere within Godot Engine, pressing **CTRL+SHIFT+R** to open a dialog like this:

Once the user starts typing a scrollable list of results appears. Clicking on any result will switch the Godot view to the Script tab and open the file and jump to the affected line.
Optionally, the user can select a file mask (perhaps dropdown or cleartext, e.g. *.txt) to search across other files.
### If this enhancement will not be used often, can it be worked around with a few lines of script?
Not really. This is a usability feature that would save myself a lot of frustration long-term.
### Is there a reason why this should be core and not an add-on in the asset library?
Most of the functionality described here is already **Core** but not streamlined from a UX perspective. This proposal aims to change that. The only optional functionality could be the filemask as non-Godot files are currently not really supported within the Godot editor.
1 Like
system
Closed
September 1, 2024, 5:58pm
10
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.