Questions tagged [gdscript]
GDScript is a high-level, progressively typed programming language designed to work with the Godot Engine. It uses a syntax similar to Python (blocks are indent-based and many keywords are similar).
170 questions
0
votes
1
answer
35
views
Godot Multiplayer Player Doesn't Spawn
Godot Version
4.5 Stable
I'm trying to create a multiplayer game. Since this is my first multiplayer game I started with a simple LAN setup.
How it is supposed to work:
When ...
1
vote
1
answer
300
views
Overriding property setter
In Godot 4.5 beta 5, I am trying to override the text setter on a Label node. Following the documentation, I did:
...
0
votes
0
answers
66
views
What am I missing to get my animation working
I use Godot 4.4 and gdscript. I have a 2D isometric character with hundreds of sprite sheets for different angles and weapon status. Its not feasible to do this in ...
0
votes
1
answer
169
views
Godot 4 chip-8 emulator not displaying font correctly
I'm making an emulator for the chip-8 using the Godot 4.3 game engine, It's almost complete and you can play pong on it perfectly fine, But it can't display numbers from the built in font.
Each ...
5
votes
2
answers
664
views
How do I make my chip-8 emulator update at the intended rate?
I'm making an emulator/interpreter for an old console called the CHIP-8 In Godot 4.3 stable. It's going really good so far, I basically just load an external ROM into a virtual RAM (a ...
0
votes
3
answers
561
views
What is the difference between only extends, class_name before extends, and class_name after extends?
I am having trouble understanding the syntax in GDScript, specifically the use of class_name and extends.
I often come across ...
0
votes
1
answer
139
views
Logic problem for respawn player in godot
I am new to game development and Godot. The code is gathered from multiple tutorials and now i am stuck. It almost seems to work but my problem is the respawn mechanism. Maybe someone can have a look ...
1
vote
1
answer
163
views
How do I make these nested match statements easier to read?
Still coding that awesome Turn based RPG.
I'm currently coding the logic for firstly selecting the attack then selecting the enemy (Or enemies)
...
0
votes
1
answer
195
views
How to use tweens to spin a wheel clockwise in Godot Engine?
How can I spin a roulette wheel in a clockwise direction using a tween?
I've successfully managed to rotate counter-clockwise to the exact segment, but changing the direction to go clockwise is still ...
0
votes
0
answers
150
views
Momentum on a Kinematic Character Controller Does Not Work with Jolt 3D
After a long time, I’ve finally figured out how to add momentum to my Kinematic Character Controller in Godot 4.
Before: https://youtu.be/sPl-uA7OZ0Y
After: https://youtu.be/JvywZp5sQc8
In other words,...
1
vote
0
answers
400
views
Return null or string in gdscript
I want a function that can return something, or not, in gdscript
func test() -> String | null:
return null if random() > 0.5 else "hi"
The syntax ...
0
votes
1
answer
135
views
How to add water material below sea level in procedural terrain?
I'm trying to create procedurally generated terrain, it works but it just uses simple textures. The lower area below sea level I want to add a water material instead of a simple texture. How can I ...
0
votes
1
answer
98
views
Custom signal does not work in pause menu
I have the following pause menu script:
...
0
votes
1
answer
91
views
CharacterBody2D knockback not being applied in the correct direction
I'm having a problem with CharacterBody2D knockback in Godot 4.3 stable.
I'm creating a game where enemies (CharacterBody2D) can ...
1
vote
0
answers
65
views
"Node not found" when using Third Person Controller plugin in Godot
I'm trying to add a 3rd person plugin for Godot 4.2. It's my first game using Godot so I'm fairly new to it. I'm guessing I'm just doing something wrong.
I'm trying to use this Third Person Controller ...
2
votes
1
answer
81
views
Escape Block Textures Not Loading After Leaving First Room
Godot Version: v4.2.stable.official [46dc27791]
I am trying to have an escape block with a TextureRect that has two different textures--an animated one where it's ...
0
votes
2
answers
168
views
How to synchronize NPCs across LAN?
As of now, players are synced using:
...
1
vote
0
answers
101
views
Game published for web freezes for 2-3 seconds the first time an explosion effect triggers
Using Godot 4.2.1
when exporting my game to HTML5 it runs completely fine until an explosion effect is spawned on screen for the first time when killing a mob, the game freezes for an entire 2-3 ...
2
votes
1
answer
147
views
Theme lookup in Godot 4.2
Trying to understand how theme lookup works in Godot 4.2. Suppose a Control node script has the following two lines in it:
...
0
votes
1
answer
86
views
Movement continues for diagonal movement after releasing one key
For example, if I press W key and D key, that would produce a movement in the Northeast position. However, if I release either key (meaning I am holding only W or D at the moment), the movement still ...
0
votes
0
answers
215
views
How to efficiently path many objects to a moving point?
Working in 3D in the Godot engine, I have an object that moves through space and, like a tornado, is intended to pick up objects in its path.
What I have right now is janky, effectively re-baking the ...
1
vote
2
answers
1k
views
Disable all Player input in Godot 3?
I'm making an "Asteroids" clone in Godot 3.2.3
the way that the Bullet is spawned in-front of the Player ship is simple : the main game node will find the Player node's position and rotation ...
1
vote
1
answer
186
views
remaking Pong in Godot but the opponent AI cannot locate the ball's coordinate correctly
I'm following a detailed YouTube tutorial on remaking Pong in Godot 3.0 but I have ran into an issue regarding the way the AI opponent reacts to the incoming ball, what's happening is that the ...
1
vote
1
answer
137
views
Issue with AttackArea Monitoring Before Attack in Godot 2D Game
I'm developing a 2D game where the player character can attack enemies using a designated attack area (Area2D node named AttackArea). I've encountered a problem where the AttackArea is active and ...
0
votes
2
answers
103
views
How do I save data for multiple things sharing the same script?
I have level 0 rusted sword, then I upgrade it and save my game.
I implemented my save system by following Godot tutorials. But with this approach, after exiting and re-launching the game, all rusted ...