675 questions
0
votes
0
answers
57
views
How do I make an in-app purchase a consumable in Godot 4.5?
I am using Godot 4.5 with the GodotGooglePlayBilling 3.1.0 Release for my android game app. I was able to make the in-app purchase work with connecting to the Google Play Store. I was also able to buy ...
0
votes
0
answers
24
views
How to scale text dynamically?
Godot Version
v4.5.1.stable.official [f62fdbde1]
Question
I have a Label node "DisplayWord" that shows the word the user typed. Therefore it could be anything from 'Cat' to 'Asphyxiation'.
I ...
Best practices
0
votes
2
replies
55
views
Godot for web: multiple pck, one engine init?
Question
I’m re-developing an old website where there was flash games in it. I redeveloped some games, all under godot, and I rebuilt Godot from source to disable unwanted modules (like 3D physics for ...
Best practices
1
vote
1
replies
57
views
How do I detect collision with control node in Godot?
my card scene tree
I want to make a card game where player can stack cards on top of each other (like Solitaire or Stacklands). I have a control node as the root node and Sprite2D as the child node. ...
0
votes
0
answers
30
views
Player Physics are not functioning
I'm new to Godot and following Brackey's Tutorial on how to get started. After I finished it, I started editing it and adding new tutorials. Today, halfway through editing the coin script, my player ...
Best practices
1
vote
1
replies
76
views
Exporting a pair of values as a minimum/maximum
I'm writing a script in GDScript; I'd like to export a pair of values, e.g min_height and max_height. Obviously, I want min_height <= max_height.
Is there a way to enforce that relationship in the ...
1
vote
1
answer
74
views
How to reset sequence playback index in Godot AudioStreamRandomizer
I am using an AudioStreamRandomizer with playback mode = Sequential to play a few dozen sound files. When I play the audio stream, I get the next sound in the sequence, but the starting index is ...
0
votes
0
answers
53
views
Rendering issue with procedural world generation in Godot 4
I have a really weird issue with rendering chunks in my Godot 4 (4.3.1) world generation implementation, when zooming really close, some chunks start to disappear (but they are still 100% loaded, ...
0
votes
1
answer
110
views
How do I add more enemies in my Godot project?
I'm working on my school project about my first top down shooting game. Anyway after I did my project by following a tutorial from youtube I desire to add more enemies. But I've no idea how to do it?
...
1
vote
0
answers
65
views
System.AccessViolationException occurs when running a C# Godot unit test for Node2D object
I am building a card game using Godot 4.5, with C#. I am trying to unit test a Card object that inherits from Node2D, but when I attempt to run the test, I get the following exception:
Exception has ...
0
votes
0
answers
78
views
RenderingServer cannot access global shader params
in Godot 4.4.1 I'm trying to access shader variables in code to do some math for my game. However, Even though I have set these shader parameters in global/shaders in project settings they don't show....
0
votes
1
answer
122
views
Input from combined 2D and Control nodes
In Godot 4.5, I have an Area2D with a CollisionPolygon2D to make a complex-ish shape on screen clickable, and also update mouse pointer when entered/exited (arrow to hand and vice versa). This works ...
0
votes
0
answers
54
views
Godot apksigner error - all 'apksigner' tools failed to execute
When exporting the project to Godot 4.2.2 for Android, I encountered the error: [Code signing] All 'apksigner' tools located in the Android SDK 'build-tools' directory failed to execute. Please check ...
1
vote
0
answers
69
views
Jittery movement in tilebased Pokemon-like movement system
I tried creating a tilebased movement system in Godot similar Pokemon, however I get jittery effects after a while of moving around
Here is my Player Script handling inputs and state transitions:
...
0
votes
0
answers
99
views
GODOT Pixel font has extra pixel of spacing
I am making a pixel mobile game, and using a 3x5 pixel font. But Godot is adding a pixel of spacing around and I cant figure out why. Is this something to do with the font, or is there a Godot setting ...
0
votes
1
answer
45
views
Error when loading FBX file in EditorImportPlugin - how to load fbx files?
I am trying to create an EditorPlugin/EditorImportPlugin to import fbx files. More specifically I want to extract the animations from the files and save them as a .res file.
Normally I go over the ...
1
vote
2
answers
73
views
Issues with sequential cooldown
I've been attempting to make a system in which you can use an ability with 3 charges. Once you use one, Only that one will recharge, When you use another, The recharge progress from the first will go ...
0
votes
1
answer
142
views
How do I assign properties to tiles using TileMapLayer?
I’m working on a top-down rpg.
Basically all I need to know is how to write scripts for specific tiles or tilesets. I know that by simply "painting" the physics layer on a tile, I can make ...
0
votes
1
answer
90
views
Issue when rotating around multiple axes
I am trying to replicate how the Hadamard gate works. I have a system consisting of a sphere with a cylinder attached, and I would like to rotate the whole system by 90 degrees around X and then by ...
1
vote
1
answer
118
views
Why does comparing array.size() with a const return an Object, not a bool?
So I’m running into an issue while implementing an ‘undo’ mechanic in Godot Engine v4.4.1 using GDScript. I’m trying to limit the size of the undo queue, and cut off the end once it exceeds the limit.
...
0
votes
1
answer
170
views
Godot 4.4 get_tree().change_scene_to_file("res://scene.tscn") Not Switching to the Intended Scene
I don't know why this isn't working because after looking at the GDScript documentation, and even other posts on stack overflow, I still can't get the scene to show up at run time.
extends Control
#...
0
votes
1
answer
51
views
My inventory is malfunctioning (in Godot)
I've been programming an inventory system. When I created the function to drag objects from one slot to another, I've been stuck even after some research. At first, objects are dragged, but the ...
2
votes
1
answer
152
views
Instancing in Godot
How big is the difference between instancing a scene with c# compared to GDScript? I noticed on the docs that it does say that when instancing a scene "Preloading the scene can improve the user's ...
0
votes
3
answers
124
views
Dynamically update CollisionPolygon2D at runtime? [closed]
I have a stacked area chart like the supplied image (but often slightly more complex).
Each polygon doesn't have all too many points and renders efficiently.
This chart often updates with a tween ...
1
vote
2
answers
111
views
Flashlight Turn OFF
There is a code of Flashlight with Battery in Godot 3D that turns ON when you press Left Mouse Button, but turns OFF the moment you release the button.
How do I make it turn OFF, ONLY after pressing ...
0
votes
0
answers
62
views
'Nephew' node null in 'Uncle' node's export variable despite being assigned in inspector
My Player scene has a StateMachine node governing its behavior, with Idle, Move, Fall nodes as children under StateMachine. Another node, FallDownPit, listens for a signal telling it the player has ...
2
votes
1
answer
64
views
Why won't my godot 3d movement controller work?
I made this movement controller using a tutorial and made some changes. It should capture the camera at start. Now when I run it the mouse isn't captured and the movement doesn't work. I'm new and ...
1
vote
1
answer
101
views
Godot 4.4.1 C# Error 'no suitable method found to override'
In Godot, I get the error 'no suitable method found to override' for the default _Ready() function.
using Godot;
using System;
public class Box
{
public enum BoxType
{
//HURT_BOX,
...
0
votes
1
answer
211
views
High level multiplayer not working in Godot 4.4.1
I can't make the multiplayer work correctly, either when I enter the game with the client the client player despawn almost instantly, in both the host session and the client session and I get this ...
0
votes
2
answers
81
views
When I use pick_random on my array, how can I prevent picking the same element twice?
I'm working in something on godot engine 4. I create code to spawn objects in different parts of the screen. But I try to prevent to generate items in the same coordinates twice.
How I can do it?
...
0
votes
1
answer
98
views
How to connect to a Timer timeout signal on Godot engine with Lua GDExtension
Here is a simple script attached to a Node2D that i try to connect a timer timeout without success:
local test = {
extends = Node2D,
}
function test:_ready()
function ...
0
votes
0
answers
70
views
Godot Android Plugin: Engine.has_singleton(_plugin_name) returns false
I'm trying to build an Android App using Godot. Since I need a specific Android Library I tried creating a Godot Android Plugin following the official template.
For the library I had to update the ...
0
votes
1
answer
57
views
How do i get a characterbody3d to change their node path to another characterbody3d?
I am making a 3d multi-player horror game. My monster(characterbody3d) is using pathfinding to go to a certain area in the map. It does this by having an exported variable.
@export var player_path: ...
1
vote
1
answer
56
views
Is there a problem with calculating triangle area using two vectors instead of three points?
I looked up calculating the area of triangle given three vertices.
func calculate_area_of_triangle(a: Vector2, b: Vector2, c: Vector2) -> float:
return abs((a.x * (b.y - c.y) + b.x * (c.y - a.y)...
0
votes
1
answer
91
views
How to make player lose only one life when hitting many spikes at once?
I have been working on a project in Godot 4.4.1 (a 2D platformer) and have added some spikes for the player to jump on; if you touch a spike, you lose a life.
The problem is that if there are two ...
0
votes
2
answers
281
views
Handle Control losing focus between button press and release events
I'm making a small game with Godot, and the player can keep some panels on top of the game display while playing, for easy access to some actions.
The panel is a Control node, and it could appear on ...
0
votes
1
answer
117
views
Can't connect to MariaDB in godot
I'm trying to connect to my local database on godot, and the _connect_to_dv_srvr() function does not return any errors. But once I try to create a connection instance, it returns null!
var db_general: ...
-1
votes
1
answer
272
views
Godot Android File Access
I am making a game or a simulator that has a feature where user can load image file and music files, every thing works fine in my windows os and in editor, but the want to make it work for android ...
0
votes
1
answer
196
views
Godot 4, How get the first txt file of a external directory to my game
I tried to read the first text file of my "Download" dir in my godot game but I can't make it works. How I can take only the first text file of a dir and then display the text of the file on ...
0
votes
1
answer
122
views
Mutating a config file in Godot overrides the whole file
I am trying to use a config file to keep track of some stats between levels so I can display scores on the level select screen. I initialize the stats to default variables when the game starts, then ...
0
votes
0
answers
72
views
Project 3D Models and Shadows into 2D in Godot 4.4.1
I'm trying to make a nearly 100% 2D game in Godot 4.4.1, but with 3D miniatures on the game "board":
I've got this prototyped, but with one issue that I can't seem to solve. I want the ...
0
votes
0
answers
68
views
Fix NPC node not approaching the player with NavigationAgent2D and Region2D in Godot
I am currently learning how the NavigationAgent2D and NavigationRegion2D nodes work in Godot, and I've made some progress on it so far by building NPCs. However, after setting up all the appropriate ...
0
votes
1
answer
142
views
gdscript local classes: Access class given instance in Godot 4
If I have an instance of a class B which is defined locally, is there any way to access B (as a variable) using that instance?
class B extends A:
pass
# example
func is_subclass(sub: A, sup: A) -&...
0
votes
1
answer
77
views
How to check if an AABB is visible to the camera in Godot 3D (for LOD terrain)?
I'm working on a LOD terrain system in Godot 4.4 where the terrain is divided into quads. Each quad has an AABB, and I want to check if that AABB is inside the camera’s view before subdividing it for ...
1
vote
1
answer
92
views
Moving without pressing keys using modified godot 3d basic script
I have made a simple building system on a godot 4.4 3d project. It uses the base movement system with one or two modifications. Currently the player is just heading towards where ever the mouse is ...
0
votes
0
answers
88
views
How do I handle item rotation in a resident evil 4 inspired inventory system?
So I have created an inspired resident evil 4 inventory where items can take more then one slot, the problem I am facing is figuring out how to rotate the item in the data and also visually, I have ...
0
votes
1
answer
156
views
Godot rename files outside editor
Please suggest a set of actions for renaming files outside the editor. The goal is to add obfuscation to the project.
My current actions:
Duplicating the entire project into a separate folder
...
1
vote
0
answers
41
views
Why is my Topbar and Sidebar anchoring incorrectly in Godot 4? Should UI nodes be children of Background?
I'm building a UI in Godot 4 where I have a Main scene with the following nodes: Background (ColorRect or TextureRect. I have tried both), Topbar (HBoxContainer), Sidebar (VBoxContainer), CanvasArea (...
0
votes
1
answer
68
views
Godot on linux cant find Java sdk when trying to export APK, despite correct configuration?
Im running Godot 4.3 on linux and I'm trying to export an APK. Ive been following the documentation.
I'm getting an error saying Godot cant find the java command, however I'm pretty sure it's ...
0
votes
0
answers
101
views
How to merge Godot4 terrains in Tilesets?
I managed to build my terrain set with two terrains, gray and green. They each have their own atlas (green is just recolored gray for now) and I set up the tiles and their individual terrain ...