2,401 questions
0
votes
1
answer
74
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
32
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 ...
0
votes
1
answer
40
views
Godot inherited scene does not have script variables in editor
I'm new to Godot so I'm sure I did something wrong but I can't figure out what it could be. I created a scene "piece" and then I created 8 scenes which all inherit from piece. These are ...
0
votes
1
answer
66
views
How am I supposed to be managing instances so that I don't affect old instances of the same scene
What is supposed to happen:
5 blocks should be created above the screen and scroll down the screen at a the same speed.
Every 5 seconds, a new set should be loaded in the same place that the original ...
1
vote
1
answer
77
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
83
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
1
answer
30
views
Trouble detecting whether a line segment intersects a ray
I'm following this guide to determine whether a line segment intersects a ray. My code, adapted from the python solution on that page, looks like this:
func do_lines_intersect(line: Array[Vector2], ...
1
vote
2
answers
79
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
49
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 ...
0
votes
0
answers
52
views
Cannot create closed collision polygon dynamically
I'm having trouble creating the collision polygon for my curved lines. I'm creating it dynamically and its shape is not closed for some reason.
In my scene I have a Line2D, a Path2D, and I create a ...
1
vote
1
answer
49
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
74
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
40
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
43
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
56
views
GitHub Actions unexpected parse error when running Godot workflow
I am building a workflow using GitHub actions to automate test runs for my current Godot project. I have written two independent actions and one workflow which references them. Of these two actions - ...