Skip to main content

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).

Filter by
Sorted by
Tagged with
0 votes
1 answer
70 views

I'm adding deceleration to my player character, decreasing their velocity over time when the player releases the direction keys. With the code below, at non-perfect angles, the character seems to re-...
MyNamesRubber's user avatar
0 votes
1 answer
40 views

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 ...
Nabir14's user avatar
  • 59
0 votes
1 answer
189 views

In Godot 4.5 beta 6, I have a drag-and-drop situation where the data being moved between nodes is stored using instances of a custom resource. The resource instance is added to a property called ...
jakub's user avatar
  • 145
1 vote
1 answer
308 views

In Godot 4.5 beta 5, I am trying to override the text setter on a Label node. Following the documentation, I did: ...
jakub's user avatar
  • 145
0 votes
0 answers
64 views

Version 4.4 I am starting to learn Godot by creating a game in which my ‘Player’ scene is instantiating and adding a ‘Ball’ scene as its child on starting the game. I position the Ball at a distance ...
Prashank's user avatar
0 votes
0 answers
67 views

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 ...
Jason Crosby's user avatar
3 votes
1 answer
210 views

I'm struggling with a persistent problem in my Godot 4.4.1 project involving "power slots" arranged around a table or arena background. No matter how I structure my nodes and update my code, ...
Ishan2077's user avatar
  • 135
0 votes
1 answer
170 views

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 ...
buzzbuzz20xx's user avatar
2 votes
1 answer
420 views

Consider a situation where a coroutine in node A awaits a signal from node B. If node B gets freed without sending the signal, obviously the coroutine in node A will never finish executing. Does it ...
Carl Muckenhoupt's user avatar
5 votes
2 answers
666 views

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 ...
buzzbuzz20xx's user avatar
0 votes
1 answer
159 views

Suppose I have these two classes ...
Wouter Vandenputte's user avatar
0 votes
3 answers
575 views

I am having trouble understanding the syntax in GDScript, specifically the use of class_name and extends. I often come across ...
shingo.nakanishi's user avatar
0 votes
0 answers
73 views

When I apply the canvas_item barrel distortion shader to my viewport, there is a noticeable loss of resolution in the center of the screen. Therefore, is it possible to scale the final image + fisheye ...
ThetaJones's user avatar
0 votes
1 answer
140 views

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 ...
Jango B's user avatar
0 votes
1 answer
783 views

When I try to run the following code in Godot, I get the error: Line 45:Identifier "delta" not declared in the current scope. I don't know what this means or what I should do about it. <...
John Jergens's user avatar
1 vote
1 answer
166 views

Still coding that awesome Turn based RPG. I'm currently coding the logic for firstly selecting the attack then selecting the enemy (Or enemies) ...
buzzbuzz20xx's user avatar
1 vote
0 answers
124 views

In Godot 4.3, is there a way to list all cached resources, and their resource_path values? These may be loaded from disk or may belong to packed scenes (which would ...
shiroko's user avatar
  • 55
0 votes
1 answer
200 views

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 ...
boruok's user avatar
  • 13
0 votes
1 answer
232 views

I am using Godot 4.3, it is giving me this error and when I change 0 to 0.0, the character stops moving. If I change the last parameter to an integer also it still shoots an error: ...
zikorachimnefe fredrick's user avatar
0 votes
0 answers
152 views

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,...
ThetaJones's user avatar
0 votes
1 answer
230 views

I'm making an open source turn based JRPG in Godot 4.3, I want any programmer to be able to very easily create new enemies with different behaviors by simply customizing export variables in the editor,...
buzzbuzz20xx's user avatar
1 vote
0 answers
409 views

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 ...
Seph Reed's user avatar
  • 275
1 vote
3 answers
234 views

I have some platformer code to make my character jump based on height. I'd like to be able to tune it in the editor using both world units or number of tiles. I can do this with setters: ...
idbrii's user avatar
  • 1,088
0 votes
1 answer
138 views

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 ...
Jason Crosby's user avatar
2 votes
1 answer
92 views

Godot Version: v4.3.stable.official [77dcf97d8] I'm trying to add the ability for blocks (frozen RigidBody2Ds) to be hard-dropped instantly (they get placed on the closest surface directly below them) ...
DragonAero's user avatar
0 votes
1 answer
99 views

I have the following pause menu script: ...
Maria's user avatar
  • 21
0 votes
1 answer
90 views

When the character follows the path, the camera stays still despite being a child node of the character. The hierarchy and the PathFollow3D script: ...
Maria's user avatar
  • 21
0 votes
1 answer
92 views

I'm having a problem with CharacterBody2D knockback in Godot 4.3 stable. I'm creating a game where enemies (CharacterBody2D) can ...
buzzbuzz20xx's user avatar
0 votes
0 answers
874 views

In the documentation for versions 3.5 and 4.3, it mentions that hot reloading is possible: 3.5: https://docs.godotengine.org/en/3.5/getting_started/introduction/godot_design_philosophy.html 4.3: https:...
shingo.nakanishi's user avatar
1 vote
0 answers
66 views

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 ...
Jason Crosby's user avatar
0 votes
1 answer
164 views

I have this projectile code in Godot: ...
Miumen's user avatar
  • 1
2 votes
1 answer
81 views

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 ...
DragonAero's user avatar
0 votes
0 answers
84 views

I have created portals that work perfectly fine. I walk into one and come out the other side seamlessly. The problem I am having, though, is when the portal is up against a wall my player (A ...
TheJalfireKnight's user avatar
0 votes
2 answers
170 views

As of now, players are synced using: ...
Reincarnated as a worldbuilder's user avatar
1 vote
0 answers
96 views

Apparently in Python, doc-strings do slow down programs, at least that's what I've been reading in other questions... but what about GDScript? Should I just use # instead?
Reincarnated as a worldbuilder's user avatar
1 vote
0 answers
102 views

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 ...
buzzbuzz20xx's user avatar
0 votes
1 answer
132 views

It may not matter, but I'm following How to make a Video Game - Godot Beginner Tutorial. I want to implement the dying animation instead of removing CollisionShape2D from the body (parameter passed to ...
depperm's user avatar
  • 101
2 votes
1 answer
149 views

Trying to understand how theme lookup works in Godot 4.2. Suppose a Control node script has the following two lines in it: ...
shiroko's user avatar
  • 55
0 votes
1 answer
1k views

i was following a tutorial series on YouTube on creating a Zelda clone in Godot 4.2.1 and everything works fine, but the tutorial never implements a knock-back effect when attacking an enemy so i ...
buzzbuzz20xx's user avatar
0 votes
1 answer
87 views

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 ...
JChips's user avatar
  • 1
0 votes
2 answers
226 views

First Person Movement along the wall makes the character move faster and glitches out a little. The problem is pretty much visible here: https://youtu.be/_1dDdCSwVEo Source: https://github.com/...
ThetaJones's user avatar
0 votes
0 answers
216 views

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 ...
Evan C's user avatar
  • 1
1 vote
2 answers
715 views

Over the course of the game, the user generates a lot of very simple data. And array of strings (single letters), timestamps (int) and a boolean array, all equal in size. The length of this "save ...
shiroko's user avatar
  • 55
1 vote
2 answers
1k views

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 ...
buzzbuzz20xx's user avatar
1 vote
0 answers
207 views

I am looking at wrapping functionality from an external C++ library with GDExtension for use with Godot 4. Many of these functions have an appreciable runtime before they return the values of interest,...
R.M.'s user avatar
  • 141
1 vote
1 answer
188 views

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 ...
buzzbuzz20xx's user avatar
3 votes
2 answers
3k views

I felt like I had gained a decent grasp on core coding concepts (variables, if statements, loops) and I familiarized myself with Godot, so I wanted to start making small games to learn more by ...
buzzbuzz20xx's user avatar
1 vote
1 answer
139 views

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 ...
buzzbuzz20xx's user avatar
0 votes
1 answer
318 views

I am working on kart racing game. I have created a series of respawn points (Node3Ds) for when a player falls off of the track. Currently, I am trying to get the closest respawn point to the player ...
mjbelanic's user avatar
0 votes
2 answers
103 views

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 ...
Reincarnated as a worldbuilder's user avatar